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.
When running my application on the mono framework it crashes just after calling .Show on a form. It does not happen on all forms. Just a couple. The exact error which mono is giving on the command prompt is:
--- BEGIN ERROR ---
type 13 not implemented
* Assertion: should not be reached at marshal.c:5319
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
--- END ERROR ---
There is no stack trace given.
I am running mono-2.10.9 on Windows 7 64bit.
The error happens in unrelated to the compiler I used. In other words, it was shown in both cases using the mono compiler and using the Microsoft .Net 3.5 compiler.
The error points me to line 5319 of https://github.com/mono/mono/blob/mono-2-10-9/mono/metadata/marshal.c
Type 13 is hexadecimal (I think) and refers to MONO_TYPE_VAR.
I do not use the var declaration in my own code.
We would need a testcase to be able to track this down. Also, is this a windows forms app ? winforms is no longer supported by mono.
Yes it is a WinForms application. Sorry that I didn't mention it.
Since when is WinForms no longer supported?? I have not read such statement on the website.
There is a lot of information about WinForms support, and also the main Mono WinForms page does not say so, see: http://www.mono-project.com/WinForms
All my WinForms code is .Net 2.0 code, no new fancy stuff.
I will try to isolate the problem in a small test project. But not sure whether I am able too.
Thanks for your response already.
Created attachment 3925 [details]
Source code to reproduce bug 12086.
I found a way to reproduce this bug. See attachment 3925 [details].
The bug seems to be in having the line:
_obj = new T ();
Where a new instance of a generic assigned class is created.
Hope this will help you fixing the error.
Fixed in master(f76a2f7b0bc5262859622bf2ae817926c041028a) and 2.10 (63e5a3bd091506e98dcb2dc9f0d7d31e126eb00e). As a workaround, try changing the _obj variable to
type object or something from T.