Bug 27577 - FileChooser button works in Linux, but crashes in Windows
Summary: FileChooser button works in Linux, but crashes in Windows
Status: NEW
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: 2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-03-02 17:17 UTC by pete.in.IL
Modified: 2015-08-25 17:04 UTC (History)
4 users (show)

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

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 for Bug 27577 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description pete.in.IL 2015-03-02 17:17:19 UTC
This simple GTK SharpApp works in Linux, but the executable crashes under Windows 7 (which has GTK libraries installed via your gtk-sharp-2.12.26.msi installer). exe built with MonoDevelop Version 5.7.1 (build 269), Mono/.NET 4.5 target.

using System;
using System.Collections;
using System.Collections.Generic;
using Gtk;
using System.Linq;
using Gdk;
using System.IO;
using GLib;

namespace fcbtest

	public class SharpApp : Gtk.Window
		public SharpApp () : base ("FilechooserButton Test")
			BorderWidth = 8;
			SetPosition (WindowPosition.Center);
			DeleteEvent += delegate {Application.Quit ();};

			VBox vbox = new VBox (false, 4);
			FileChooserButton fcb = new FileChooserButton ("Log Folder", FileChooserAction.SelectFolder);


		public static void Main()
        	new SharpApp();

Under Windows 7 an immediate exception is thrown when clicking on a directory shown by the button:

Log Name:      Application
Source:        .NET Runtime
Date:          3/2/2015 3:44:13 PM
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      win7vbox
Application: fcb-test.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at fcbtest.SharpApp.Main()

Log Name:      Application
Source:        Application Error
Date:          3/2/2015 3:44:13 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      win7vbox
Faulting application name: fcb-test.exe, version: 1.0.5539.28221, time stamp: 0x54f4d8da
Faulting module name: libgtk-win32-2.0-0.dll, version:, time stamp: 0x3ea43e4d
Exception code: 0xc0000005
Fault offset: 0x001a4ca6
Faulting process id: 0x504
Faulting application start time: 0x01d05531fe94d941
Faulting application path: X:\lineuptool\fcb-test.exe
Faulting module path: C:\Program Files (x86)\GtkSharp\2.12\bin\libgtk-win32-2.0-0.dll
Report Id: 43eb9471-c125-11e4-bb3d-080027a4cf05
Comment 2 JoeL 2015-08-25 17:04:17 UTC
I can confirm this issue. For me it crashes when I select any item from the drop down (select folder mode).
It seems to crash in native code.