Closed boomlinde closed 9 months ago
l
k
At this point, I get the segfault. If I open a map from doom2.wad and split linedefs in map01, the same problem does not occur.
I rebuilt with debug symbols (cmake . -DCMAKE_BUILD_TYPE=debug && make) and could reproduce it then, as well. This is the output from GDB:
cmake . -DCMAKE_BUILD_TYPE=debug && make
Thread 1 "eureka" received signal SIGSEGV, Segmentation fault. LinedefModule::splitLinedefAtVertex (this=0x5555557b96e8 <gInstance+520>, op=..., ld=1, new_v=4) at /home/boomlinde/src/eureka-editor/src/e_linedef.cc:930 930 *L2 = *L;
L is null, which I presume causes the segfault :
L
L = std::unique_ptr<LineDef> = {get() = 0x0}
Please let me know if you need any further info!
Looks like the classic array realloc problem. Sad thing is that with raw pointers this wasn't a problem! I need to fix it so it doesn't happen again...
realloc
Fixed the problem.
Steps to reproduce
l
k
to split the linedefAt this point, I get the segfault. If I open a map from doom2.wad and split linedefs in map01, the same problem does not occur.
Analysis
I rebuilt with debug symbols (
cmake . -DCMAKE_BUILD_TYPE=debug && make
) and could reproduce it then, as well. This is the output from GDB:L
is null, which I presume causes the segfault :Please let me know if you need any further info!