|
Joined: Mar 2013
Posts: 81
Member
|
OP
Member
Joined: Mar 2013
Posts: 81 |
I'm using SDLMAME 0261 and the debugger will not open any more after it randomly crashed today. I had the same thing happen on an earlier version and cannot get the debugger to open in that version either now. I'm using 0261 as that's the last version available for my Intel Mac from the SDLMAME site. The error I get at the terminal is: 2024-11-12 15:12:38.006 mame[1728:17336] *** Assertion failure in -[NSPopUpButton initWithFrame:], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.70.110/AppKit.subproj/NSView.m:1352 Caught unhandled exception zsh: segmentation fault ./mame goldnaxe -debug I am fairly savvy with Macs but I have no idea what's caused this or what the fix is. I know that apps sometimes won't open if they've written a temporary file somewhere and then crashed without deleting the temporary file, so I'm assuming that might be the case here. MAME itself runs, just not the debugger. Thank you for any help or suggestions.
|
|
|
|
Joined: Mar 2001
Posts: 17,234 Likes: 259
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,234 Likes: 259 |
That was a common issue with older versions of MAME (on all systems, incidentally) but I haven't seen it in a long time.
The usual fix is simply to run MAME for the same game without -debug once, and that should clear the corrupted saved debugger settings.
|
|
|
|
Joined: Mar 2013
Posts: 81
Member
|
OP
Member
Joined: Mar 2013
Posts: 81 |
Thank you. Do you know where the debugger settings might be saved? I tried to open the same game with ./mame goldnaxe and just get a blank screen now and have to force-quit it. Opening it in a window works ok though and I get a "The last time you opened MAME, it unexpectedly quit..." message but doesn't seem to fix the problem with the debugger. I'm assuming macOS is trying to restore the state of the windows but something is stopping it from doing that.
|
|
|
|
Joined: Mar 2001
Posts: 17,234 Likes: 259
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,234 Likes: 259 |
That's definitely great, but I don't think compiling is OP's problem.
|
|
|
|
Joined: Mar 2001
Posts: 17,234 Likes: 259
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,234 Likes: 259 |
I think the debugger settings are in the game's .cfg file.
|
|
|
|
Joined: Mar 2013
Posts: 81
Member
|
OP
Member
Joined: Mar 2013
Posts: 81 |
Perfect, it's working again now. Thank you very much. Sorry I didn't think to check that, I guess I was expecting the debugger settings to be stored in ~/Library/Caches or Application Support or somewhere like that.
Hairball - thanks for the Intel builds, I'll check them out later.
|
|
|
|
Joined: Feb 2004
Posts: 2,603 Likes: 307
Very Senior Member
|
Very Senior Member
Joined: Feb 2004
Posts: 2,603 Likes: 307 |
I think the debugger settings are in the game's .cfg file. Correct, it’s in the .cfg file. You can nuke the <debugger> node (and all its child nodes) to clear out the debugger settings. If you can make 0.271 crash like this, please give me the errant .cfg file and if possible also catch the unhandled exception in a debugger (e.g. gdb or lldb) so I can try to fix it.
|
|
|
|
Joined: Mar 2013
Posts: 81
Member
|
OP
Member
Joined: Mar 2013
Posts: 81 |
It crashed again today in my 0271 build on macOS 10.15.7. I just built this version on my machine and had to apply a patch to fix the issue with BGFX, but it seems to work fine. Prior to this I was using the debugger and closed it before I switched off my machine, but the debugger didn't crash at that point. The .cfg file looks like this:
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="goldnaxe">
<counters>
<coins index="0" number="25" />
</counters>
<debugger>
<window position_x="348.000000" position_y="60.000000" size_x="932.000000" size_y="512.000000" type="1" rightbar="1">
<splits state="174.000000" disassembly="242.000000" />
<selection visible="0" start_x="0" start_y="0" />
<scroll position_x="0.000000" position_y="0.000000" />
<history />
</window>
<window position_x="12.000000" position_y="221.000000" size_x="693.000000" size_y="548.000000" type="3" cpu="0" rightbar="1">
<expression>
3627
</expression>
<history>
<item>
3627
</item>
</history>
<selection visible="0" start_x="66" start_y="10" />
<scroll position_x="0.000000" position_y="0.000000" />
</window>
</debugger>
<ui_warnings launched="1731528171" warned="1731528171" />
</system>
</mameconfig>
This is the output I got from lldb - I had to restart my machine because it looks MAME tried to open in fullscreen mode initially and I just got a blank screen and couldn't force-quit it: % lldb ./mame goldnaxe -debug (lldb) target create "./mame" Current executable set to '/Users/mac/Downloads/mame-mame0271/mame' (x86_64). (lldb) settings set -- target.run-args "goldnaxe" (lldb) run Process 577 launched: '/Users/mac/Downloads/mame-mame0271/mame' (x86_64) 2024-11-15 15:18:32.376752+0000 mame[577:7562] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x118747d30> F8BB1C28-BAE8-11D6-9C31-00039315CD46 2024-11-15 15:18:32.405095+0000 mame[577:7562] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine 2024-11-15 15:18:32.406048+0000 mame[577:7562] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine Process 577 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGTERM frame #0: 0x00007fff70685dea libsystem_kernel.dylib`mach_msg_trap + 10 libsystem_kernel.dylib`mach_msg_trap: -> 0x7fff70685dea <+10>: retq 0x7fff70685deb <+11>: nop
libsystem_kernel.dylib`mach_msg_overwrite_trap: 0x7fff70685dec <+0>: movq %rcx, %r10 0x7fff70685def <+3>: movl $0x1000020, %eax ; imm = 0x1000020 Target 0: (mame) stopped.
|
|
|
|
Joined: Mar 2013
Posts: 81
Member
|
OP
Member
Joined: Mar 2013
Posts: 81 |
I realised after I posted yesterday that I wasn't running the lldb command correctly because it wasn't passing all of the arguments supplied to MAME. Using lldb ./mame -- goldnaxe -debug I get the following output from lldb: (lldb) target create "./mame" Current executable set to '/Users/mac/Downloads/mame-mame0271/mame' (x86_64). (lldb) settings set -- target.run-args "goldnaxe" "-debug" (lldb) run Process 594 launched: '/Users/mac/Downloads/mame-mame0271/mame' (x86_64) 2024-11-16 11:10:14.750263+0000 mame[594:8708] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x1186b4f00> F8BB1C28-BAE8-11D6-9C31-00039315CD46 2024-11-16 11:10:14.780917+0000 mame[594:8708] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine 2024-11-16 11:10:14.782160+0000 mame[594:8708] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine 2024-11-16 11:10:16.613622+0000 mame[594:8708] *** Assertion failure in -[NSPopUpButton initWithFrame:], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.70.110/AppKit.subproj/NSView.m:1352 Caught unhandled exception Process 594 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000107f81fb4 mame`device_debug::compute_debug_flags() + 4 mame`device_debug::compute_debug_flags: -> 0x107f81fb4 <+4>: movq (%rdi), %rax 0x107f81fb7 <+7>: movq 0xd0(%rax), %rax 0x107f81fbe <+14>: movq 0x98(%rax), %rcx 0x107f81fc5 <+21>: movq 0x10(%rcx), %r8 Target 0: (mame) stopped. (lldb) thread backtrace * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x0000000107f81fb4 mame`device_debug::compute_debug_flags() + 4 frame #1: 0x0000000107f83d67 mame`device_debug::~device_debug() + 87 frame #2: 0x000000010b94be5f mame`device_t::stop() + 95 frame #3: 0x00000001090d1220 mame`running_machine::stop_all_devices() + 80 frame #4: 0x00000001090d1c2a mame`running_machine::run(bool) + 1114 frame #5: 0x0000000103fc8fc9 mame`mame_machine_manager::execute() + 569 frame #6: 0x0000000103a7e0d2 mame`cli_frontend::start_execution(mame_machine_manager*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 578 frame #7: 0x0000000103a7fccd mame`cli_frontend::execute(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) + 77 frame #8: 0x0000000103fca54b mame`emulator_info::start_frontend(emu_options&, osd_interface&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) + 43 frame #9: 0x000000010928b4d8 mame`main + 168 frame #10: 0x00007fff6f257cc9 libdyld.dylib`start + 1
|
|
|
|
Joined: Feb 2004
Posts: 2,603 Likes: 307
Very Senior Member
|
Very Senior Member
Joined: Feb 2004
Posts: 2,603 Likes: 307 |
Thanks. At a glance, there isn’t anything obviously wrong with the configuration file, which makes it more worrying. I assume the “Caught unhandled exception” message is coming from the handler emu/machine.cpp, meaning something threw something that isn’t a std::exception . Do you think you’d be able to use lldb to catch whatever it is when it’s thrown?
I’ll try and think some more about what could be causing it later, but having a configuration file that triggers it is useful.
|
|
|
|
Joined: Mar 2013
Posts: 81
Member
|
OP
Member
Joined: Mar 2013
Posts: 81 |
Thanks for your help with this. If I start lldb and enter "breakpoint set -E c++" and then "run" I get this: Process 874 launched: '/Users/mac/Downloads/mame-mame0271/mame' (x86_64) 2 locations added to breakpoint 1 Process 874 stopped * thread #4, queue = 'com.apple.CoreAnalytics::Client', stop reason = breakpoint 1.1 frame #0: 0x00007fff6b1f00f8 libc++abi.dylib`__cxa_throw libc++abi.dylib`__cxa_throw: -> 0x7fff6b1f00f8 <+0>: pushq %rbp 0x7fff6b1f00f9 <+1>: movq %rsp, %rbp 0x7fff6b1f00fc <+4>: pushq %r15 0x7fff6b1f00fe <+6>: pushq %r14 Target 0: (mame) stopped. Entering "bt" I get this: * thread #2, queue = 'com.apple.CoreAnalytics::Client', stop reason = breakpoint 1.1 * frame #0: 0x00007fff6b1f00f8 libc++abi.dylib`__cxa_throw frame #1: 0x00007fff4b89cf5e CoreAnalytics`nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::parser::unexpect(nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::lexer::token_type) const + 334 frame #2: 0x00007fff4b898ef9 CoreAnalytics`nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::parser::parse_internal(bool) + 109 frame #3: 0x00007fff4b89c8e3 CoreAnalytics`nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::parser::parse() + 51 frame #4: 0x00007fff4b89c754 CoreAnalytics`nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer> nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::parse<char const*, 0>(char const*, char const*, std::__1::function<bool (int, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>::parse_event_t, nlohmann::basic_json<std::__1::map, std::__1::vector, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, long long, unsigned long long, double, std::__1::allocator, nlohmann::adl_serializer>&)>) + 340 frame #5: 0x00007fff4b88ee1e CoreAnalytics`FrameworkConfiguration::init() + 330 frame #6: 0x00007fff4b88ebd8 CoreAnalytics`FrameworkConfiguration::create(applesauce::xpc::object) + 200 frame #7: 0x00007fff4b88e882 CoreAnalytics`CoreAnalytics::Client::handleConfigurationChange_sync(applesauce::xpc::dict const&) + 192 frame #8: 0x00007fff4b88e682 CoreAnalytics`CoreAnalytics::Client::handleServerMessage_sync(applesauce::xpc::dict) + 456 frame #9: 0x00007fff4b8a09f9 CoreAnalytics`invocation function for block in CoreAnalytics::Client::init()::$_1::operator()() const + 365 frame #10: 0x00007fff6e10322c libxpc.dylib`_xpc_connection_call_event_handler + 56 frame #11: 0x00007fff6e10213b libxpc.dylib`_xpc_connection_mach_event + 934 frame #12: 0x00007fff6de616f8 libdispatch.dylib`_dispatch_client_callout4 + 9 frame #13: 0x00007fff6de76bc9 libdispatch.dylib`_dispatch_mach_msg_invoke + 435 frame #14: 0x00007fff6de66af6 libdispatch.dylib`_dispatch_lane_serial_drain + 263 frame #15: 0x00007fff6de7771c libdispatch.dylib`_dispatch_mach_invoke + 481 frame #16: 0x00007fff6de66af6 libdispatch.dylib`_dispatch_lane_serial_drain + 263 frame #17: 0x00007fff6de675d6 libdispatch.dylib`_dispatch_lane_invoke + 363 frame #18: 0x00007fff6de70c09 libdispatch.dylib`_dispatch_workloop_worker_thread + 596 frame #19: 0x00007fff6e0bfa3d libsystem_pthread.dylib`_pthread_wqthread + 290 frame #20: 0x00007fff6e0beb77 libsystem_pthread.dylib`start_wqthread + 15 Entering "continue" I get this: Process 874 resuming 2024-11-17 21:25:54.145065+0000 mame[874:42532] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x11b53cfa0> F8BB1C28-BAE8-11D6-9C31-00039315CD46 2024-11-17 21:25:54.179920+0000 mame[874:42532] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine Process 874 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x00007fff6b1f00f8 libc++abi.dylib`__cxa_throw libc++abi.dylib`__cxa_throw: -> 0x7fff6b1f00f8 <+0>: pushq %rbp 0x7fff6b1f00f9 <+1>: movq %rsp, %rbp 0x7fff6b1f00fc <+4>: pushq %r15 0x7fff6b1f00fe <+6>: pushq %r14 Target 0: (mame) stopped. And entering "bt" I get this: * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 * frame #0: 0x00007fff6b1f00f8 libc++abi.dylib`__cxa_throw frame #1: 0x00007fff33652048 CoreAudio`HALC_ShellDevice::_InitializeDriverPlugIn() + 1186 frame #2: 0x00007fff3364c2f1 CoreAudio`HALC_ShellDevice::_HasProperty(unsigned int, AudioObjectPropertyAddress const&, bool&, unsigned int&, AudioObjectPropertyAddress&, bool&) const + 71 frame #3: 0x00007fff337e3ce1 CoreAudio`invocation function for block in HALC_ShellObject::HasProperty(unsigned int, AudioObjectPropertyAddress const&, bool&) const + 79 frame #4: 0x00007fff33949620 CoreAudio`HALB_CommandGate::ExecuteCommand(void () block_pointer) const + 98 frame #5: 0x00007fff337e1731 CoreAudio`HALC_ShellObject::HasProperty(unsigned int, AudioObjectPropertyAddress const&, bool&) const + 323 frame #6: 0x00007fff336dd820 CoreAudio`HAL_HardwarePlugIn_ObjectHasProperty(AudioHardwarePlugInInterface**, unsigned int, AudioObjectPropertyAddress const*) + 288 frame #7: 0x00007fff335f93ba CoreAudio`HALPlugIn::ObjectHasProperty(HALObject const&, AudioObjectPropertyAddress const&) const + 36 frame #8: 0x00007fff339e720d CoreAudio`HALDevice::HasProperty(AudioObjectPropertyAddress const&) const + 221 frame #9: 0x00007fff339e891d CoreAudio`HALDevice::IsHidden(bool*) const + 55 frame #10: 0x00007fff336902da CoreAudio`HALSystem::ObjectsPublishedAndDied(unsigned int, unsigned int const*, unsigned int, unsigned int const*) + 578 frame #11: 0x00007fff33691457 CoreAudio`HALSystem::AudioObjectsPublishedAndDied(AudioHardwarePlugInInterface**, unsigned int, unsigned int, unsigned int const*, unsigned int, unsigned int const*) + 155 frame #12: 0x00007fff336da3ef CoreAudio`HALC_ShellPlugIn::ReconcileDeviceList(bool, bool) + 285 frame #13: 0x00007fff336db2e2 CoreAudio`HALC_ShellPlugIn::ConnectToServer() + 194 frame #14: 0x00007fff336dd479 CoreAudio`HAL_HardwarePlugIn_InitializeWithObjectID(AudioHardwarePlugInInterface**, unsigned int) + 392 frame #15: 0x00007fff335f725d CoreAudio`HALPlugInManagement::CreateHALPlugIn(HALCFPlugIn const*) + 1961 frame #16: 0x00007fff335f628d CoreAudio`HALSystem::InitializeDevices() + 4585 frame #17: 0x00007fff335f414d CoreAudio`HALSystem::CheckOutInstance() + 161 frame #18: 0x00007fff3364ab2f CoreAudio`AudioObjectAddPropertyListenerInternal + 158 frame #19: 0x000000012130ef49 CoreAudio`___lldb_unnamed_symbol210$$CoreAudio + 1337 frame #20: 0x00000001213440f7 CoreAudio`___lldb_unnamed_symbol1063$$CoreAudio + 21 frame #21: 0x000000012140435f CoreAudio`___lldb_unnamed_symbol3269$$CoreAudio + 77 frame #22: 0x00007fff48ba2938 AudioToolboxCore`APComponent::newInstance(unsigned int, bool, void (OpaqueAudioComponentInstance*, int) block_pointer) + 1986 frame #23: 0x00007fff48c8dae5 AudioToolboxCore`__AudioComponentInstanceNew_block_invoke + 88 frame #24: 0x00007fff48b4693c AudioToolboxCore`Synchronously + 87 frame #25: 0x00007fff48c8d9fb AudioToolboxCore`AudioComponentInstanceNew + 183 frame #26: 0x00007fff325309eb AudioToolbox`AudioUnitNodeInfo::Open() + 79 frame #27: 0x00007fff3253244a AudioToolbox`AUGraphNewNode_Imp(OpaqueAUGraph*, AudioComponentDescription const*, unsigned int, void const*, int*) + 607 frame #28: 0x0000000109282438 mame`osd::(anonymous namespace)::sound_coreaudio::init(osd_interface&, osd_options const&) + 9448 frame #29: 0x0000000109fc6181 mame`osd_module_manager::select_module(osd_interface&, osd_options const&, char const*, char const*) + 145 frame #30: 0x00000001091f11d8 mame`sound_module& osd_common_t::select_module_options<sound_module>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 712 frame #31: 0x00000001091f000b mame`osd_common_t::init_subsystems() + 475 frame #32: 0x0000000109288b78 mame`sdl_osd_interface::init(running_machine&) + 7624 frame #33: 0x00000001090d0314 mame`running_machine::start() + 516 frame #34: 0x00000001090d198c mame`running_machine::run(bool) + 444 frame #35: 0x0000000103fc8fc9 mame`mame_machine_manager::execute() + 569 frame #36: 0x0000000103a7e0d2 mame`cli_frontend::start_execution(mame_machine_manager*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 578 frame #37: 0x0000000103a7fccd mame`cli_frontend::execute(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) + 77 frame #38: 0x0000000103fca54b mame`emulator_info::start_frontend(emu_options&, osd_interface&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) + 43 frame #39: 0x000000010928b4d8 mame`main + 168 frame #40: 0x00007fff6debacc9 libdyld.dylib`start + 1 If I enter "continue" again I get the same message and backtrace, and if I enter "continue" again I get the first breakpoint message but this time a small window opens (which is the window where the game would normally be displayed in the debugger) but then get the spinning beachball when I mouseover the window. If I quit lldb, run it again and enter "break set -n objc_exception_throw" then I get these messages Process 907 launched: '/Users/mac/Downloads/mame-mame0271/mame' (x86_64) 2024-11-17 21:33:13.719729+0000 mame[907:45772] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x11a0b5ce0> F8BB1C28-BAE8-11D6-9C31-00039315CD46 2024-11-17 21:33:13.754819+0000 mame[907:45772] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine 2024-11-17 21:33:13.755265+0000 mame[907:45772] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine 2024-11-17 21:33:15.497974+0000 mame[907:45772] *** Assertion failure in -[NSPopUpButton initWithFrame:], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.70.110/AppKit.subproj/NSView.m:1352 Process 907 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = hit Objective-C exception frame #0: 0x00007fff6cd1aa6e libobjc.A.dylib`objc_exception_throw libobjc.A.dylib`objc_exception_throw: -> 0x7fff6cd1aa6e <+0>: pushq %rbp 0x7fff6cd1aa6f <+1>: movq %rsp, %rbp 0x7fff6cd1aa72 <+4>: pushq %r15 0x7fff6cd1aa74 <+6>: pushq %r14 Target 0: (mame) stopped. If I enter "bt" then I get this: * thread #1, queue = 'com.apple.main-thread', stop reason = hit Objective-C exception * frame #0: 0x00007fff6cd1aa6e libobjc.A.dylib`objc_exception_throw frame #1: 0x00007fff341ded40 CoreFoundation`+[NSException raise:format:arguments:] + 88 frame #2: 0x00007fff368f891d Foundation`-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191 frame #3: 0x00007fff313b50ef AppKit`-[NSView initWithFrame:] + 400 frame #4: 0x00007fff313cf901 AppKit`-[NSControl initWithFrame:] + 70 frame #5: 0x00007fff313cf834 AppKit`-[NSButton initWithFrame:] + 66 frame #6: 0x00007fff314c189f AppKit`-[NSPopUpButton initWithFrame:pullsDown:] + 67 frame #7: 0x00000001091ccdd4 mame`-[MAMEDisassemblyViewer initWithMachine:console:] + 548 frame #8: 0x00000001091c3fda mame`-[MAMEDebugConsole loadConfiguration:] + 346 frame #9: 0x00000001091c0e6f mame`debugger_osx::wait_for_debugger(device_t&, bool) + 143 frame #10: 0x0000000107f85de6 mame`device_debug::instruction_hook(unsigned int) + 1574 frame #11: 0x00000001059fccec mame`m68000_device::execute_run() + 252 frame #12: 0x000000010914d90f mame`device_scheduler::timeslice() + 815 frame #13: 0x00000001090d1b88 mame`running_machine::run(bool) + 952 frame #14: 0x0000000103fc8fc9 mame`mame_machine_manager::execute() + 569 frame #15: 0x0000000103a7e0d2 mame`cli_frontend::start_execution(mame_machine_manager*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 578 frame #16: 0x0000000103a7fccd mame`cli_frontend::execute(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) + 77 frame #17: 0x0000000103fca54b mame`emulator_info::start_frontend(emu_options&, osd_interface&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) + 43 frame #18: 0x000000010928b4d8 mame`main + 168 frame #19: 0x00007fff6debacc9 libdyld.dylib`start + My knowledge of lldb is limited but if you have any specific commands that you want me to try please let me know.
|
|
|
|
Joined: Feb 2004
Posts: 2,603 Likes: 307
Very Senior Member
|
Very Senior Member
Joined: Feb 2004
Posts: 2,603 Likes: 307 |
I don’t know what’s causing that assertion failure when instantiating an NSPopUpButton. Do you get that any time you open a disassembly or memory window, or does it only happen when you’ve got a crashy config file?
ArBee or someone else who knows – can you catch Objective-C exceptions with C++ catch statements these days? Could the running_machine event loop be catching the NSException raised by the assertion failure?
Actually, I see what’s causing the assertion failure… let me fix that first, and see if it still crashes.
|
|
|
|
Joined: Feb 2004
Posts: 2,603 Likes: 307
Very Senior Member
|
Very Senior Member
Joined: Feb 2004
Posts: 2,603 Likes: 307 |
d460265 should fix the assertion failure. Can you see if that improves the situation?
|
|
|
|
Joined: Mar 2013
Posts: 81
Member
|
OP
Member
Joined: Mar 2013
Posts: 81 |
The debugger now opens as expected and works. When I run it with lldb I still get this message but the debugger still works afterwards: (lldb) target create "./mame" Current executable set to '/Users/mac/Downloads/mame-mame0271/mame' (x86_64). (lldb) settings set -- target.run-args "goldnaxe" "-debug" (lldb) run Process 4933 launched: '/Users/macbookpro/Downloads/mame-mame0271/mame' (x86_64) 2024-11-18 16:08:56.084862+0000 mame[4933:66287] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x11a02a280> F8BB1C28-BAE8-11D6-9C31-00039315CD46 2024-11-18 16:08:56.125169+0000 mame[4933:66287] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine 2024-11-18 16:08:56.125612+0000 mame[4933:66287] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
|
|
|
|
Joined: Feb 2004
Posts: 2,603 Likes: 307
Very Senior Member
|
Very Senior Member
Joined: Feb 2004
Posts: 2,603 Likes: 307 |
To answer my own question, the 64-bit Objective-C implementation is interoperable with C++ exceptions - a catch-all block in either language will catch exceptions from both languages, and destructors and finally blocks are honoured for exceptions from both languages.
|
|
|
Forums9
Topics9,328
Posts122,128
Members5,074
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|