|
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.
|
|
|
3 members (3 invisible),
213
guests, and
1
robot. |
Key:
Admin,
Global Mod,
Mod
|
|
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!
|
|
|
|