Opened 7 years ago

Closed 7 years ago

Last modified 12 months ago

#2042 closed defect (fixed)

Crash if hotloading main menu while splash screen shown

Reported by: michael Owned by:
Priority: Must Have Milestone: Alpha 14
Component: Core engine Keywords: crashlog
Cc: Patch:

Description (last modified by elexis)

Launching the game gets this error dialog:

Much to our regret we must report the program has encountered an error.

Please let us know at and attach the crashlog.txt and crashlog.dmp files.

Details: unhandled exception (Access violation reading 0x01CDCE89)

Location: unknown:0 (?)

Call stack:

(error while dumping stack: No stack frames found) errno = 0 (No error reported here) OS error = 0 (no error code was set)

Attached are the requisite files.

Attachments (4)

crashlog.dmp (85.8 KB ) - added by michael 7 years ago.
Crash Log Dump
crashlog.txt (14.5 KB ) - added by michael 7 years ago.
Crash Log Text
mainlog.html (15.8 KB ) - added by michael 7 years ago.
Main Log (might not be very useful)
system_info.txt (13.3 KB ) - added by michael 7 years ago.
System Info

Download all attachments as: .zip

Change History (9)

by michael, 7 years ago

Attachment: crashlog.dmp added

Crash Log Dump

by michael, 7 years ago

Attachment: crashlog.txt added

Crash Log Text

by michael, 7 years ago

Attachment: mainlog.html added

Main Log (might not be very useful)

by michael, 7 years ago

Attachment: system_info.txt added

System Info

comment:1 by michael, 7 years ago

Launching the game a 2nd time works, but then a lot of the text is messed up, like so:

comment:2 by historic_bruno, 7 years ago

Keywords: crashlog added; Crash removed
Milestone: BacklogAlpha 14
Summary: Game crashes on startupCrash if hotloading main menu while splash screen shown

The crash is related to hotloading:

>	pyrogenesis.exe!boost::unordered::detail::table_impl<boost::unordered::detail::set<std::allocator<Path>,Path,boost::hash<Path>,std::equal_to<Path> > >::find_node_impl<Path,std::equal_to<Path> >(unsigned int key_hash=1293980258, const Path & k={...}, const std::equal_to<Path> & eq=equal_to)  Line 236 + 0xb bytes	C++
 	pyrogenesis.exe!CGUIManager::ReloadChangedFiles(const Path & path={...})  Line 176 + 0x89 bytes	C++
 	pyrogenesis.exe!ReloadChangedFiles()  Line 87 + 0x10 bytes	C++
 	pyrogenesis.exe!Frame()  Line 347	C++
 	pyrogenesis.exe!RunGameOrAtlas(int argc=1, const char * * argv=0x02951578)  Line 508 + 0x5 bytes	C++
 	pyrogenesis.exe!main(int argc=1, char * * argv=0x02951578)  Line 551 + 0xf bytes	C++
 	pyrogenesis.exe!wmain(int argc=1, wchar_t * * argv=0x02956ed8)  Line 380 + 0xb bytes	C++
 	pyrogenesis.exe!__tmainCRTStartup()  Line 583 + 0x17 bytes	C
 	pyrogenesis.exe!CallStartupWithinTryBlock()  Line 397	C++
 	kernel32.dll!@BaseThreadInitThunk@12()  + 0xe bytes	
 	ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes	
 	ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes	

and from the main log (which is very useful in this case):

GUI file 'gui/common/functions_utility.js' changed - reloading page 'page_pregame.xml'

Can you check recent mainlog.htmls and see if it also mentions files being changed? Any idea how these files could be changed while the game is loading (assuming they are)?

Another thing that might help is to see more debugging info during startup, so if you can run Microsoft's free DebugView utility, and then run 0 A.D. After you encounter the problems, copy and paste the logged output from DebugView.

That's strange but ultimately shouldn't be causing a crash, the problem is the main menu is loading the splash screen during init. Per comments in CGUIManager::ReloadChangedFiles, modifying the page stack in GUI init scripts can invalidate the page stack iterators during hotloading, causing the crash. In fact I am able to reproduce the crash by modifying mainmenu.js while the splash screen is shown.

comment:3 by ben, 7 years ago

In 13597:

Fixes crash when hotloading main menu while splash screen shown (don't alter GUI page stack in init functions), refs #2042

comment:4 by Kieran P, 7 years ago

Resolution: fixed
Status: newclosed

comment:5 by elexis, 12 months ago

Description: modified (diff)

This seems more like a workaround.

Some random developer might want to move it from onTick to init because its obviously unneeded from a naive pov, and then only by chance later notice that this triggers a crash in case of hotloading or in case of JS error upon closing (as noticed during programming of D2240).

Hence duplicate ticket at #5578.

Note: See TracTickets for help on using tickets.