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()


new topic     » topic index » view message » categorize

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?

new topic     » goto parent     » topic index » view message » categorize

3. Re: euGtk in windows

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?

new topic     » goto parent     » topic index » view message » categorize

4. Re: euGtk in windows

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu