Opened 3 years ago

Closed 3 years ago

#6200 closed defect (fixed)

Segmentation fault - Scenario Editor

Reported by: Langbart Owned by: wraitii
Priority: Release Blocker Milestone: Alpha 25
Component: Atlas editor Keywords:
Cc: Patch: Phab:D4113

Description (last modified by Stan)

When I start the Scenario Editor on the latest SVN version [25648] and follow these steps, the result is a segmentation fault:

pyrogenesis was compiled with optimization - stepping may behave oddly; variables may not be available.
Process 2619 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001010a1c80 pyrogenesis`::mozalloc_abort(msg=<unavailable>) at mozalloc_abort.cpp:33:3 [opt]
   30  	#ifdef MOZ_WIDGET_ANDROID
   31  	  abortThroughJava(msg);
   32  	#endif
-> 33  	  MOZ_CRASH();
   34  	}
   35  	
   36  	#ifdef MOZ_WIDGET_ANDROID
Target 0: (pyrogenesis) stopped.

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000001010a1c80 pyrogenesis`::mozalloc_abort(msg=<unavailable>) at mozalloc_abort.cpp:33:3 [opt]
    frame #1: 0x0000000101ab287d pyrogenesis`::abort() at mozalloc_abort.cpp:82:3 [opt]
    frame #2: 0x00000001004fa016 pyrogenesis`sys_display_error(text=<unavailable>, flags=6) at unix.cpp:268:4 [opt]
    frame #3: 0x00000001004d2308 pyrogenesis`debug_DisplayError(wchar_t const*, unsigned long, void*, wchar_t const*, wchar_t const*, int, char const*, long volatile*) [inlined] CallDisplayError(text=L"Assertion failed: \"m_Contexts.empty() && \"All contexts must be destroyed before calling JS_ShutDown!\"\"\r\nLocation: ScriptEngine.h:47 (~ScriptEngine)\r\n\r\nCall stack:\r\n\r\n(error while dumping stack: Function not supported)\r\nerrno = 0 (No error reported here)\r\nOS error = ?\r\n", flags=6) at debug.cpp:374:8 [opt]
    frame #4: 0x00000001004d22eb pyrogenesis`debug_DisplayError(description=<unavailable>, flags=6, context=0x00007ffeefbfeb30, lastFuncToSkip=<no summary available>, pathname=<no summary available>, line=<no summary available>, func=<no value available>, suppress=<no summary available>) at debug.cpp:462 [opt]
    frame #5: 0x00000001004d2b9e pyrogenesis`debug_OnAssertionFailure(expr=<no summary available>, suppress=<no summary available>, file=<no summary available>, line=<no summary available>, func=<no value available>) at debug.cpp:549:9 [opt]
    frame #6: 0x0000000100012508 pyrogenesis`ScriptEngine::~ScriptEngine(this=<no summary available>) at ScriptEngine.h:47:3 [opt]
    frame #7: 0x0000000100004c56 pyrogenesis`RunGameOrAtlas(int, char const**) [inlined] ScriptEngine::~ScriptEngine(this=<no summary available>) at ScriptEngine.h:46:2 [opt]
    frame #8: 0x0000000100004c51 pyrogenesis`RunGameOrAtlas(argc=<no summary available>, argv=<no summary available>) at main.cpp:708 [opt]
    frame #9: 0x0000000100002176 pyrogenesis`main(argc=<no summary available>, argv=<no summary available>) at main.cpp:738:2 [opt]
    frame #10: 0x00007fff71f52cc9 libdyld.dylib`start + 1
(lldb) 

The problem is not reproducible for A24b. The problem can be noticed for the first time with the changeset [25151].

Attachments (4)

25648_editor.jpg (150.0 KB ) - added by Langbart 3 years ago.
broken-popup.mp4 (1.1 MB ) - added by Stan 3 years ago.
2 174.png (778.5 KB ) - added by Stan 3 years ago.
1 177.png (749.0 KB ) - added by Stan 3 years ago.

Change History (12)

by Langbart, 3 years ago

Attachment: 25648_editor.jpg added

comment:1 by Langbart, 3 years ago

Description: modified (diff)
Summary: Segmentation fault - Sceneario editorSegmentation fault - Scenario Editor

comment:2 by Langbart, 3 years ago

Description: modified (diff)

comment:3 by Langbart, 3 years ago

Description: modified (diff)

The problem can be noticed for the first time with the changeset [25151].

comment:4 by Stan, 3 years ago

Can confirm it happens for me too on Windows.

by Stan, 3 years ago

Attachment: broken-popup.mp4 added

by Stan, 3 years ago

Attachment: 2 174.png added

by Stan, 3 years ago

Attachment: 1 177.png added

comment:5 by Stan, 3 years ago

Description: modified (diff)

comment:6 by wraitii, 3 years ago

Priority: Should HaveRelease Blocker

comment:7 by Langbart, 3 years ago

Owner: set to wraitii
Patch: Phab:D4113

comment:8 by wraitii, 3 years ago

Resolution: fixed
Status: newclosed

In 25736:

Fix atlas crash with RM capture the relic.

As no default values got set, some game settings became NaN, which triggered exceptions.
This sets sane default.

This also includes better debugging logic in case of exception, so it's easier to know what happens.

Fixes #6200

Reported by: langbart

Differential Revision: https://code.wildfiregames.com/D4113

Note: See TracTickets for help on using tickets.