Editor crashes on Mac

Have trouble running Legend of Grimrock 2 or do you have questions about the purchasing options? Look for help here.
TheAdder
Posts: 26
Joined: Sat Mar 28, 2015 4:56 pm

Re: Editor crashes on Mac

Post by TheAdder »

Ok, lets see if I can take this step by step because I assure you it makes absolutely no sense, and if it was a graphics driver issue then it just wouldn't work at all. Please read each of these steps I just took, and try to make sense of them.

1) I load the editor.
2) I create a new dungeon.
3) I place tiles and walls and items in the dungeon.
4) I press PLAY and walk around my dungeon.
5) I grab the corners of the editor window and resize the window as much as I like.
6) I press the MAXIMISE button twice to maximise and then return the window to the previous size.

All of this works. At this point, everything is fine, so obviously there are no graphics driver issues or anything like that.

7) I go to the FILE menu and select SAVE.
8) I test all of the above resizing and drawing after saving, still everything works fine.
9) I go to the FILE menu and select LOAD and select the dungeon I just saved from the load dialog. The dungeon appears to load and I am returned to the editor window with the dungeon displayed.
10) I try to select an item from the list on the left, or click any button, or anywhere in the window, and now nothing happens. Everything is frozen.
11) I resize the window, and the contents go all pixelated and blocky as shown in the screen shot above. Eventually, after a minute or two, the beachball appears and then the software crashes.

Now: What sort of graphics driver issues would cause the graphics to work perfectly, including resizing the window, until I save and reload a file? Clearly, there is a fundamental problem with something in the Grimrock source code which only happens during loading and which is now causing a conflict with my system.
User avatar
Dr.Disaster
Posts: 2874
Joined: Wed Aug 15, 2012 11:48 am

Re: Editor crashes on Mac

Post by Dr.Disaster »

Well i can do all that with both LoG 1 and 2 running Yosemite 10.10.2 with all updates installed without problems.
I can even resize and walk thru my map at the same time and the editor does not crash.

posted from my Hackintosh
TheAdder
Posts: 26
Joined: Sat Mar 28, 2015 4:56 pm

Re: Editor crashes on Mac

Post by TheAdder »

Well, I can do everything perfectly until I try and reload. It's perplexing. Would be nice to get feedback from Almost Human.
User avatar
Dr.Disaster
Posts: 2874
Joined: Wed Aug 15, 2012 11:48 am

Re: Editor crashes on Mac

Post by Dr.Disaster »

After applying the Yosemite 10.10.3 upgrade to my Hackintosh installation both the LoG 1 and 2 editors are no longer able to load a saved project. Under 10.10.2 both editors worked fine.

New projects work fine BUT! once you try to load something things go nuts!
When opening a previously and/or newly saved project it appears to load fine but then it's apparent something is wrong. Resizing the editor window cases the same gfx problems TheAlder has reported. Trying anything else causes the rainbow wheel to spin and finally generates an OS X crash message. Sometimes loading also results into a LoG Popup window titled "Software Failure" showing the error message "C++ Exception".

Crash log for LoG 1 editor (too large to post):

Code: Select all

Process:               Legend of Grimrock [654]
Path:                  /Users/USER/Library/Application Support/Steam/*/Legend of Grimrock.app/Contents/MacOS/Legend of Grimrock
Identifier:            com.almosthuman.Legend-of-Grimrock
Version:               1.3.7 (1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Legend of Grimrock [654]
User ID:               501

Date/Time:             2015-04-11 12:56:00.476 +0200
OS Version:            Mac OS X 10.10.3 (14D131)
Report Version:        11
Anonymous UUID:        A90818AC-FF1F-5B1E-2753-5B2757B11B4B


Time Awake Since Boot: 1600 seconds

Crashed Thread:        0  MainThrd  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
--> 
    __TEXT                 0000000000010000-0000000000039000 [  164K] r-x/rwx SM=COW  /Applications/Steam.app/Contents/MacOS/gameoverlayrenderer.dylib

Thread 0 Crashed:: MainThrd  Dispatch queue: com.apple.main-thread
0   com.almosthuman.Legend-of-Grimrock	0x000000010003e11e 0x100000000 + 254238
1   com.almosthuman.Legend-of-Grimrock	0x000000010004ca33 0x100000000 + 313907
2   com.almosthuman.Legend-of-Grimrock	0x00000001000643e4 0x100000000 + 410596
3   com.almosthuman.Legend-of-Grimrock	0x00000001001ff59b 0x100000000 + 2094491
4   com.almosthuman.Legend-of-Grimrock	0x000000010020b746 0x100000000 + 2144070
5   com.almosthuman.Legend-of-Grimrock	0x000000010007a830 0x100000000 + 501808
6   com.almosthuman.Legend-of-Grimrock	0x0000000100078885 0x100000000 + 493701
7   com.almosthuman.Legend-of-Grimrock	0x0000000100001d63 0x100000000 + 7523
8   com.almosthuman.Legend-of-Grimrock	0x0000000100001b64 0x100000000 + 7012

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib        	0x00007fff9c04a232 kevent64 + 10
1   libdispatch.dylib             	0x00007fff8d6e7a6a _dispatch_mgr_thread + 52

Thread 2:: IOPollingHelperThread
0   libsystem_kernel.dylib        	0x00007fff9c04a21a kevent + 10
1   libtier0_s.dylib              	0x0000000009e4123f CatchAndWriteContext_t::Invoke() + 111
2   libtier0_s.dylib              	0x0000000009e40c7b CatchAndWriteMiniDump_Impl(CatchAndWriteContext_t&) + 209
3   libtier0_s.dylib              	0x0000000009e40d4f CatchAndWriteMiniDumpExForVoidPtrFn + 78
4   steamclient.dylib             	0x0000000008964a53 OSXHelpers::CIOPollingHelper::Run() + 27
5   libtier0_s.dylib              	0x0000000009e44ef1 SteamThreadTools::CThread::ThreadExceptionWrapper(void*) + 15
6   libtier0_s.dylib              	0x0000000009e4123f CatchAndWriteContext_t::Invoke() + 111
7   libtier0_s.dylib              	0x0000000009e40c7b CatchAndWriteMiniDump_Impl(CatchAndWriteContext_t&) + 209
8   libtier0_s.dylib              	0x0000000009e40d4f CatchAndWriteMiniDumpExForVoidPtrFn + 78
9   libtier0_s.dylib              	0x0000000009e44e65 SteamThreadTools::CThread::ThreadProc(void*) + 205
10  libsystem_pthread.dylib       	0x00007fff9bc65268 _pthread_body + 131
11  libsystem_pthread.dylib       	0x00007fff9bc651e5 _pthread_start + 176
12  libsystem_pthread.dylib       	0x00007fff9bc6341d thread_start + 13

Thread 3:
0   libsystem_kernel.dylib        	0x00007fff9c0444de mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9c04364f mach_msg + 55
2   com.apple.CoreFoundation      	0x00007fff903adeb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation      	0x00007fff903ad37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation      	0x00007fff903acbd8 CFRunLoopRunSpecific + 296
5   com.apple.AppKit              	0x00007fff9721466b _NSEventThread + 137
6   libsystem_pthread.dylib       	0x00007fff9bc65268 _pthread_body + 131
7   libsystem_pthread.dylib       	0x00007fff9bc651e5 _pthread_start + 176
8   libsystem_pthread.dylib       	0x00007fff9bc6341d thread_start + 13

Thread 4:: com.apple.audio.IOThread.client
0   libsystem_kernel.dylib        	0x00007fff9c0444de mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9c04364f mach_msg + 55
2   com.apple.audio.CoreAudio     	0x00007fff9533d57e HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned int, unsigned int, mach_msg_header_t*, bool, unsigned int) + 98
3   com.apple.audio.CoreAudio     	0x00007fff9533d50c HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 42
4   com.apple.audio.CoreAudio     	0x00007fff9533baa9 HALC_ProxyIOContext::IOWorkLoop() + 965
5   com.apple.audio.CoreAudio     	0x00007fff9533b612 HALC_ProxyIOContext::IOThreadEntry(void*) + 88
6   com.apple.audio.CoreAudio     	0x00007fff9533b4e3 HALB_IOThread::Entry(void*) + 157
7   libsystem_pthread.dylib       	0x00007fff9bc65268 _pthread_body + 131
8   libsystem_pthread.dylib       	0x00007fff9bc651e5 _pthread_start + 176
9   libsystem_pthread.dylib       	0x00007fff9bc6341d thread_start + 13

Thread 5:
0   libsystem_kernel.dylib        	0x00007fff9c04994a __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff9bc6340d start_wqthread + 13

Thread 6:
0   libsystem_kernel.dylib        	0x00007fff9c04994a __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff9bc6340d start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000337db0  rcx: 0x0000000000337f80  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x0000000000338880  rbp: 0x00007fff5fbfe940  rsp: 0x00007fff5fbfe880
   r8: 0x0000000000000000   r9: 0x0000000000337db0  r10: 0x00000000003381c0  r11: 0x0000000000338400
  r12: 0x0000000000000038  r13: 0x0000000000000000  r14: 0x0000000000338640  r15: 0x0000000000000000
  rip: 0x000000010003e11e  rfl: 0x0000000000010246  cr2: 0x0000000000000000
  
Logical CPU:     0
Error Code:      0x00000006
Trap Number:     14

Crash log for LoG 2 editor (too large to post):

Code: Select all

Process:               grimrock2 [720]
Path:                  /Users/USER/Library/Application Support/Steam/*/Legend of Grimrock 2.app/Contents/MacOS/grimrock2
Identifier:            com.almosthuman.Legend-of-Grimrock-2
Version:               2.0.0 (2.0.0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           grimrock2 [720]
User ID:               501

Date/Time:             2015-04-11 13:17:12.898 +0200
OS Version:            Mac OS X 10.10.3 (14D131)
Report Version:        11
Anonymous UUID:        A90818AC-FF1F-5B1E-2753-5B2757B11B4B


Time Awake Since Boot: 2900 seconds

Crashed Thread:        0  MainThrd  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
--> 
    Kernel Alloc Once      0000000006546000-0000000006547000 [    4K] rw-/rwx SM=PRV  

Thread 0 Crashed:: MainThrd  Dispatch queue: com.apple.main-thread
0   com.almosthuman.Legend-of-Grimrock-2	0x00000001065e026d engine::RenderContextGL::resizeWindow(int, int) + 2093
1   com.almosthuman.Legend-of-Grimrock-2	0x00000001065add03 engine::Material::operator=(engine::Material const&) + 29171
2   com.almosthuman.Legend-of-Grimrock-2	0x00000001065b0335 void std::__adjust_heap<engine::Mesh::SortVertex*, long, engine::Mesh::SortVertex>(engine::Mesh::SortVertex*, long, long, engine::Mesh::SortVertex) + 2981
3   com.almosthuman.Legend-of-Grimrock-2	0x00000001065b2594 void std::__adjust_heap<engine::Mesh::SortVertex*, long, engine::Mesh::SortVertex>(engine::Mesh::SortVertex*, long, long, engine::Mesh::SortVertex) + 11780
4   com.almosthuman.Legend-of-Grimrock-2	0x000000010654d27f core::Array<Breakpoint>::remove(int, int) + 62911
5   com.almosthuman.Legend-of-Grimrock-2	0x0000000106778e48 core::SharedPtr<core::Menu>::SharedPtr(core::Menu*) + 1622648
6   com.almosthuman.Legend-of-Grimrock-2	0x00000001067850c6 core::SharedPtr<core::Menu>::SharedPtr(core::Menu*) + 1672438
7   com.almosthuman.Legend-of-Grimrock-2	0x000000010656f9dd error(char const*, ...) + 8509
8   com.almosthuman.Legend-of-Grimrock-2	0x000000010656513d core::SharedPtr<HeightmapBuilder>::release(HeightmapBuilder*) + 3229
9   com.almosthuman.Legend-of-Grimrock-2	0x00000001065e8ad3 engine::VPXPlayerGL::TextureSet::~TextureSet() + 931
10  com.almosthuman.Legend-of-Grimrock-2	0x0000000106537f84 0x106536000 + 8068

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib        	0x00007fff9c04a232 kevent64 + 10
1   libdispatch.dylib             	0x00007fff8d6e7a6a _dispatch_mgr_thread + 52

Thread 2:
0   libsystem_kernel.dylib        	0x00007fff9c04994a __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff9bc6340d start_wqthread + 13

Thread 3:: IOPollingHelperThread
0   libsystem_kernel.dylib        	0x00007fff9c04a21a kevent + 10
1   libtier0_s.dylib              	0x000000000ce8a23f CatchAndWriteContext_t::Invoke() + 111
2   libtier0_s.dylib              	0x000000000ce89c7b CatchAndWriteMiniDump_Impl(CatchAndWriteContext_t&) + 209
3   libtier0_s.dylib              	0x000000000ce89d4f CatchAndWriteMiniDumpExForVoidPtrFn + 78
4   steamclient.dylib             	0x000000000b9ada53 OSXHelpers::CIOPollingHelper::Run() + 27
5   libtier0_s.dylib              	0x000000000ce8def1 SteamThreadTools::CThread::ThreadExceptionWrapper(void*) + 15
6   libtier0_s.dylib              	0x000000000ce8a23f CatchAndWriteContext_t::Invoke() + 111
7   libtier0_s.dylib              	0x000000000ce89c7b CatchAndWriteMiniDump_Impl(CatchAndWriteContext_t&) + 209
8   libtier0_s.dylib              	0x000000000ce89d4f CatchAndWriteMiniDumpExForVoidPtrFn + 78
9   libtier0_s.dylib              	0x000000000ce8de65 SteamThreadTools::CThread::ThreadProc(void*) + 205
10  libsystem_pthread.dylib       	0x00007fff9bc65268 _pthread_body + 131
11  libsystem_pthread.dylib       	0x00007fff9bc651e5 _pthread_start + 176
12  libsystem_pthread.dylib       	0x00007fff9bc6341d thread_start + 13

Thread 4:
0   libsystem_kernel.dylib        	0x00007fff9c0444de mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9c04364f mach_msg + 55
2   com.apple.CoreFoundation      	0x00007fff903adeb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation      	0x00007fff903ad37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation      	0x00007fff903acbd8 CFRunLoopRunSpecific + 296
5   com.apple.AppKit              	0x00007fff9721466b _NSEventThread + 137
6   libsystem_pthread.dylib       	0x00007fff9bc65268 _pthread_body + 131
7   libsystem_pthread.dylib       	0x00007fff9bc651e5 _pthread_start + 176
8   libsystem_pthread.dylib       	0x00007fff9bc6341d thread_start + 13

Thread 5:: com.apple.audio.IOThread.client
0   libsystem_kernel.dylib        	0x00007fff9c0444de mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff9c04364f mach_msg + 55
2   com.apple.audio.CoreAudio     	0x00007fff9533d57e HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned int, unsigned int, mach_msg_header_t*, bool, unsigned int) + 98
3   com.apple.audio.CoreAudio     	0x00007fff9533d50c HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 42
4   com.apple.audio.CoreAudio     	0x00007fff9533baa9 HALC_ProxyIOContext::IOWorkLoop() + 965
5   com.apple.audio.CoreAudio     	0x00007fff9533b612 HALC_ProxyIOContext::IOThreadEntry(void*) + 88
6   com.apple.audio.CoreAudio     	0x00007fff9533b4e3 HALB_IOThread::Entry(void*) + 157
7   libsystem_pthread.dylib       	0x00007fff9bc65268 _pthread_body + 131
8   libsystem_pthread.dylib       	0x00007fff9bc651e5 _pthread_start + 176
9   libsystem_pthread.dylib       	0x00007fff9bc6341d thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00007fc63b40e050  rcx: 0x00006180002524b0  rdx: 0x0000000000008800
  rdi: 0x0000000000000000  rsi: 0x0000000000008892  rbp: 0x00007fff596c8fa0  rsp: 0x00007fff596c8eb0
   r8: 0x0000618000037380   r9: 0x0000618000254670  r10: 0x0000000085bf6906  r11: 0x000000391debe237
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x000061800024ca80  r15: 0x0000618000149950
  rip: 0x00000001065e026d  rfl: 0x0000000000010246  cr2: 0x0000000000000000
  
Logical CPU:     6
Error Code:      0x00000006
Trap Number:     14
posted from my Hackintosh

EDIT
Just completed a full fresh reinstall of 10.10.3 and the problem persists!
Apple definetly broke something here so AH will has to do some digging.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Editor crashes on Mac

Post by petri »

Hi! I don't have 10.10.3 installed (yet). Could you try this, please?

1. Launch editor
2. Wait for Steam overlay pop up to appear.
3. Open a project

Does it crash this way?
alois
Posts: 112
Joined: Mon Feb 18, 2013 7:29 am

Re: Editor crashes on Mac

Post by alois »

10.10.3 here.

1) Launched Grimrock, waited for Steam logo to disappear, opened a dungeon -> everything OK
2) Launched Grimrock, went straight to the editor, tried to open a file while the Steam logo was still there -> crash

Alois :)
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Editor crashes on Mac

Post by petri »

Thanks! I think Steam overlay tries to open in the File Open dialog and this causes OpenGL to blow up. I'll contact Valve..

Dr. Disaster and OP, could you confirm this?
User avatar
Dr.Disaster
Posts: 2874
Joined: Wed Aug 15, 2012 11:48 am

Re: Editor crashes on Mac

Post by Dr.Disaster »

I'll retest to make sure!

AFAIR from yesterday's tests both editors always crashed only in different fashions. The kind of OS installation made no difference, upgraded to 10.10.3 or fresh installed.

Opening a project right away (with the overlay logo still present) resulted in the C++ Exception messages. Waiting a while before opening resulted in a load that appeared ok but then ended in the crashes reported further up by trying to playtest or modify the map.

EDIT
After disabling the Steam overlay both editors still crash.

some LoG 1 examples:
- open editor
- hit green button to access all the editor buttons
- select menu "File" -> "Open Project"
- click "Cancel"
- hit green button again -> weird colors in editor window -> editor is frozen
- further actions/clicks in the window leads to a crash

- restart LoG 1
- open editor
- hit green button to access all the editor buttons
- select menu "File" -> "Open Project"
- select a previously saved project file and click "Open"
-> sometimes the "C++ Exception" pops up, otherwise the project seems to load fine
- hit green button again -> see above

- restart LoG 1
- open editor
- hit green button to access all the editor buttons
- select menu "File" -> "Open Project"
- select a previously saved project file and click "Open" -> the project seems to load fine
- select menu "File" -> "Back to Main Menu" -> LoG "Software Failure" popup window stating this:

Code: Select all

[string "GameMode.lua"]:0: Could not set render targets (glCheckFramebufferStatus returned 0)
stack traceback:
	[C]: in function 'renderScene'
	[string "GameMode.lua"]: in function 'update'
	[string "Grimrock.lua"]: in function 'display'
	[string "Grimrock.lua"]: in main chunk
some LoG 2 examples:
- open editor
- hit green button to access all the editor buttons
- select menu "File" -> "Open Project"
- click "Cancel"
- hit green button -> weird colors in editor window -> editor is frozen
- further actions/clicks in the window leads to a crash

- restart LoG 2
- open editor
- hit green button to access all the editor buttons
- select menu "File" -> "Open Project"
- select a previously saved project file and click "Open"
-> sometimes the "C++ Exception" pops up, otherwise the project seems to load fine
- hit green button -> see above
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Editor crashes on Mac

Post by petri »

I have been trying to reproduce this issue for a day now and so far I have only seen the screen corruption issue once and that was just before Steam updated itself. The Steam overlay bug on the other hand is known and reported to Valve: if the file dialog opens before Steam, Steam overlay will inject into the File Open dialog and this will blow up OpenGL on Yosemite. I can't think of any workaround for this issue as the overlay is a complete black box and I don't have control over it. I'm currently waiting for Valve's advice on the overlay issue.
User avatar
Dr.Disaster
Posts: 2874
Joined: Wed Aug 15, 2012 11:48 am

Re: Editor crashes on Mac

Post by Dr.Disaster »

As stated above i disabled the Steam overlay from interacting with both games before retesting.

Without the overlay the editor behavior remains unchanged for 10.10.3 using the latest Steam client. Once the screen corruptions starts with the editor window ("Open Project" + green button) it just needs a few more clicks into the editor window to crash it.

Under 10.8.5 everything is fine.

Of course it would be good to hear from anybody else running 10.10.3.
Post Reply