Opened 10 years ago
Closed 10 years ago
#2756 closed defect (fixed)
Game crashing when loading a map
Reported by: | Stan | Owned by: | Itms |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 17 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
Steps to reproduce :
1.Open a 2v2 Map 2.Set all the players to petra very hard 3.Set popcap to 100
- Tick All options
- Set all the civs to britons for instance
- Launch the game
- Wait till it crashes. (One or two minutes). Works if you run it on background.
Expected Output :
It shouldn't crash, cause I want to play :P
Possible Reasons :
I have petra set to debug (This is the only modified file in SVN)
What version of the product are you using? On what operating system?
Windows 8.1.1 64bits r15691
Attachments (5)
Change History (8)
by , 10 years ago
Attachment: | mainlog.html added |
---|
by , 10 years ago
Attachment: | crashlog.dmp added |
---|
by , 10 years ago
Attachment: | system_info.txt added |
---|
by , 10 years ago
Attachment: | crashlog.txt added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Owner: | set to |
---|
Thanks a lot for the backtrace. This is a mistake I already did before about fogging codes.
For information, one should never trigger code like "ForceMiraging" or post visibility update messages inside an iteration over the entities map, because these codes can lead to entities destruction (when mirages come into sight for example). So trying to access directly elements on the map can create segfaults.
I'll commit a fix tomorrow and I'll explain that somewhere in the source to prevent me or someone else from making the mistake later.
I've also experienced crashes on linux when loading the map. Running in the debugger, It seems to be connected to r15681
Program received signal SIGSEGV, Segmentation fault. 0x0000000000530c37 in operator++ (this=<synthetic pointer>) at ../../../source/simulation2/system/EntityMap.h:80 80 while (val->first == INVALID_ENTITY) ++val; skip any invalid entities
(gdb) where #0 0x0000000000530c37 in operator++ (this=<synthetic pointer>) at ../../../source/simulation2/system/EntityMap.h:80 #1 CCmpRangeManager::SeeExploredEntities (this=this@entry=0x2f314d0, p=p@entry=2) at ../../../source/simulation2/components/CCmpRangeManager.cpp:1648 #2 0x000000000053107f in CCmpRangeManager::ExploreTerritories (this=0x2f314d0) at ../../../source/simulation2/components/CCmpRangeManager.cpp:1638 #3 0x0000000000528662 in call<void (ICmpRangeManager::*)()> (fptr=&virtual ICmpRangeManager::ExploreTerritories(), c=<optimized out>)
#4 ScriptInterface::callMethod<void, &class_ICmpRangeManager, ICmpRangeManager, &ICmpRangeManager::ExploreTerritories> (cx=0x2a42520, argc=<optimized out>,
#5 0x00007ffff6d546a4 in CallJSNative (args=..., native=<optimized out>, cx=0x2a42520) at ../jscntxtinlines.h:321 #6 js::Invoke (cx=cx@entry=0x2a42520, args=..., construct=construct@entry=js::NO_CONSTRUCT)
#7 0x00007ffff6d57247 in Interpret (cx=cx@entry=0x2a42520, state=...)
#8 0x00007ffff6d62508 in js::RunScript (cx=0x2a42520, state=...)
#9 0x00007ffff6d5465a in js::Invoke (cx=cx@entry=0x2a42520, args=..., construct=construct@entry=js::NO_CONSTRUCT)
#10 0x00007ffff6d64513 in js::Invoke (cx=cx@entry=0x2a42520, thisv=..., fval=..., argc=argc@entry=1, argv=argv@entry=0x7fffffffd4a8,
#11 0x00007ffff6e0d310 in JS_CallFunctionName (cx=0x2a42520, objArg=<optimized out>, name=name@entry=0x8f88ab "InitGame", argc=argc@entry=1,
#12 0x0000000000559cae in ScriptInterface::CallFunction_ (this=this@entry=0x2a42868, val=val@entry=..., name=name@entry=0x8f88ab "InitGame",
#13 0x000000000046fd18 in ScriptInterface::CallFunctionVoid<CScriptVal> (this=0x2a42868, val=val@entry=..., name=name@entry=0x8f88ab "InitGame", a0=...)
#14 0x000000000046e321 in CSimulation2::InitGame (this=0x2a4e4a0, data=...) at ../../../source/simulation2/Simulation2.cpp:663 #15 0x0000000000593792 in CGame::ReallyStartGame (this=0x2a48890) at ../../../source/ps/Game.cpp:229 #16 0x00000000004258f7 in ProgressiveLoad () at ../../../source/main.cpp:223 #17 Frame () at ../../../source/main.cpp:316 #18 RunGameOrAtlas (argc=argc@entry=3, argv=argv@entry=0x7fffffffdb18) at ../../../source/main.cpp:510 #19 0x0000000000418f17 in main (argc=3, argv=0x7fffffffdb18) at ../../../source/main.cpp:554 (gdb)