deathkiller / jazz2

🎮 · Jazz² Resurrection: Open-source reimplementation of Jazz Jackrabbit 2
https://deat.tk/jazz2/
GNU General Public License v3.0
492 stars 18 forks source link

Crash on launch (macOS 12.1 on M1 Max MacBook Pro) #65

Closed Kreeblah closed 2 years ago

Kreeblah commented 2 years ago

I just tried 0.6.8 on macOS 12.1 on an M1 Max MacBook Pro, and it seems to crash on launch. This is what I get when I run mono Jazz2.exe:

 ˙ Using 'DefaultAssemblyLoader' to load plugins.
 ˙ Environment Info: 
  Current Directory: /Users/kreeblah/Downloads/Jazz2
  Command Line: /Users/kreeblah/Downloads/Jazz2/Jazz2.exe
  Operating System: Unix 21.2.0.0
  64 Bit OS: True
  64 Bit Process: True
  CLR Version: 4.0.30319.42000
  Processor Count: 10
 ˙ Currently Loaded Assemblies:
  mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
  Jazz2, Version=0.6.8.0, Culture=neutral, PublicKeyToken=null
  System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
  System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
 ˙ Plugin Base Directories:
  /Users/kreeblah/Downloads/Jazz2/Extensions
 ˙ Available Assembly Paths:
  /Users/kreeblah/Downloads/Jazz2/Extensions/GL21Backend.core.dll
  /Users/kreeblah/Downloads/Jazz2/Extensions/OpenTKBackend.core.dll
  /Users/kreeblah/Downloads/Jazz2/Extensions/OpenALSoft.x64.dll
  /Users/kreeblah/Downloads/Jazz2/Extensions/OpenALSoft.x86.dll
 ˙ Assembly loaded: GL21Backend, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 ˙ Assembly loaded: Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
 ˙ Assembly loaded: OpenTKBackend, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 ˙ Assembly loaded: OpenTK, Version=1.2.2.0, Culture=neutral, PublicKeyToken=null
 ˙ Initializing OpenTK...
   ˙ Platform Backend: Default
EnableHighResolution: True
 ˙ Active graphics backend: OpenGL 2.1
 ˙ Assembly loaded: System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 ˙ Available display devices:
 ˙ First : 1728x1117 at 120 Hz, 32 bpp, pos [   0,   0] (Primary)
 ˙ Available audio devices:
  MacBook Pro Speakers (Default)
 ˙ Current device: MacBook Pro Speakers
 ˙   OpenAL Version: 1.1
  Vendor: Apple Computer Inc.
  Renderer: Software
  Effects: False
 ˙ Initializing core plugins...
 ˙ DualityApp initialized
Debug Mode: False
Command line arguments: 
 ˙ Window Specification: 
  Buffers: 2
  Samples: 0
  ColorFormat: 32 (8888)
  AccumFormat: 0 (0000)
  Depth: 32
  Stencil: 0
  VSync: On
  SwapInterval: 1

=================================================================
    Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x10084f7c9 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_dump_native_crash_info
    0x1007e769e - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_handle_native_crash
    0x100849946 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : altstack_handle_and_restore

=================================================================
    Telemetry Dumper:
=================================================================
Pkilling 0x12981981184x from 0x8604644864x
Pkilling 0x12977127424x from 0x8604644864x
Entering thread summarizer pause from 0x8604644864x
Finished thread summarizer pause from 0x8604644864x.
Failed to create breadcrumb file (null)/crash_hash_0x0

Waiting for dumping threads to resume

=================================================================
    External Debugger Dump:
=================================================================

=================================================================
    Basic Fault Address Reporting
=================================================================
instruction pointer is NULL, skip dumping
=================================================================
    Managed Stacktrace:
=================================================================
=================================================================

The importer worked fine, so mono is at least running some applications, but it seems to crash on the main Jazz2.exe binary. I do see some x86 and x64 libraries for OpenAL in referenced in there, so is it possible that there might need to be ARM versions of those for this to run?

deathkiller commented 2 years ago

OpenAL should be part of macOS and it seems it's loaded correctly. These DLLs are for Windows (and .so for Linux). You can try to delete libopenmpt.dll, libopenmpt.so, openmpt-*.dll, OpenALSoft.*.dll files, maybe there is some collision.

Kreeblah commented 2 years ago

Hmmm. I just tried that, and it crashed again, pretty much at the same place.

 ˙ Using 'DefaultAssemblyLoader' to load plugins.
 ˙ Environment Info: 
  Current Directory: /Users/kreeblah/Downloads/Jazz2
  Command Line: /Users/kreeblah/Downloads/Jazz2/Jazz2.exe
  Operating System: Unix 21.2.0.0
  64 Bit OS: True
  64 Bit Process: True
  CLR Version: 4.0.30319.42000
  Processor Count: 10
 ˙ Currently Loaded Assemblies:
  mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
  Jazz2, Version=0.6.8.0, Culture=neutral, PublicKeyToken=null
  System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
  System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
 ˙ Plugin Base Directories:
  /Users/kreeblah/Downloads/Jazz2/Extensions
 ˙ Available Assembly Paths:
  /Users/kreeblah/Downloads/Jazz2/Extensions/GL21Backend.core.dll
  /Users/kreeblah/Downloads/Jazz2/Extensions/OpenTKBackend.core.dll
 ˙ Assembly loaded: GL21Backend, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 ˙ Assembly loaded: Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
 ˙ Assembly loaded: OpenTKBackend, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 ˙ Assembly loaded: OpenTK, Version=1.2.2.0, Culture=neutral, PublicKeyToken=null
 ˙ Initializing OpenTK...
   ˙ Platform Backend: Default
EnableHighResolution: True
 ˙ Active graphics backend: OpenGL 2.1
 ˙ Assembly loaded: System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 ˙ Available display devices:
 ˙ First : 1728x1117 at 120 Hz, 32 bpp, pos [   0,   0] (Primary)
 ˙ Available audio devices:
  MacBook Pro Speakers (Default)
 ˙ Current device: MacBook Pro Speakers
 ˙   OpenAL Version: 1.1
  Vendor: Apple Computer Inc.
  Renderer: Software
  Effects: False
 ˙ Initializing core plugins...
 ˙ DualityApp initialized
Debug Mode: False
Command line arguments: 
 ˙ Window Specification: 
  Buffers: 2
  Samples: 0
  ColorFormat: 32 (8888)
  AccumFormat: 0 (0000)
  Depth: 32
  Stencil: 0
  VSync: On
  SwapInterval: 1

=================================================================
    Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x1009fb7c9 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_dump_native_crash_info
    0x10099369e - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : mono_handle_native_crash
    0x1009f5946 - /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono-sgen64 : altstack_handle_and_restore

=================================================================
    Telemetry Dumper:
=================================================================
Pkilling 0x12981215232x from 0x8606979584x
Pkilling 0x12986060800x from 0x8606979584x
Entering thread summarizer pause from 0x8606979584x
Finished thread summarizer pause from 0x8606979584x.
Failed to create breadcrumb file (null)/crash_hash_0x0

Waiting for dumping threads to resume

=================================================================
    External Debugger Dump:
=================================================================

=================================================================
    Basic Fault Address Reporting
=================================================================
instruction pointer is NULL, skip dumping
=================================================================
    Managed Stacktrace:
=================================================================
=================================================================
deathkiller commented 2 years ago

It could be some bug in mono or OpenTK library, but this crash report says nothing. The only way to fix it is to use debugger, step through the code and find the place where it crashes.

Kreeblah commented 2 years ago

Hmmm. K. I was afraid you'd say that. I'll have to find some time to figure out the mono debugger, then.

deathkiller commented 2 years ago

This should be fixed in new C++ version, so this will not be resolved in this C# version.