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.
Here are a few valgrind errors from a MonoTouch app (running in the simulator):
This seems to happen with any MonoTouch app. I can get line numbers for the stack traces and/or a test case if that's needed.
That lock is initialized:
lock = g_malloc (sizeof(TypeInitializationLock));
It could be freed multiple times, but 'lock' itself is freed, so valgrind would complain about that too. It could also be a valgrind problem.
How can I reproduce this ?
Install MonoTouch and MonoDevelop from latest wrench build.
Open any MonoTouch project.
Add the following environment variable to the project (Project Options / Run / General):
Run (not debug) the project.
This should show up in the application output:
MonoTouch: Executing with valgrind: /usr/local/bin/valgrind --tool=memcheck
MonoTouch: You must execute 'gdb program 42696' and immediately detach for valgrind to start up properly
Do as the second line says. Once you've detached gdb, the app will startup and this message is printed.
I can reproduce this, but couldn't find any problem with the critical sections, they seem to be initialized properly, and only freed once.
I've seen the same issue with valgrind, it looks like a false positive, that's all.