Bug 60161 - gtk-sharp bug (GLib.Bytes) causes runtime TypeLoadException in Debian stable (stretch)
Summary: gtk-sharp bug (GLib.Bytes) causes runtime TypeLoadException in Debian stable ...
Status: RESOLVED INVALID
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-10-12 19:20 UTC by pete.in.IL
Modified: 2017-10-20 21:26 UTC (History)
1 user (show)

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


Attachments
monodevelop exception info (47.49 KB, image/png)
2017-10-12 19:20 UTC, pete.in.IL
Details


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:
Status:
RESOLVED INVALID

Description pete.in.IL 2017-10-12 19:20:22 UTC
Created attachment 25289 [details]
monodevelop exception info

I followed the explicit instructions on the mono/monodevelop web site for installing the required components on Debian 9. A project which compiled and executed previously now immediately fails at runtime during an object instantiation at this line of code:

ws = new Gdk.Pixbuf ("/root/chess/chessboard/ws.png");

where ws was previously declared  'Gdk.Pixbuf ws;'

The error is a System.TypeLoadException:

Unhandled Exception:
System.TypeLoadException: Could not resolve type with token 01000041 (from typeref, class/assembly GLib.Bytes, glib-sharp, Version=3.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f)
  at chessboard.SharpApp.Main () [0x00001] in <c506aa2c6fc24f88b34edcaed75f823b>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not resolve type with token 01000041 (from typeref, class/assembly GLib.Bytes, glib-sharp, Version=3.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f)
  at chessboard.SharpApp.Main () [0x00001] in <c506aa2c6fc24f88b34edcaed75f823b>:0

The code continues to compile ok, but as you can see there is now this runtime problem. Is a newer glib-sharp required? If so how do I acquire and install it? I thought the current Debian 9 installation would take care of this. This TypeLoadException renders mono unusable. I've attached a monodevelop screenshot.
Please advise. Thank you.
Comment 1 pete.in.IL 2017-10-20 21:26:47 UTC
Please disregard. It turns out that something at either the solution and/or project level was broken. I have no idea what. At any rate I moved the source code into a newly created solution and project and that resolved the problem. My apologies.