Sound sample crashes with macOS Mojave

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Sound sample crashes with macOS Mojave

Gerhard Mueller
Process:               sound [24956]
Path:                  /Users/USER/*/sound.app/Contents/MacOS/sound
Identifier:            org.wxwindows.samples.sound
Version:               3.1.2 (3.1.2)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           sound [24956]
User ID:               502

Date/Time:             2018-11-30 15:37:35.206 +0100
OS Version:            Mac OS X 10.14.1 (18B75)
Report Version:        12
Anonymous UUID:        5A1E3724-E3F6-CB04-BE52-21A7933A33B4


Time Awake Since Boot: 25000 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [24956]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libwx_osx_cocoau_core-3.1.2.0.0.dylib    0x000000010eb9744a wxOSXAudioToolboxSoundData::CompletionCallback(unsigned int, void*) + 42 (sound.cpp:71)
1   com.apple.CoreFoundation          0x00007fff4a2dc87c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
2   com.apple.CoreFoundation          0x00007fff4a29fbf8 __CFRunLoopDoBlocks + 393
3   com.apple.CoreFoundation          0x00007fff4a29f956 __CFRunLoopRun + 2845
4   com.apple.CoreFoundation          0x00007fff4a29ebe6 CFRunLoopRunSpecific + 467
5   com.apple.HIToolbox               0x00007fff4952ab35 RunCurrentEventLoopInMode + 293
6   com.apple.HIToolbox               0x00007fff4952a86b ReceiveNextEventCommon + 618
7   com.apple.HIToolbox               0x00007fff4952a5e8 _BlockUntilNextEventMatchingListInModeWithFilter + 64
8   com.apple.AppKit                  0x00007fff477e6eb7 _DPSNextEvent + 997
9   com.apple.AppKit                  0x00007fff477e5c56 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1362
10  com.apple.AppKit                  0x00007fff477dfcb9 -[NSApplication run] + 699
11  libwx_osx_cocoau_core-3.1.2.0.0.dylib    0x000000010eb45a4b wxGUIEventLoop::OSXDoRun() + 171 (evtloop.mm:304)
12  libwx_baseu-3.1.2.0.0.dylib       0x000000010f770897 wxCFEventLoop::DoRun() + 39 (evtloop_cf.cpp:331)
13  libwx_baseu-3.1.2.0.0.dylib       0x000000010f67f135 wxEventLoopBase::Run() + 229 (evtloopcmn.cpp:90)
14  libwx_baseu-3.1.2.0.0.dylib       0x000000010f632ffd wxAppConsoleBase::MainLoop() + 189 (appbase.cpp:380)
15  libwx_baseu-3.1.2.0.0.dylib       0x000000010f632a99 wxAppConsoleBase::OnRun() + 25 (appbase.cpp:301)
16  libwx_osx_cocoau_core-3.1.2.0.0.dylib    0x000000010ebb9c3b wxAppBase::OnRun() + 59 (appcmn.cpp:335)
17  libwx_osx_cocoau_core-3.1.2.0.0.dylib    0x000000010eaa7109 wxApp::OnRun() + 41 (app.cpp:366)
18  libwx_baseu-3.1.2.0.0.dylib       0x000000010f6c2c40 wxEntry(int&, wchar_t**) + 288 (init.cpp:507)
19  libwx_baseu-3.1.2.0.0.dylib       0x000000010f6c2e0c wxEntry(int&, char**) + 60 (init.cpp:519)
20  org.wxwindows.samples.sound       0x000000010e9ef2e6 main + 38 (sound.cpp:152)
21  libdyld.dylib                     0x00007fff7751a08d start + 1


--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: Sound sample crashes with macOS Mojave

Vadim Zeitlin-4
 Thank you for your report, but could you please also tell us whether
it crashes directly on startup or do you do something (what?) to trigger
the crash? Also, do you know if the crash happens under 10.14 only?

 Thanks,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Sound sample crashes with macOS Mojave

Gerhard Mueller
It crashes after these steps from the menue of this sample:
1. File: Select WAV File  --> OK
2. Play: Play sound asynchronously. --> OK (one play)
3. Play: Play sound asynchronously (object on stack). --> OK (one play)
4. Play: Loop sound. --> Nothing (no play)
5. File: Select WAV File (another one or the same from step 1) --> Crash

It is not a matter of *.wav files used for testing. It is repeatable with any wav.

I have only Mojave 10.14.1 and cannot test other OS versions.

Regards

Am Freitag, 30. November 2018 17:48:37 UTC+1 schrieb Vadim Zeitlin:
Thank you for your report, but could you please also tell us whether
it crashes directly on startup or do you do something (what?) to trigger
the crash? Also, do you know if the crash happens under 10.14 only?

 Thanks,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               <a href="http://www.tt-solutions.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.tt-solutions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFhPHTZbdYZYM-AqcnZXykG1ueWhw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.tt-solutions.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFhPHTZbdYZYM-AqcnZXykG1ueWhw&#39;;return true;">http://www.tt-solutions.com/

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

AW: Sound sample crashes with macOS Mojave

Stefan Csomor
Hi Gerhard

Thanks a lot, these steps alone:

1. File: Select WAV File 
4. Play: Loop sound
5. File: Select WAV File (another one or the same from step 1) --> Crash

are sufficient to provoke the crash and as I see the reason is the following

wxOSXAudioToolboxSoundData::CompletionCallback(SystemSoundID WXUNUSED(mySSID),
                                               void * soundRef)
{
    wxOSXAudioToolboxSoundData* data = (wxOSXAudioToolboxSoundData*) soundRef;

    data->SoundCompleted(); // (1)

    if (data->IsMarkedForDeletion())
        delete data; // (2)
}

when the sound is marked for deletion, this callback gets called, in (1) our own completion routine gets called, but because the sound is async looping it gets scheduled for another play, then in (2) in the end it gets disposed, but there's still the 'run' triggered in (1) active, leading to a *final* CompletionCallback when it ends, resulting in the crash

I'm now removing possible callbacks in DoStop, committed as 58f3dcf7, it's a one line change, I hope it doesn't interfere with sound handling in another way.

Best,

Stefan

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: Sound sample crashes with macOS Mojave

Gerhard Mueller
Hi Stefan,

thanks, no crash anymore. But now I get an infinitiv loop when doing these steps in sample sound.app:
1. File: Select WAV File.
2. Play: Play sound asynchronously --> OK
3. Play: Play sound synchronously --> Loop, sound.app hangs

I have started playing with the sound.app sample when I tried to understand the problems people with the OpenCPN.app have:
See here this link please https://github.com/OpenCPN/OpenCPN/pull/1171

Regards
Gerhard

Am Montag, 3. Dezember 2018 14:46:52 UTC+1 schrieb Stefan Csomor:
Hi Gerhard

Thanks a lot, these steps alone:

1. File: Select WAV File 
4. Play: Loop sound
5. File: Select WAV File (another one or the same from step 1) --> Crash

are sufficient to provoke the crash and as I see the reason is the following

wxOSXAudioToolboxSoundData::CompletionCallback(SystemSoundID WXUNUSED(mySSID),
                                               void * soundRef)
{
    wxOSXAudioToolboxSoundData* data = (wxOSXAudioToolboxSoundData*) soundRef;

    data->SoundCompleted(); // (1)

    if (data->IsMarkedForDeletion())
        delete data; // (2)
}

when the sound is marked for deletion, this callback gets called, in (1) our own completion routine gets called, but because the sound is async looping it gets scheduled for another play, then in (2) in the end it gets disposed, but there's still the 'run' triggered in (1) active, leading to a *final* CompletionCallback when it ends, resulting in the crash

I'm now removing possible callbacks in DoStop, committed as 58f3dcf7, it's a one line change, I hope it doesn't interfere with sound handling in another way.

Best,

Stefan

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users