Opened 3 months ago

Closed 2 months ago

#6238 closed defect (fixed)

Segmentation fault during gamesetup

Reported by: Langbart Owned by: wraitii
Priority: Release Blocker Milestone: Alpha 25
Component: Core engine Keywords:
Cc: Patch: Phab:D4182

Description (last modified by Langbart)

At SVN [25810] I noticed a segmentation fault. I can consistently reproduce the issue by following these steps:

  • go to Single Player or Multiplayer gamesetup
  • choose Random for Map Type
  • select Polar Sea for Map
  • choose a different value for Map Filter --> BOOOOOM segmentation fault

My terminal showed these errors:

TIMER| common/global.xml: 420 us
ERROR: Errors executing script event "SelectionChange"
ERROR: JavaScript error: gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/Daytime.js line 28
g_GameSettings.map.data is undefined
  render@gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/Daytime.js:28:5
  Daytime/<@gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/Daytime.js:8:43
  _trigger@gui/common/Observable.js:45:12
  set@gui/common/Observable.js:35:11
  onMapChange@gui/gamesettings/attributes/Daytime.js:29:4
  init/<@gui/gamesettings/attributes/Daytime.js:7:38
  _trigger@gui/common/Observable.js:45:12
  set@gui/common/Observable.js:35:11
  selectMap@gui/gamesettings/attributes/Map.js:44:3
  updateMapList@gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSelection.js:104:23
  onSettingsLoaded/<@gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSelection.js:36:67
  _trigger@gui/common/Observable.js:45:12
  set@gui/common/Observable.js:35:11
  onSelectionChange@gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapFilter.js:76:3
  onSelectionChangeSuper@gui/gamesetup/Pages/GameSetupPage/GameSettings/GameSettingControlDropdown.js:52:9
Assertion failed: "index < m_GeneratedTexts.size() && "Trying to draw a Text Index within a IGUITextOwner that doesn't exist""
Location: IGUITextOwner.cpp:98 (DrawText)

Call stack:

(error while dumping stack: Function not supported)
errno = 0 (No error reported here)
OS error = ?


(C)ontinue, (S)uppress, (B)reak, Launch (D)ebugger, or (E)xit?

I did the lldb thing as well:

(lldb) bt
* thread #1, name = 'main', queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff6901c33a libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff690dce60 libsystem_pthread.dylib`pthread_kill + 430
    frame #2: 0x00007fff68fa3808 libsystem_c.dylib`abort + 120
    frame #3: 0x00007fff6620a458 libc++abi.dylib`abort_message + 231
    frame #4: 0x00007fff661fb8bf libc++abi.dylib`demangling_terminate_handler() + 262
    frame #5: 0x00007fff67d36a5f libobjc.A.dylib`_objc_terminate() + 104
    frame #6: 0x00007fff66209887 libc++abi.dylib`std::__terminate(void (*)()) + 8
    frame #7: 0x00007fff6620c1a2 libc++abi.dylib`__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 27
    frame #8: 0x00007fff6620c169 libc++abi.dylib`__cxa_throw + 113
    frame #9: 0x00007fff661ed0c8 libc++.1.dylib`std::__1::__throw_out_of_range(char const*) + 56
    frame #10: 0x00007fff661e6ee6 libc++.1.dylib`std::__1::__vector_base_common<true>::__throw_out_of_range() const + 16
    frame #11: 0x000000010048ff8f pyrogenesis`IGUITextOwner::DrawText(CCanvas2D&, unsigned long, CGUIColor const&, CVector2D const&, CRect const&) [inlined] std::__1::vector<CGUIText, std::__1::allocator<CGUIText> >::at(this=<unavailable>, __n=<unavailable>) at vector:1566:15 [opt]
    frame #12: 0x000000010048ff87 pyrogenesis`IGUITextOwner::DrawText(this=<unavailable>, canvas=<unavailable>, index=<unavailable>, color=<unavailable>, pos=<unavailable>, clipping=<unavailable>) at IGUITextOwner.cpp:100 [opt]
    frame #13: 0x000000010049a019 pyrogenesis`CDropDown::Draw(this=0x00000001070d5800, canvas=0x00007ffeefbff218) at CDropDown.cpp:457:3 [opt]
    frame #14: 0x000000010045979c pyrogenesis`CGUI::Draw(this=<unavailable>) at CGUI.cpp:346:25 [opt]
    frame #15: 0x000000010047943e pyrogenesis`CGUIManager::Draw(this=<unavailable>) const at GUIManager.cpp:374:10 [opt]
    frame #16: 0x00000001002063a4 pyrogenesis`Render() at GameSetup.cpp:263:10 [opt]
    frame #17: 0x0000000100005273 pyrogenesis`RunGameOrAtlas(int, char const**) [inlined] Frame() at main.cpp:448:3 [opt]
    frame #18: 0x00000001000049e0 pyrogenesis`RunGameOrAtlas(argc=<unavailable>, argv=<unavailable>) at main.cpp:691 [opt]
    frame #19: 0x00000001000031b6 pyrogenesis`main(argc=1, argv=0x00007ffeefbffa18) at main.cpp:743:2 [opt]
    frame #20: 0x00007fff68ed4cc9 libdyld.dylib`start + 1
    frame #21: 0x00007fff68ed4cc9 libdyld.dylib`start + 1
(lldb) 

Attachments (1)

6238_seg_fault.gif (509.2 KB ) - added by Langbart 3 months ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Langbart, 3 months ago

Description: modified (diff)

adding GIF

by Langbart, 3 months ago

Attachment: 6238_seg_fault.gif added

comment:2 by Langbart, 3 months ago

Patch: Phab:D4182

adding patch number

comment:3 by Angen, 2 months ago

Owner: set to wraitii

comment:4 by Stan, 2 months ago

Resolution: fixed
Status: newclosed

In 25829:

Fix segfault with daytime option in gamesetup.

Based on patch by: @Angen, @wraitii
Fixes #6238
Differential Revision: https://code.wildfiregames.com/D4182

Note: See TracTickets for help on using tickets.