redeclipse / base

Base environment for Red Eclipse and associated source files.
https://redeclipse.net/
437 stars 90 forks source link

undo causing segfaults #841

Closed Jigoku closed 5 years ago

Jigoku commented 6 years ago

When undoing a fairly large geometry change of a map (seems to happen more often at "gridpower 10" and above), the game will either freeze or segfault, with no other information relating to error messages or logs.

eg; Fatal signal 11 (Segmentation Violation)

Here's a reproducible method;

2018-11-01-181646_1920x1080_scrot

This map is not specific to the issue, just one in the default map rotation that can reproduce it. Although, the problem seems to be related to the number of world triangles in the selection, the more geometry that is present, the more likely the game will crash.

Version: 1.9.9-nix64-inplace client (v2 Preview) [0x3c603210] (Dist) Although, i recall having this happen a few times in 1.6 also, but could never reproduce it, not sure if this has been reported before, although SniperGoth just told me they've experienced it a few times.

Hopefully someone else can reproduce this form the above methods?

Jigoku commented 6 years ago

Here's a backtrace if any use; from the point of pressing "undo" (and crash).

[jigoku][1][darkstar|~/devel/redeclipse-git]
$ LD_LIBRARY_PATH="./bin/amd64:${LD_LIBRARY_PATH}" gdb bin/amd64/redeclipse_linux 
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-slackware-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/amd64/redeclipse_linux...done.
(gdb) run
Starting program: /home/jigoku/devel/redeclipse-git/bin/amd64/redeclipse_linux 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
2018-11-01 19:51.22 Added package: data/
[New Thread 0x7ffff58e0700 (LWP 29097)]
[New Thread 0x7ffff1a4d700 (LWP 29101)]
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/mortar.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/autoexec.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/skyboxes.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/spiderman.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/sp_puzzle.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/sp_puzzle_vars.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/zapper2.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/scrollbox.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/blah.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/ddddd.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/favourites.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/grass.cfg ) failed, unknown file
[S_API WARN] CUserRemoteStorage::FileForget( My Games/Red Eclipse/zapper.cfg ) failed, unknown file
Setting breakpad minidump AppID = 967460
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198083257819 [API loaded no]
[New Thread 0x7fffda6e3700 (LWP 29102)]
[New Thread 0x7fffc9ae2700 (LWP 29103)]
libpng warning: iCCP: known incorrect sRGB profile
[New Thread 0x7fffc3bff700 (LWP 29122)]
[New Thread 0x7fffc33fe700 (LWP 29123)]
libpng warning: iCCP: known incorrect sRGB profile

Thread 1 "redeclipse_linu" received signal SIGSEGV, Segmentation fault.
0x00007ffff6f65bc0 in __memcpy_ssse3 () from /lib64/libc.so.6
(gdb) bt full
#0  0x00007ffff6f65bc0 in __memcpy_ssse3 () from /lib64/libc.so.6
No symbol table info available.
#1  0x000000000041bdad in databuf<unsigned char>::put (this=0x7fffffffa790, 
    vals=0x58a388254412a2 <error: Cannot access memory at address 0x58a388254412a2>, numvals=3670128)
    at shared/tools.h:399
No locals.
#2  0x000000000041bfb7 in vector<unsigned char>::put (this=0xc74f0e8, 
    v=0x58a388254412a2 <error: Cannot access memory at address 0x58a388254412a2>, n=3670128) at shared/tools.h:832
        buf = {
          buf = 0x279ec7f0 "|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211g|\211"..., len = 0, maxlen = 3670128, flags = 0 '\000'}
#3  0x000000000084b934 in server::parsepacket (sender=0, chan=1, p=...) at game/server.cpp:7511
        unpacklen = 493242
        packlen = 8089
        s = "?\000\201\272\206\a\000\200\231\037x\332\355\335ߎ\343\310u\a`\216Ӱ\003\aH:\231^x\214\261Ǻ\260\327\353\273y\202]a\257sяб\327ȍ\021\033\t\234\334\066z\264Z=F\036\310y&\205얦%5\213],\026)\212\374(\f֞\232bթ\363\377\307:UE\361\370\\=\375yS<\377\331\377\377\355\266(\356\017\236\267\305\363/S\323\315s\323I\333ϊ\347_C\323qˏ\213\347\337\030\372\034>q}\266\227\071\355Q\220\232\062\355\021pu\230\325\316-=\207O\203\212\223\355\251\223Z\024\313\362y}ֱ}\306 X\027jI\350Ѕr5E\037\212\342\256|\332\366\271\330\360k\002v;\245\245\317q\332\333\355\211.Ϻ|\252\377"...
        q = {buf = 0x58a388254412a2 <error: Cannot access memory at address 0x58a388254412a2>, len = 3670128, 
          maxlen = 917532, flags = 7 '\a'}
        curtype = 63
        text = "a5n\204\267\341\333\360m\370\066|\033\276\r߆o÷\341\333\360m\370\066|\233l÷\341۶\205I\233\245\315\322fi\263\264Y\332,m\226\066K\233\245\315\322f\262-m\226\066\333\026f\347\001Rm\v\303p\244\"u:\333\302\232\067\214%\036\362\037ji\352\323\345\220\377\370\353\341\213`\313I<\327癍\373\263!\233\247ݵO#\251\256n\230\361\261\363\023\227\355!\255Ou\\j\274\365q\354\274\313\004\206>\b\235ݞ\342\225;\270\352\022\030v\333%0\270z.o\034\263cL\332,m樥\315\322fi3G-mf\267\245\315\270*mf\267ycis\341Jy\216\272\271\223+\345\033\227Ǖ\362\302\"\016TX\344JyWʻR\276"...
        type = 63
        prevtype = 39
        ci = 0xc74daf0
        curmsg = 2
#4  0x00000000006501b0 in process (packet=0x1768c040, sender=0, chan=1) at engine/server.cpp:612
        p = {<databuf<unsigned char>> = {buf = 0x276fb6a0 "'", len = 8100, maxlen = 8100, flags = 0 '\000'}, 
          packet = 0x1768c040, growth = 0}
#5  0x000000000065027e in localclienttoserver (chan=1, packet=0x1768c040) at engine/server.cpp:620
        c = 0xc74d650
#6  0x00000000004ceada in sendclientpacket (packet=0x1768c040, chan=1) at engine/client.cpp:220
No locals.
#7  0x00000000006fda0b in client::sendmessages () at game/client.cpp:2111
        p = {<databuf<unsigned char>> = {buf = 0x276fb6a0 "'", len = 8100, maxlen = 8100, flags = 0 '\000'}, 
          packet = 0x1768c040, growth = 5000}
#8  0x00000000006fda73 in client::c2sinfo (force=false) at game/client.cpp:2120
        lastupdate = 20749
#9  0x00000000007505b5 in game::updateworld () at game/game.cpp:2978
No locals.
#10 0x0000000000513abf in main (argc=1, argv=0x7fffffffe0c8) at engine/main.cpp:1133
        elapsed = 161
        frameloops = 1409
        initscript = 0x0
        reprotoprefix = "redeclipse://"
        reprotolen = 13
        reprotoarg = 0x0
        connectstr = 0x0
        connectpassword = 0x0
        connecthost = 0x0
        connectport = 28801
        shouldload = true
(gdb)