2025-07-27 18:02 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001016Spring engineGeneralpublic2012-06-27 02:29
Reporterimbaczek 
Assigned Toabma 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Product Version0.76b1+svn 
Target VersionFixed in Version 
Summary0001016: crash in 7zip memory routines...
Descriptionthis one may be bogus, as it happens in the following scenario:

1. host a game, join from the same box, get a second computer to join
2. run game (so the commanders spawn, not only pregame)
3. exit the clients
4. exit the host

r6290, CA r2697
Additional InformationUsing script script.txt
using configuration source "Software\SJ\Spring 0.76b1+"
Adding K:\gry\spring-test-1 to directories
Adding C:\Documents and Settings\baczyslaw\Moje dokumenty\Spring to directories
Adding C:\Documents and Settings\All Users\Dane aplikacji\Spring to directories
Using read-write data directory: K:\gry\spring-test-1\
Scanning: K:\gry\spring-test-1\maps
Scanning: K:\gry\spring-test-1\base
Scanning: K:\gry\spring-test-1\mods
Video mode set to 1024 x 768 / 32 bit
[ 0] SDL: 1.2.10
[ 0] GL: 2.1.7873 Release
[ 0] GL: ATI Technologies Inc.
[ 0] GL: ATI Radeon HD 4800 Series
[ 0] GLEW: 1.4.0
[ 0] Connecting to local server using number 0
[ 0] Became player 0
[ 0] Using map SmallDivide.smf
[ 0] Recording demo demos/20080821_172104_SmallDivide_0.76b1+.sdf
[ 0] Using script Commanders
[ 0] Using mod Complete Annihilation stable-2697
[ 0] Connecting to server .
[ 0] Parsing unit icons
[ 0] WARNING: removed armhoverboard unitDef, missing model file (armhoverboard)
[ 0] WARNING: removed the "armhornet" entry from the "concept_factory" build menu
[ 0] WARNING: removed the "armhoverboard" entry from the "concept_factory" build menu
[ 0] WARNING: removed the "coretsuran" entry from the "concept_factory" build menu
[ 0] WARNING: removed the "armwind" entry from the "armcs" build menu
[ 0] WARNING: removed the "armwind" entry from the "corcs" build menu
[ 0] Loading all definitions: 0.441000
[ 0] You are missing an OpenGL extension needed to use shadowmaps (fragment_program_shadow)
[ 0] Opening map file
[ 0] Loading Map
[ 0] Loading detail textures
[ 0] Creating overhead texture
[ 0] Creating ground shading
[ 0] Loading tile file
[ 0] Reading tiles
[ 0] Reading tile map
[ 0] Creating projectile texture
[ 0] Number of damage types: 12
[ 0] Loading weapon definitions
[ 0] Loading unit definitions
[ 0] Loading feature definitions
[ 0] Generating trees
[ 0] Creating unit textures
[ 0] Initializing map features
[ 0] Reading estimate path costs (2 threads)
[ 0] Creating sky
[ 0] Loading LuaRules
[ 0] D-gun cost NOT disabled
[ 0] Total Global Metal:67.787826538086
[ 0] LUARULES-DRAW (GADGETS)
[ 0] LUARULES-DRAW (GADGETS)
[ 0] Loading LuaGaia
[ 0] Loading LuaUI
[ 0] This mod has locked LuaUI access
[ 0] Using LUAUI_DIRNAME = LuaUI/
[ 0] Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
[ 0] LuaUI: bound F11 to the widget selector
[ 0] LuaUI: bound CTRL+F11 to tweak mode
[ 0] Loaded widget: BlurApi <api_gfx_blur.lua>
[ 0] Loaded widget: HealthBars <unit_healthbars.lua>
[ 0] Loaded widget: Noises <snd_noises.lua>
[ 0] Loaded widget: Mex energy control <gui_mex_energy.lua>
[ 0] Loaded widget: Tooltip Replacement <gui_tooltip_replacement.lua>
[ 0] Loaded widget: LuaUI Intro <gui_intro.lua>
[ 0] Loaded widget: DGunLimit <gui_limit_dgun.lua>
[ 0] Loaded widget: BuildETA <gui_build_eta.lua>
[ 0] Loaded widget: Don't Shoot <unit_dontshoot.lua>
[ 0] Loaded widget: Auto group <unit_auto_group.lua>
[ 0] Loaded widget: BuildBar <gui_buildbar.lua>
[ 0] Loaded widget: CA Interface <gui_rooms.lua>
[ 0] Loaded widget: DCIcon <dbg_dcicon.lua>
[ 0] Loaded widget: Darkening <gui_darkening.lua>
[ 0] Loaded widget: Defense Range v4.11 <gui_defenserange.lua>
[ 0] Loaded widget: Don't Move <unit_dontmove.lua>
[ 0] Loaded widget: HoldFire <unit_holdfire.lua>
[ 0] Loaded widget: IdleBuildersNEW <gui_idle_builders_new.lua>
[ 0] Loaded widget: Land Fly v1.2.2 <unit_land_fly.lua>
[ 0] Loaded widget: MinimapEvents <minimap_events.lua>
[ 0] Loaded widget: ReclaimInfo <gui_reclaiminfo.lua>
[ 0] Loaded widget: Retreat v0.21 <cmd_retreat.lua>
[ 0] Loaded widget: Take Reminderv2.2 <gui_take_remind.lua>
[ 0] Loaded widget: Transport AI <unit_transport_ai.lua>
[ 0] Loaded widget: Start Point Remover <init_start_point_remover.lua>
[ 0] Loaded widget: Satellites v0.3 <unit_satellites.lua>
[ 0] Loaded widget: AllyCursors <gui_ally_cursors.lua>
[ 0] Loaded widget: CommandInsert <gui_commandinsert.lua>
[ 0] Loaded widget: Rank Icons <gui_xp.lua>
[ 0] Reloaded cmdcolors with: cmdcolors.tmp
[ 0] Loaded widget: SelectionCircle <gui_selectioncircle.lua>
[ 0] Loaded widget: Select n Center! <gui_center_n_select.lua>
[ 0] Loaded widget: LupsManager <gfx_lups_manager.lua>
[ 0] Loaded widget: Units on Fire <gfx_lups_units_on_fire.lua>
[ 0] Loaded widget: CALayout <ca_layout.lua>
[ 0] Loaded widget: Lups <lups_wrapper.lua>
[ 0] Loaded widget: CustomFormations <unit_customformations.lua>
[ 0] Loaded widget: Default Commands Tweaks <cmd_defaultcommands.lua>
[ 0] Loaded widget: Jumjet GUI <gui_jumpjets.lua>
[ 0] Loaded widget: Level Terraform GUI <gui_terraform.lua>
[ 0] LuaUI v0.3
[ 0] Finalizing...
[ 0] Spring 0.76b1+
[ 0] New connection established in 0 (wanted number was 0)
[ 0] New connection established in 1 (wanted number was 1)
[ 0] New connection established in 2 (wanted number was 2)
[ 0] Player baczek1 joined as 0
[ 0] Player baczek2 joined as 1
[ 0] Player baczek3 joined as 2
[ 0] GameID: f087ad48b5a4d73e9bceeb78fc59d5be
[ 0] K:\gry\spring-test-1\AI\Bot-libs\TestGlobalAI.dll has a C++ interface
[ 48] Max Windmill altitude bonus is: 38%
[ 1014] Player baczek3 left the game: normal quit
[ 1014] Player baczek3 left
[ 1759] Player baczek2 left the game: normal quit
[ 1759] Player baczek2 left
[ 1807] User exited
[ 1807] Reloaded cmdcolors with: cmdcolors.tmp
[ 1807] Path cache hits 0 0%
[ 1807] Path cache hits 0 0%
[ 1807] Statistics for local connection:
Received: 7765 bytes
Sent: 20015 bytes
[ 1807] Spring 0.76b1+ has crashed.
[ 1807] Exception: Access violation (0xc0000005)
[ 1807] Exception Address: 0x7c9109f9
[ 1807] DLL information:
[ 1807] 0x00400000 spring
[ 1807] 0x7c900000 ntdll
[ 1807] 0x7c800000 kernel32
[ 1807] 0x77dc0000 ADVAPI32
[ 1807] 0x77e70000 RPCRT4
[ 1807] 0x77fe0000 Secur32
[ 1807] 0x73ea0000 dsound
[ 1807] 0x77c00000 msvcrt
[ 1807] 0x774d0000 ole32
[ 1807] 0x77f10000 GDI32
[ 1807] 0x7e360000 USER32
[ 1807] 0x77bf0000 VERSION
[ 1807] 0x76b20000 WINMM
[ 1807] 0x5c8f0000 GLU32
[ 1807] 0x5f190000 OPENGL32
[ 1807] 0x736f0000 DDRAW
[ 1807] 0x73b50000 DCIMAN32
[ 1807] 0x76c80000 IMAGEHLP
[ 1807] 0x7c9c0000 SHELL32
[ 1807] 0x77f60000 SHLWAPI
[ 1807] 0x71a70000 WSOCK32
[ 1807] 0x71a50000 WS2_32
[ 1807] 0x71a40000 WS2HELP
[ 1807] 0x6ed80000 glew32
[ 1807] 0x10000000 ILU
[ 1807] 0x055c0000 DevIL
[ 1807] 0x05750000 SDL
[ 1807] 0x7c340000 MSVCR71
[ 1807] 0x6e140000 boost_thread-mgw43-mt-1_35
[ 1807] 0x6fbc0000 mingwm10
[ 1807] 0x66fc0000 freetype6
[ 1807] 0x61b80000 zlib1
[ 1807] 0x76360000 IMM32
[ 1807] 0x773c0000 comctl32
[ 1807] 0x5d520000 comctl32
[ 1807] 0x5b1d0000 uxtheme
[ 1807] 0x746d0000 MSCTF
[ 1807] 0x10d00000 GameHook
[ 1807] 0x10100000 lgscroll
[ 1807] 0x78130000 MSVCR80
[ 1807] 0x77680000 NTMARTA
[ 1807] 0x71ba0000 SAMLIB
[ 1807] 0x76f50000 WLDAP32
[ 1807] 0x75180000 msctfime
[ 1807] 0x69020000 atioglxx
[ 1807] 0x719f0000 mswsock
[ 1807] 0x76c20000 WINTRUST
[ 1807] 0x77a70000 CRYPT32
[ 1807] 0x77b10000 MSASN1
[ 1807] 0x72cb0000 wdmaud
[ 1807] 0x72ca0000 msacm32
[ 1807] 0x77bd0000 MSACM32
[ 1807] 0x77bc0000 midimap
[ 1807] 0x73e70000 KsUser
[ 1807] 0x59bc0000 DBGHELP
[ 1807] Stacktrace:
[ 1807] (0) C:\WINDOWS\system32\ntdll.dll(wcsncpy+0x49a) [0x7C9109F9]
[ 1807] (1) C:\WINDOWS\system32\ntdll.dll(wcsncpy+0x2cd) [0x7C91082C]
[ 1807] (2) C:\WINDOWS\system32\msvcrt.dll(free+0xc3) [0x77C1C2DE]
[ 1807] (3) K:\gry\spring-test-1\spring.exe [0x006EE9D7]
[ 1807] (4) K:\gry\spring-test-1\spring.exe [0x006EEA59]
[ 1807] (5) K:\gry\spring-test-1\spring.exe [0x006ED316]
[ 1807] (6) K:\gry\spring-test-1\spring.exe [0x00466907]
[ 1807] (7) K:\gry\spring-test-1\spring.exe [0x004796EC]
[ 1807] (8) K:\gry\spring-test-1\spring.exe [0x006FDB88]
[ 1807] (9) K:\gry\spring-test-1\spring.exe [0x0043BFCC]
[ 1807] (10) K:\gry\spring-test-1\spring.exe [0x00440F0C]
[ 1807] (11) K:\gry\spring-test-1\spring.exe [0x00437E26]
[ 1807] (12) K:\gry\spring-test-1\spring.exe [0x00437F72]
[ 1807] (13) K:\gry\spring-test-1\spring.exe [0x007BE1A4]
[ 1807] (14) K:\gry\spring-test-1\spring.exe [0x0040124B]
[ 1807] (15) K:\gry\spring-test-1\spring.exe [0x004012B8]
[ 1807] (16) C:\WINDOWS\system32\kernel32.dll(RegisterWaitForInputIdle+0x49) [0x7C817067]


??:0
??:0
??:0
G:\progz\spring.git/rts/lib/7zip/7zItem.c:39
G:\progz\spring.git/rts/lib/7zip/7zItem.c:123
G:\progz\spring.git/rts/lib/7zip/7zIn.c:25
K:\progz\spring.git/rts/System/FileSystem/Archive7Zip.cpp:77
K:\progz\spring.git/rts/System/FileSystem/VFSHandler.cpp:56
K:\progz\spring.git/rts/Game/Game.cpp:590
K:\progz\spring.git/rts/System/SpringApp.cpp:1019
K:\progz\spring.git/rts/System/SpringApp.cpp:1007
K:\progz\spring.git/rts/System/Main.cpp:49
K:\progz\spring.git/rts/System/Main.cpp:111
llex.cpp:0
Weapon.cpp:0
Weapon.cpp:0
??:0
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0002475

imbaczek (reporter)

Last edited: 2008-08-21 18:09

traced it to heap corruption, investigating

k:\progz\spring/rts/System/mmgr.cpp:1497
k:\progz\spring/rts/System/mmgr.cpp:1521
k:\progz\spring/rts/Game/Game.cpp:3070
k:\progz\spring/rts/Game/Game.cpp:3521
k:\progz\spring/rts/Game/Game.cpp:2460
k:\progz\spring/rts/System/SpringApp.cpp:809
k:\progz\spring/rts/System/SpringApp.cpp:1001
k:\progz\spring/rts/System/Main.cpp:84
k:\progz\spring/rts/System/Main.cpp:111
llex.cpp:0
s_copysignf.cpp:0
s_copysignf.cpp:0
??:0

~0002476

imbaczek (reporter)

gtg now, for now there's this

(gdb) run script.txt
Starting program: K:\gry\spring-test-1/spring.exe script.txt
[New thread 102776.0x1917c]
[New thread 102776.0x1918c]
warning: HEAP[spring.exe]:
warning: HEAP: Free Heap block 6b4f670 modified at 6b4f68c after it was freed


Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
(gdb) bt
#0 0x7c90120f in ntdll!DbgUiConnectToDbg ()
   from C:\WINDOWS\system32\ntdll.dll
#1 0x7c96c201 in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\WINDOWS\system32\ntdll.dll
#2 0x7c949705 in ntdll!LdrFindEntryForAddress ()
   from C:\WINDOWS\system32\ntdll.dll
0000003 0x06b4f670 in ?? ()
0000004 0x0000001d in ?? ()
0000005 0x7c96cf68 in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\WINDOWS\system32\ntdll.dll
#6 0x7c949564 in ntdll!LdrFindEntryForAddress ()
   from C:\WINDOWS\system32\ntdll.dll
#7 0x003e0000 in ?? ()
#8 0x50000161 in ?? ()
#9 0x0000001d in ?? ()
0000010 0x7c918f01 in ntdll!RtlDuplicateUnicodeString ()
   from C:\WINDOWS\system32\ntdll.dll
#11 0x77c1c3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll
0000012 0x003e0000 in ?? ()
0000013 0x40000060 in ?? ()
0000014 0x0000001d in ?? ()
#15 0x77c1c3e7 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll
#16 0x0000001d in ?? ()
#17 0x77c1c42e in msvcrt!malloc () from C:\WINDOWS\system32\msvcrt.dll
#18 0x77c1c454 in realloc () from C:\WINDOWS\system32\msvcrt.dll
#19 0x0000001d in ?? ()
0000020 0x006e542f in luaM_realloc_ (L=0xad5b460, block=0x0, osize=0, nsize=29)
    at rts\lib\lua\src\lmem.cpp:79
#21 0x006e9ef9 in newlstr (L=0xad5b460, str=0x99e0e7 "setmetatable", l=12,
    h=1220466130) at rts\lib\lua\src\lstring.cpp:56
#22 0x006d9fd7 in lua_setfield (L=0xad5b460, idx=-2,
    k=0x99e0e7 "setmetatable") at rts\lib\lua\src\lapi.cpp:681
#23 0x006db2b3 in luaI_openlib (L=0xad5b460, libname=0x99dd5c "_G",
    l=0x99e1b0, nup=0) at rts\lib\lua\src\lauxlib.cpp:265
0000024 0x006db362 in luaL_register (L=0xad5b460, libname=0x99dd5c "_G",
    l=0x99e120) at rts\lib\lua\src\lauxlib.cpp:231
#25 0x006dbcbb in luaopen_base (L=0xad5b460)
    at rts\lib\lua\src\lbaselib.cpp:633
0000026 0x006e0d20 in luaD_precall (L=0xad5b460, func=0xad5b5e0, nresults=0)
    at rts\lib\lua\src\ldo.cpp:319
0000027 0x006e0ff9 in luaD_call (L=0xad5b460, func=0xad5b5e0, nResults=0)
    at rts\lib\lua\src\ldo.cpp:376
#28 0x006d9d62 in f_call (L=0xad5b460, ud=0x22f954)
    at rts\lib\lua\src\lapi.cpp:817
0000029 0x006e08fc in luaD_rawrunprotected (L=0xad5b460, f=0x6d9d4c <f_call>,
    ud=0x22f954) at rts\lib\lua\src\ldo.cpp:116
#30 0x006e096d in luaD_pcall (L=0xad5b460, func=0x6d9d4c <f_call>,
    u=0x22f954, old_top=8, ef=0) at rts\lib\lua\src\ldo.cpp:461
#31 0x006d9be4 in lua_pcall (L=0xad5b460, nargs=-1, nresults=0, errfunc=0)
    at rts\lib\lua\src\lapi.cpp:838
#32 0x0065f064 in LuaParser::SetupEnv (this=0xad5ac08)
    at rts\Lua\LuaParser.cpp:106
#33 0x0065fa49 in LuaParser (this=0xad5ac08, _fileName=@0x22fa64,
    _fileModes=@0x22fa60, _accessModes=@0x22fa5c) at rts\Lua\LuaParser.cpp:63
0000034 0x005ffa01 in MapParser (this=0x22fab8, mapName=@0x6b10bd4)
    at rts\Map\MapParser.cpp:38
0000035 0x0072a329 in CGameSetup::LoadStartPositionsFromMap (this=0x6b10bc0)
    at rts\Game\GameSetup.cpp:89
#36 0x0072ab07 in CGameSetup::LoadStartPositions (this=0x6b10bc0)
    at rts\Game\GameSetup.cpp:127
#37 0x0073450a in CPreGame::StartServer (this=0x6b4f5a8, map=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__g
nu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x2
2fcf4 "<t▒\006\214\f▓\006ďw▒\006╣~\227"}}, mod=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__g
nu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x2
2fcf8 "\214\f▓\006ďw▒\006╣~\227"}}, script=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__g
nu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x2
2fcfc "ďw▒\006╣~\227"}}) at rts\Game\PreGame.cpp:421
#38 0x00735ef3 in CPreGame (this=0x6b4f5a8, server=true, demo=@0x22fd40,
    save=@0x22feb8) at rts\Game\PreGame.cpp:90
0000039 0x0044007f in SpringApp::CreateGameSetup (this=0x22feb0)
    at rts\System\SpringApp.cpp:789
#40 0x00442f00 in _fu0____GLEW_ARB_texture_compression ()
    at rts\System\SpringApp.cpp:253
#41 0x004436c3 in SpringApp::Run (this=0x22feb0, argc=2, argv=0x3e42e8)
    at rts\System\SpringApp.cpp:869
0000042 0x00437f15 in Run (argc=2, argv=0x3e42e8) at rts\System\Main.cpp:84
0000043 0x00437f62 in WinMain@16 (hInstanceIn=0x400000, hPrevInstance=0x0,
    lpCmdLine=0x241f00 "script.txt", nCmdShow=10) at rts\System\Main.cpp:110
0000044 0x007c86f4 in main ()
(gdb)

~0002477

imbaczek (reporter)

the offending code is GameSetup::LoadStartPositions, precisely

        for (int i = 0; i < MAX_TEAMS; ++i) {
            teamStartingData[i].teamStartNum = teamStartNum[i];

(around line 125.)

~0002478

imbaczek (reporter)

should be fixed in r6301.
+Notes

-Issue History
Date Modified Username Field Change
2008-08-21 17:32 imbaczek New Issue
2008-08-21 18:09 imbaczek Note Added: 0002475
2008-08-21 18:09 imbaczek Note Edited: 0002475
2008-08-21 18:22 imbaczek Note Added: 0002476
2008-08-22 02:01 imbaczek Note Added: 0002477
2008-08-22 02:28 imbaczek Note Added: 0002478
2008-08-22 02:28 imbaczek Status new => resolved
2008-08-22 02:28 imbaczek Resolution open => fixed
2012-06-27 02:27 abma Status resolved => assigned
2012-06-27 02:27 abma Assigned To => abma
2012-06-27 02:29 abma Status assigned => resolved
+Issue History