gtk-sharp icon indicating copy to clipboard operation
gtk-sharp copied to clipboard

Gtk.PrintOperation stopped working on Windows 10

Open lexos-development opened this issue 5 years ago • 13 comments

I have a cross platform application that I developed under OXS with Visual Studio that should mainly run under Windows. Lately I realized, that the Gtk.PrintOperation now causes a System.AccessViolationException under Windows, regardless if I build it as native Windows Application using GtkSharp on Windows or run the Mono build from the OSX build by Mono. About one month ago, every thing worked fine.

I am clueless at this point, because nothing I tried worked out. Is there anyone who can still print with Gtk under Windows? Is there a C# application that I can build and try? I did fail to get the gtk-sharp libraries and examples built on Windows. The documentation was to poor to understand what I therefor need.

Any suggestions?

lexos-development avatar May 09 '19 10:05 lexos-development

Is this using gtk# 2.12? Might be a problem in the bindings. I'll take a look and release a new version if it's 2.12

Therzok avatar May 09 '19 12:05 Therzok

Yes it is 2.12.45, as it is in the installer for .net Windows. Thanks allot for your support!

lexos-development avatar May 09 '19 13:05 lexos-development

Seeing the dame thing here. It seems that the callbacks are not getting generated with the userdata parameter, have to figure out why.

Therzok avatar May 09 '19 15:05 Therzok

Huh, no, the class only has these two: https://github.com/bratsche/gtk/blob/ff3424b5ef5177f32fa6933cee439dfa3d3d89b8/gtk/gtkprintoperation.h#L91

I'm wondering if there's some mis-use at gtk level of the native Windows APIs. The bindings look okay.

Therzok avatar May 09 '19 15:05 Therzok

Was it still gtk# 2.12.45 a few months ago?

Therzok avatar May 09 '19 15:05 Therzok

I'm trying to pin down whether it's a problem with gtk# or some windows update changed something.

Therzok avatar May 09 '19 16:05 Therzok

As fare as I know, I did not change anything at the libraries and at the usage. Furthermore I checked out the version from a month ago, built it new and it also failed. So I am pretty sure, that it is something within the print layer. I also had the last windows update in mind, but could not tell, because there was no possibility to debug the cause. This was the reason, why I was asking if anyone knows an application that uses Gtk.PrintOperation, so that I can check, whether this application has this issue now too.

lexos-development avatar May 09 '19 16:05 lexos-development

Yup, seems to not be gtk# (the bindings) at fault. Maybe something in gtk+, which I don't have expertise in fixing.

Therzok avatar May 09 '19 19:05 Therzok

Hmm, who could we contact then? Who is the provider of the gtk library? Should Gimp than be affected also?

lexos-development avatar May 09 '19 21:05 lexos-development

I now tried Gimp 2.10 under Windows and it is not affected. So at least the new GTK+ libraries (that I guess are included within Gimp) are working fine. Is there anything I can check? What are the affected dependencies of the gtk-sharp package?

lexos-development avatar May 10 '19 10:05 lexos-development

You cannot be sure that Gimp is shipping the most recent gtk. Recreate the desired behaviour in a simple c program and check if the error is present on Windows.

sundermann avatar May 10 '19 10:05 sundermann

Ok, which gtk libraries are used within gtk-sharp? Do you know the repository?

lexos-development avatar May 10 '19 10:05 lexos-development

Yup, seems to not be gtk# (the bindings) at fault. Maybe something in gtk+, which I don't have expertise in fixing.

Are there any further steps in progress or do I have to surround it by using the Windows libraries?

lexos-development avatar May 15 '19 07:05 lexos-development