1. euGtk in windows
I'm testing euGTK library.
The following sample code run ok in puppylinux but it crash in windows when I
click the button.
--test euGTK
include wrapper.e
constant app_win=window("test")
when(app_win,"destroy",quit,0)
constant b = button("_Crash")
function btn_clicked(atom btnRef, atom data)
return 1
end function
constant cb_btn_clicked = call_back(routine_id("btn_clicked"))
when(b,"clicked",cb_btn_clicked,0)
addto(app_win,b)
show(app_win)
gtkmain()
2. Re: euGtk in windows
jacques deschênes wrote:
>
> I'm testing euGTK library.
> The following sample code run ok in puppylinux but it crash in windows when
> I click the button.
Can you please post the error message?
3. Re: euGtk in windows
- Posted by jacques deschênes <desja at globetrot?er.net>
Dec 31, 2007
-
Last edited Jan 01, 2008
The message is:
c:\euphoria\include\gtk2\wrapper.e:127 in procedure gtkmain()
A machine-level exception occurred during execution of this statement
the exception arise during execution of gtk_main() function.
My guess is that it crash when calling the callback handler for the button.
If I don't set a callback it doesn't crash.
Michael J. Sabal wrote:
>
> jacques deschênes wrote:
> >
> > I'm testing euGTK library.
> > The following sample code run ok in puppylinux but it crash in windows when
> > I click the button.
>
> Can you please post the error message?
4. Re: euGtk in windows
- Posted by Matt Lewis <matthewwalkerlewis at g?ail.c?m>
Dec 31, 2007
-
Last edited Jan 01, 2008
jacques deschênes wrote:
>
> The message is:
> c:\euphoria\include\gtk2\wrapper.e:127 in procedure gtkmain()
> A machine-level exception occurred during execution of this statement
>
> the exception arise during execution of gtk_main() function.
> My guess is that it crash when calling the callback handler for the button.
> If I don't set a callback it doesn't crash.
Have you checked the calling convention of the call_back? Everything's
cdecl in linux, but in windows, you'll get a stdcall call_back by default.
I don't know what gtk2 uses on windows, but I suspect it's likely to be
cdecl.
It would most likely crash after your callback returns (because that's
when the stack corruption occurs).
Matt