Something Wrong in Openmsx 14 MacOS

Page 2/3
1 | | 3

By santiontanon

Hero (602)

santiontanon's picture

28-06-2018, 19:19

Ok, I just downloaded 0.14.0.178, and that one does not crash either.

But I can confirm the crash happening in the latest one as of right now (0.14.0.238). All I do is double click on openMSX.app (it launches by default with C-Bios), and then click on the top-left "menu" -> "Hardware..." -> "Change Machine...", and then whichever machine you select, it just crashes.

Crash report:

Process:               openmsx [22974]
Path:                  /Applications/Games/*/openMSX-238.app/Contents/MacOS/openmsx
Identifier:            org.openmsx.openmsx
Version:               ??? (???)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           openmsx [22974]
User ID:               501

Date/Time:             2018-06-28 13:18:37.447 -0400
OS Version:            Mac OS X 10.12.6 (16G1408)
Report Version:        12
Anonymous UUID:        CF13032D-EFB2-E25F-FF0B-3EF5E170A177

Sleep/Wake UUID:       509D160A-9F25-4488-810A-96B175D1E4D8

Time Awake Since Boot: 940000 seconds
Time Since Wake:       1800 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [0]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.openmsx.openmsx           	0x0000000109c86185 0x1099e8000 + 2744709

By Manuel

Ascended (14730)

Manuel's picture

28-06-2018, 23:01

Thanks!

Please install a debug build: https://openmsx.fixato.net/builds/mac/debug-builds/x86_64/
Then the crash report is most useful with such builds, as it will contain the full stack trace.

Does it crash if you have the ROMs for the machine you are switching to?
Does it crash if you use the SDL renderer? (A stack trace of someone else suggests it is related to that.)

It is strange that it doesn't crash in 178 for you, although it did for FX. Santi, can you bisect which version starts to crash for you, using the available builds on Fixato's site?

By santiontanon

Hero (602)

santiontanon's picture

29-06-2018, 03:26

Sure thing! Will try this tomorrow and get back to you!

By santiontanon

Hero (602)

santiontanon's picture

29-06-2018, 06:27

Ok, this is the crash log for version 238 (debug):

Process:               openmsx [33629]
Path:                  /Applications/Games/*/openMSX-238-debug.app/Contents/MacOS/openmsx
Identifier:            org.openmsx.openmsx
Version:               ??? (???)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           openmsx [33629]
User ID:               501

Date/Time:             2018-06-29 00:01:40.016 -0400
OS Version:            Mac OS X 10.12.6 (16G1408)
Report Version:        12
Anonymous UUID:        CF13032D-EFB2-E25F-FF0B-3EF5E170A177

Sleep/Wake UUID:       FC150C11-75D6-4347-B798-0FD286E3406C

Time Awake Since Boot: 970000 seconds
Time Since Wake:       10000 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [0]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.openmsx.openmsx           	0x0000000106a071c8 openmsx::SuperImposedFrame::~SuperImposedFrame() + 8
1   org.openmsx.openmsx           	0x0000000106a032ad openmsx::PostProcessor::~PostProcessor() + 1597
2   org.openmsx.openmsx           	0x00000001069ee03c openmsx::GLPostProcessor::~GLPostProcessor() + 812
3   org.openmsx.openmsx           	0x00000001069ee2a5 openmsx::GLPostProcessor::~GLPostProcessor() + 21
4   org.openmsx.openmsx           	0x00000001069ee2c9 openmsx::GLPostProcessor::~GLPostProcessor() + 25
5   org.openmsx.openmsx           	0x0000000106a31ede openmsx::SDLRasterizer::~SDLRasterizer() + 846
6   org.openmsx.openmsx           	0x0000000106a32115 openmsx::SDLRasterizer::~SDLRasterizer() + 21
7   org.openmsx.openmsx           	0x0000000106a32139 openmsx::SDLRasterizer::~SDLRasterizer() + 25
8   org.openmsx.openmsx           	0x00000001069fd4a4 openmsx::PixelRenderer::~PixelRenderer() + 420
9   org.openmsx.openmsx           	0x00000001069fd5e5 openmsx::PixelRenderer::~PixelRenderer() + 21
10  org.openmsx.openmsx           	0x00000001069fd609 openmsx::PixelRenderer::~PixelRenderer() + 25
11  org.openmsx.openmsx           	0x0000000106a53275 openmsx::VDP::~VDP() + 1317
12  org.openmsx.openmsx           	0x0000000106a53a65 openmsx::VDP::~VDP() + 21
13  org.openmsx.openmsx           	0x0000000106a53a89 openmsx::VDP::~VDP() + 25
14  org.openmsx.openmsx           	0x00000001062a6f3f openmsx::HardwareConfig::~HardwareConfig() + 1039
15  org.openmsx.openmsx           	0x00000001062a8035 openmsx::HardwareConfig::~HardwareConfig() + 21
16  org.openmsx.openmsx           	0x000000010614e8aa openmsx::MSXMotherBoard::deleteMachine() + 618
17  org.openmsx.openmsx           	0x0000000106149ae4 openmsx::MSXMotherBoard::~MSXMotherBoard() + 148
18  org.openmsx.openmsx           	0x000000010614e915 openmsx::MSXMotherBoard::~MSXMotherBoard() + 21
19  org.openmsx.openmsx           	0x00000001061d6f26 openmsx::Reactor::signalEvent(std::__1::shared_ptr const&) + 918
20  org.openmsx.openmsx           	0x0000000106475b23 openmsx::EventDistributor::deliverEvents() + 1683
21  org.openmsx.openmsx           	0x00000001061d6782 openmsx::Reactor::run(openmsx::CommandLineParser&) + 1490
22  org.openmsx.openmsx           	0x0000000106225e4a openmsx::SDL_main(int, char**) + 698
23  org.openmsx.openmsx           	0x0000000106225b7b SDL_main + 27
24  org.openmsx.openmsx           	0x0000000106c07029 -[SDLMain applicationDidFinishLaunching:] + 73
25  com.apple.CoreFoundation      	0x00007fff7f58e45c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
26  com.apple.CoreFoundation      	0x00007fff7f58e35b _CFXRegistrationPost + 427
27  com.apple.CoreFoundation      	0x00007fff7f58e0c2 ___CFXNotificationPost_block_invoke + 50
28  com.apple.CoreFoundation      	0x00007fff7f54b523 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1827
29  com.apple.CoreFoundation      	0x00007fff7f54a55c _CFXNotificationPost + 604
30  com.apple.Foundation          	0x00007fff80f6f677 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
31  com.apple.AppKit              	0x00007fff7d1b174f -[NSApplication _postDidFinishNotification] + 297
32  com.apple.AppKit              	0x00007fff7d1b14b4 -[NSApplication _sendFinishLaunchingNotification] + 208
33  com.apple.AppKit              	0x00007fff7d074819 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 552
34  com.apple.AppKit              	0x00007fff7d07446b -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 661
35  com.apple.Foundation          	0x00007fff80fbaafd -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 290
36  com.apple.Foundation          	0x00007fff80fba977 _NSAppleEventManagerGenericHandler + 102
37  com.apple.AE                  	0x00007fff803bef26 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 544
38  com.apple.AE                  	0x00007fff803bec9d dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 39
39  com.apple.AE                  	0x00007fff803beba9 aeProcessAppleEvent + 312
40  com.apple.HIToolbox           	0x00007fff7eae9ddf AEProcessAppleEvent + 55
41  com.apple.AppKit              	0x00007fff7d06fd1d _DPSNextEvent + 1833
42  com.apple.AppKit              	0x00007fff7d7eb7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
43  com.apple.AppKit              	0x00007fff7d0643db -[NSApplication run] + 926
44  org.openmsx.openmsx           	0x0000000106c0746c CustomApplicationMain + 380
45  org.openmsx.openmsx           	0x0000000106c072e1 main + 257
46  org.openmsx.openmsx           	0x0000000106090544 start + 52

Also, while trying older versions. The first one that crashes is 198. From 190 backwards, it does not crash for me. It does not seem to make a difference which machine do I select. It crashes even changing from one C-Bios to another.

Also, not sure if this matters, but I've also noticed that from version 198 onwards, some machines appear duplicated on the list of hardware, for example, see this screenshot where the MSX1 and MSX2 CBios machines appear twice:

https://www.dropbox.com/s/buz9832rtktqomo/Screen%20Shot%202018-06-29%20at%2012.23.22%20AM.png?dl=0

That does not happen from 190 backwards.

By Manuel

Ascended (14730)

Manuel's picture

29-06-2018, 07:41

Thanks! Does it crash if you use the SDL renderer?

By santiontanon

Hero (602)

santiontanon's picture

29-06-2018, 16:51

Yep, the same thing happens, here's the debug report:

Process:               openmsx [37548]
Path:                  /Applications/Games/*/openMSX-198-debug.app/Contents/MacOS/openmsx
Identifier:            org.openmsx.openmsx
Version:               ??? (???)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           openmsx [37548]
User ID:               501

Date/Time:             2018-06-29 10:35:15.290 -0400
OS Version:            Mac OS X 10.12.6 (16G1408)
Report Version:        12
Anonymous UUID:        CF13032D-EFB2-E25F-FF0B-3EF5E170A177

Sleep/Wake UUID:       4A9FEBE7-D429-49C2-BE30-A9719AD4B721

Time Awake Since Boot: 980000 seconds
Time Since Wake:       3600 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [0]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.openmsx.openmsx           	0x000000010b32a058 openmsx::SuperImposedFrame::~SuperImposedFrame() + 8
1   org.openmsx.openmsx           	0x000000010b32613d openmsx::PostProcessor::~PostProcessor() + 1597
2   org.openmsx.openmsx           	0x000000010b2fee99 openmsx::FBPostProcessor::~FBPostProcessor() + 425
3   org.openmsx.openmsx           	0x000000010b2fefb5 openmsx::FBPostProcessor::~FBPostProcessor() + 21
4   org.openmsx.openmsx           	0x000000010b2fefd9 openmsx::FBPostProcessor::~FBPostProcessor() + 25
5   org.openmsx.openmsx           	0x000000010b354d6e openmsx::SDLRasterizer::~SDLRasterizer() + 846
6   org.openmsx.openmsx           	0x000000010b354fa5 openmsx::SDLRasterizer::~SDLRasterizer() + 21
7   org.openmsx.openmsx           	0x000000010b354fc9 openmsx::SDLRasterizer::~SDLRasterizer() + 25
8   org.openmsx.openmsx           	0x000000010b320334 openmsx::PixelRenderer::~PixelRenderer() + 420
9   org.openmsx.openmsx           	0x000000010b320475 openmsx::PixelRenderer::~PixelRenderer() + 21
10  org.openmsx.openmsx           	0x000000010b320499 openmsx::PixelRenderer::~PixelRenderer() + 25
11  org.openmsx.openmsx           	0x000000010b376105 openmsx::VDP::~VDP() + 1317
12  org.openmsx.openmsx           	0x000000010b3768f5 openmsx::VDP::~VDP() + 21
13  org.openmsx.openmsx           	0x000000010b376919 openmsx::VDP::~VDP() + 25
14  org.openmsx.openmsx           	0x000000010abd329f openmsx::HardwareConfig::~HardwareConfig() + 1039
15  org.openmsx.openmsx           	0x000000010abd4395 openmsx::HardwareConfig::~HardwareConfig() + 21
16  org.openmsx.openmsx           	0x000000010aa7acca openmsx::MSXMotherBoard::deleteMachine() + 618
17  org.openmsx.openmsx           	0x000000010aa75f04 openmsx::MSXMotherBoard::~MSXMotherBoard() + 148
18  org.openmsx.openmsx           	0x000000010aa7ad35 openmsx::MSXMotherBoard::~MSXMotherBoard() + 21
19  org.openmsx.openmsx           	0x000000010ab032d6 openmsx::Reactor::signalEvent(std::__1::shared_ptr const&) + 918
20  org.openmsx.openmsx           	0x000000010ada1ee3 openmsx::EventDistributor::deliverEvents() + 1683
21  org.openmsx.openmsx           	0x000000010ab02b32 openmsx::Reactor::run(openmsx::CommandLineParser&) + 1490
22  org.openmsx.openmsx           	0x000000010ab521fa openmsx::SDL_main(int, char**) + 698
23  org.openmsx.openmsx           	0x000000010ab51f2b SDL_main + 27
24  org.openmsx.openmsx           	0x000000010b529ed9 -[SDLMain applicationDidFinishLaunching:] + 73
25  com.apple.CoreFoundation      	0x00007fff7f58e45c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
26  com.apple.CoreFoundation      	0x00007fff7f58e35b _CFXRegistrationPost + 427
27  com.apple.CoreFoundation      	0x00007fff7f58e0c2 ___CFXNotificationPost_block_invoke + 50
28  com.apple.CoreFoundation      	0x00007fff7f54b523 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1827
29  com.apple.CoreFoundation      	0x00007fff7f54a55c _CFXNotificationPost + 604
30  com.apple.Foundation          	0x00007fff80f6f677 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
31  com.apple.AppKit              	0x00007fff7d1b174f -[NSApplication _postDidFinishNotification] + 297
32  com.apple.AppKit              	0x00007fff7d1b14b4 -[NSApplication _sendFinishLaunchingNotification] + 208
33  com.apple.AppKit              	0x00007fff7d074819 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 552
34  com.apple.AppKit              	0x00007fff7d07446b -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 661
35  com.apple.Foundation          	0x00007fff80fbaafd -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 290
36  com.apple.Foundation          	0x00007fff80fba977 _NSAppleEventManagerGenericHandler + 102
37  com.apple.AE                  	0x00007fff803bef26 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 544
38  com.apple.AE                  	0x00007fff803bec9d dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 39
39  com.apple.AE                  	0x00007fff803beba9 aeProcessAppleEvent + 312
40  com.apple.HIToolbox           	0x00007fff7eae9ddf AEProcessAppleEvent + 55
41  com.apple.AppKit              	0x00007fff7d06fd1d _DPSNextEvent + 1833
42  com.apple.AppKit              	0x00007fff7d7eb7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
43  com.apple.AppKit              	0x00007fff7d0643db -[NSApplication run] + 926
44  org.openmsx.openmsx           	0x000000010b52a31c CustomApplicationMain + 380
45  org.openmsx.openmsx           	0x000000010b52a191 main + 257
46  org.openmsx.openmsx           	0x000000010a9bd254 start + 52

But something weird is happening, since actually it also crashes when I try to change the renderer directly from within OpenMSX, when I type "set renderer SDL", it crashes. To change the renderer, I had to open a previous build, then change it and "save_settings". Looking at the debug log, the crash occurs exactly in the same place (the destructor of SuperImposedFrame). It also crashes when trying to quit openMSX. So, something changed in version 198 that made the Mac build generally unstable for some reason.

By santiontanon

Hero (602)

santiontanon's picture

29-06-2018, 17:05

So, the problem seems to basically be when the graphic renderer is being destroyed. Since this happens either when changing machines, changing renderer or quitting openMSX, that's why I see crashes in all these instances.

But I was looking at the source code of openMSX (first time in my life looking at it, so, don't take my reading very seriously Smile). And the destructor of SuperImposedFrame (or rather the one of its super class, since SuperImposedFrame doesn't have one explicitly defined) looks very innocent to me. So, the problem is probably somewhere else, maybe in the PostProcessor, or the Rasterizer that maybe are freeing something twice?

By Manuel

Ascended (14730)

Manuel's picture

30-06-2018, 13:32

Some things have been changed which may fix it. Please try again tonight at about 22:05 (CET), when the build server built a new build Smile

By santiontanon

Hero (602)

santiontanon's picture

30-06-2018, 22:33

Just tested it with version 249, no crash this time!!! Smile

- I can switch machines without a crash
- I can switch renderers without a crash
- There are no repeated machine names anymore!

So, at least in my machine, this issue is fixed Smile

By Manuel

Ascended (14730)

Manuel's picture

30-06-2018, 23:12

Great, thanks for reporting back!

Page 2/3
1 | | 3
My MSX profile