Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Using the sound player, even via the SystemSounds classes, leads to corrupted memory as shown by the follow stack trace output. This has been causing crashes in a program we've been developing for some time.
*** Error in `/usr/bin/cli': double free or corruption (out): 0x00007f807c02c0b0 ***
at <unknown> <0xffffffff>
at (wrapper managed-to-native) Mono.Audio.AlsaDevice.snd_pcm_sw_params_free (intptr) <0xffffffff>
at Mono.Audio.AlsaDevice.Dispose (bool) <0x00043>
at Mono.Audio.AlsaDevice.Finalize () <0x00026>
at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) <0xffffffff>
Debug info from gdb:
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Aborted (core dumped)
The fix is fairly obvious (and easy) in mono/mcs/class/System/System.Media/AudioDevice.cs. I'll submit a pull request shortly once I get it set up properly. The code hasn't changed in the most recent pull from github, so it's still a bug on the bleeding edge.
I've submitted a pull request for a fix for this bug.