ohmtal Posted March 19, 2023 Share Posted March 19, 2023 (edited) In Debug everything works fine - but when I switch to RelWithDebug or Release it get a Segmentation fault: Breakpoint 6, _StringTable::insert (this=0x555557c598b0, _val=_val@entry=0x5555572263ab "TheoraTextureObject", caseSens=caseSens@entry=false) at /opt/OGE3D/Engine/source/core/stringTable.cpp:135 135 walk = &buckets[key % numBuckets]; 1: val = 0x5555572263ab "TheoraTextureObject" 2: walk = <optimized out> 3: key = 36662630 4: numBuckets = 459 (gdb) cont Continuing. Breakpoint 6, _StringTable::insert (this=0x555557c598b0, _val=<optimized out>, caseSens=caseSens@entry=false) at /opt/OGE3D/Engine/source/core/stringTable.cpp:135 135 walk = &buckets[key % numBuckets]; 1: val = 0x555557228c7b "TypeGFXAdapterType" 2: walk = <optimized out> 3: key = 19067645 4: numBuckets = 1819307369 From one step to another the Stringtable itemCount and numBuckets raise abnormal. I also removed Theora from build and it still happen before TypeGFXAdapterType. I also tried a record/reverse-cont but then the count is bad in reverse too. With stepping after the last good insert i nailed it down to: 145 in ../csu/libc-start.c 1: itemCount = <error: current stack frame does not contain a variable named `this'> 3: _gStringTable.itemCount = 309 (gdb) next 144 in ../csu/libc-start.c 1: itemCount = <error: current stack frame does not contain a variable named `this'> 3: _gStringTable.itemCount = 1886999653 Not really helps me to get the reason for the segfault / memory corruption. Btw. T3D 4.current runs fine. EDIT: It works fine on FreeBSD 13.1 (not a linux) - on the same machine using ubuntu 22.04LTS it makes the segfault. Any hints? Edited March 20, 2023 by ohmtal Quote Link to comment Share on other sites More sharing options...
Azaezel Posted March 19, 2023 Share Posted March 19, 2023 Nothing particularly jumps out at me in https://github.com/TorqueGameEngines/Torque3D/commits/c999baf7ed0a24dab4d4508af6cc06ceebdb220e/Engine/source/core/stringTable.cpp , but thanks for the precise report. Will review further. Quote Link to comment Share on other sites More sharing options...
Azaezel Posted March 20, 2023 Share Posted March 20, 2023 Forwarding the suggestion to try incorporating https://github.com/TorqueGameEngines/Torque3D/pull/812 Quote Link to comment Share on other sites More sharing options...
ohmtal Posted March 20, 2023 Author Share Posted March 20, 2023 @Azaezelyou saved my day Amazing - it lives ! I replaced the str.cpp/h with the current version and it works . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.