[Gtk-sharp-list] PInvokeStackImbalance was detected
bratsche at gnome.org
Mon May 15 20:01:06 EDT 2006
I'm relatively new to Mono and C# stuff. I have been hacking on a GTK app
using Mono on Linux, and right now I am trying to get it to build and run
using VS2005 on Windows. I am having a little bit of trouble on my expose
event handling for a custom widget, where I have a Gdk.EventExpose arg 'e'
and attempt to access e.Area.X. VS emits a 'PInvokeStackImbalance was
detected' popup, with the following message:
PInvokeStackImbalance was detected
Message: A call to PInvoke function
unbalanced the stack. This is likely because the managed PInvoke signature
does not match the unmanaged target signature. Check that the calling
convention and parameters of the PInvoke signature match the target
I looked through the sources and found that
gtksharp_gdk_event_expose_get_area does the following:
gtksharp_gdk_event_expose_get_area (GdkEventExpose *event)
And the C# source for EventExpose does:
public Rectangle Area
return gtksharp_gdk_event_expose_get_area (Handle);
When I looked at the Gdk.Rectangle constructors, I see only one that accepts
(Point, Size) and one that accepts (int, int, int, int). At a glance, this
looks like a bug to me but since I'm fairly new to C# and also to the Gtk#
bindings, I couldn't immediately say for certain or how to solve it yet.
Can anyone confirm if I'm on the right track with solving my problem?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list