pianobooster / PianoBooster

A MIDI file player/game that displays the musical notes and teaches you how to play the piano.
Other
397 stars 74 forks source link

Apple silicon support #296

Closed koaie closed 3 years ago

koaie commented 3 years ago

Pianoboosts sucessfully compiles however it does not run under apple silicone. Here is a log dump at runtime.

Process:               pianobooster [35565]
Path:                  /Users/USER/Documents/*/pianobooster.app/Contents/MacOS/pianobooster
Identifier:            ???
Version:               ??? (???)
Code Type:             ARM-64 (Native)
Parent Process:        ??? [1]
Responsible:           pianobooster [35565]
User ID:               501

Date/Time:             2021-04-21 09:37:47.559 +0100
OS Version:            macOS 11.2.3 (20D91)
Report Version:        12
Anonymous UUID:        2AB7AC7B-73A9-C4C3-FDE0-3067E3F61669

Sleep/Wake UUID:       9E0180DC-5646-46AB-84CF-E4569B037472

Time Awake Since Boot: 180000 seconds
Time Since Wake:       4800 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x0000000104f44000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x2

kernel messages:

VM Regions Near 0x104f44000:
    __LINKEDIT                  104f00000-104f44000    [  272K] r--/r-- SM=COW  /Users/*/Documents/*/pianobooster.app/Contents/MacOS/pianobooster
--> mapped file                 104f44000-104f48000    [   16K] r--/r-x SM=PRV  Object_id=bb145bed
    __TEXT                      105108000-105184000    [  496K] r-x/r-x SM=COW  /usr/lib/dyld

Application Specific Information:
dyld: launch, loading dependent libraries
@executable_path/../Frameworks/QtXml.framework/Versions/5/QtXml

Thread 0 Crashed:
0   dyld                            0x0000000105164780 bcmp + 16
1   dyld                            0x0000000105125408 ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) + 136
2   dyld                            0x000000010512c3b8 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 268
3   dyld                            0x0000000105123ffc ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 172
4   dyld                            0x000000010510c290 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 668
5   dyld                            0x0000000105114dd8 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1328
6   dyld                            0x0000000105114824 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 208
7   dyld                            0x000000010511433c dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 600
8   dyld                            0x0000000105113cf0 dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 212
9   dyld                            0x000000010510be0c dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 468
10  dyld                            0x000000010510b9b0 dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + 196
11  dyld                            0x000000010511577c dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*, unsigned int&) + 56
12  dyld                            0x000000010511f9d4 ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&, char const*) + 344
13  dyld                            0x000000010511e1ac ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&, char const*) + 160
14  dyld                            0x000000010510e5f4 dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&, unsigned int) + 328
15  dyld                            0x0000000105110928 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6764
16  dyld                            0x0000000105109258 dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 476
17  dyld                            0x0000000105109038 _dyld_start + 56

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000104f44000   x1: 0x000000016af8db30   x2: 0x00000000000007e8   x3: 0x0000000000040001
    x4: 0x0000000000000003   x5: 0x0000000000000000   x6: 0x000000010518c280   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x000000016af8e0e8  x10: 0x0000000000000001  x11: 0x0001803000000000
   x12: 0x0000000000000032  x13: 0x0004000000000000  x14: 0x000000000004d9c8  x15: 0x000000016af8e068
   x16: 0x00000000000000c5  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000105191ae0
   x20: 0x00000000000007f8  x21: 0x000000016af8db30  x22: 0x0000000104f44000  x23: 0x0000000000000003
   x24: 0x000000016af8e318  x25: 0x000000016af95c48  x26: 0x000000016af95dc0  x27: 0x000000016af8db30
   x28: 0x0000000000000005   fp: 0x000000016af8d530   lr: 0x0000000105125408
    sp: 0x000000016af8d4f0   pc: 0x0000000105164780 cpsr: 0x20000000
   far: 0x0000000104f44000  esr: 0x92000007

Binary Images:
       0x104e68000 -        0x104ef3fff + (??? - ???) <A35D46EB-1F0A-38F3-8B8F-F53711D71F1B> /Users/USER/Documents/*/pianobooster.app/Contents/MacOS/pianobooster
       0x105108000 -        0x105183fff  dyld (832.7.3) <4AB185B3-DC20-3C03-A193-67C0E6C589D7> /usr/lib/dyld
       0x1880a5000 -        0x18854efff  com.apple.CoreFoundation (6.9 - 1774.101) <EA76C90A-23ED-3791-8FBC-8292916F0B16> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x189832000 -        0x189e57fff  com.apple.audio.CoreAudio (5.0 - 5.0) <2A4CD49F-AB5D-3155-9889-2A388B4505DE> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
       0x19bb3e000 -        0x19bbabfff  com.apple.audio.midi.CoreMIDI (2.0 - 88) <43789324-312A-35F9-9291-DFA2CA6A5FD6> /System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI
       0x1ca8a2000 -        0x1ca8b1fff  com.apple.opengl (18.1.1 - 18.1.1) <3172E66B-6B24-3178-8E0C-90D49EBD5C24> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 2847271
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=492.3M resident=0K(0%) swapped_out_or_unallocated=492.3M(100%)
Writable regions: Total=8384K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8384K(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
STACK GUARD                       56.0M        1 
Stack                             8176K        1 
__AUTH                              10K        3 
__AUTH_CONST                      1115K        4 
__DATA                             306K        7 
__DATA_CONST                      2128K        6 
__DATA_DIRTY                        32K        2 
__LINKEDIT                       480.0M        4 
__OBJC_CONST                        30K        3 
__TEXT                            12.3M        6 
__UNICODE                          588K        1 
mapped file                         16K        1 
===========                     =======  ======= 
TOTAL                            560.4M       39 

Model: MacBookAir10,1, BootROM 6723.81.1, proc 8:4:4 processors, 8 GB, SMC 
Graphics: kHW_AppleM1Item, Apple M1, spdisplays_builtin
Memory Module: lp_ddr4
AirPort: spairport_wireless_card_type_airport_extreme, wl0: Dec 31 2020 21:39:03 version 18.20.222.20.7.8.104 FWID 01-1b2645bc
Bluetooth: Version 8.0.3d9, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.1 Bus
USB Device: USB 3.1 Bus
Thunderbolt Bus: MacBook Air, Apple Inc.
Thunderbolt Bus: MacBook Air, Apple Inc.
louis-barman commented 3 years ago

Hello @koaie Did you close this issue because you manage to get this working on Apple Silicon? I would be interested to know. If it does not work please can you try the wip/opengl branch as that use QOpenGLWidget instead of the obsolete QGLWidget in QT5 as has more chance of working.

If that does not work and try debug what is going on. Please compile the debug version by using the following command cmake -DCMAKE_BUILD_TYPE=Debug .. and enable core dumps and then from the core dump please generate a backtrace which should give me the line number in the source code that cause it to crash. Thanks

koaie commented 3 years ago

it seems to run under Rosetta with the new macos build on the website, the issue seems to be Macos related and not Apple Silicon, however I'm more than glad to check the WIP opengl brunch.