Bug 12086 - type 13 not implemented
Summary: type 13 not implemented
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-05-03 07:44 UTC by IJsbrand Oudshoorn
Modified: 2013-05-08 07:08 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Reproduction (39.87 KB, application/octet-stream)
2013-05-07 11:08 UTC, IJsbrand Oudshoorn

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description IJsbrand Oudshoorn 2013-05-03 07:44:34 UTC
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:

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.
Comment 1 Zoltan Varga 2013-05-03 21:54:48 UTC
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.
Comment 2 IJsbrand Oudshoorn 2013-05-06 04:11:52 UTC
Hi Zoltan,

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.
Comment 3 IJsbrand Oudshoorn 2013-05-07 11:08:46 UTC
Created attachment 3925 [details]

Source code to reproduce bug 12086.
Comment 4 IJsbrand Oudshoorn 2013-05-07 11:17:41 UTC
Hi Zoltan,

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.


Comment 5 Zoltan Varga 2013-05-08 07:08:32 UTC
Fixed in master(f76a2f7b0bc5262859622bf2ae817926c041028a) and 2.10 (63e5a3bd091506e98dcb2dc9f0d7d31e126eb00e). As a workaround, try changing the _obj variable to
type object or something from T.