Bug 20658 - Crash when using GVariant
Summary: Crash when using GVariant
Status: RESOLVED FIXED
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-06-17 11:50 UTC by Xavier Claessens
Modified: 2014-06-23 05:10 UTC (History)
3 users (show)

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


Attachments
Test case (1.04 KB, patch)
2014-06-17 11:50 UTC, Xavier Claessens
Details
Patch (2.02 KB, patch)
2014-06-17 13:14 UTC, Xavier Claessens
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 FIXED

Description Xavier Claessens 2014-06-17 11:50:19 UTC
Created attachment 7092 [details]
Test case

With the attached patch, the GVariant demo code crash, and I don't understand why.
Comment 1 Xavier Claessens 2014-06-17 11:54:30 UTC
Note that I don't get the crash if I run with mono-boehm.
Comment 2 Xavier Claessens 2014-06-17 13:14:27 UTC
Created attachment 7094 [details]
Patch

Here is a patch that fix it.
Comment 3 Bertrand Lorentz 2014-06-17 15:38:49 UTC
Thanks for the patch!

That was indeed quite borked:
On top of the wrong prototype, doing "IntPtr.Zero ? null : ..." was never going to give anything interesting.

I've committed this to git master.
I've just taken a detour through a pull request on GitHub, to test the new Jenkins integration.