1. Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Kenneth Rhodes <wolf_man_jacques at excite.com> Apr 21, 2005
- 533 views
Using Euphoria 2.5 official translator, I get a segmentation fault when trying to execute translated/compiled versions of calendar.exw and wxIDE-0-2-2 under Linux. Shroud works like a dream! I wonder if I have the final official version of the translator though - when I run ecu without an arguement, I get: Euphoria to C Translator 2.5 for Linux. Copyright (c) Rapid Deployment Software 2005 Permission is freely granted to anyone to copy and redistribute this Public Domain Edition of Euphoria. file name to translate to C? Wasn't that Public Domain notice deleted from the final version? Ken Rhodes 100% Microsoft Free!
2. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 21, 2005
- 474 views
Kenneth Rhodes wrote: > > > Using Euphoria 2.5 official translator, I get a segmentation fault > when trying to execute translated/compiled versions > of calendar.exw and wxIDE-0-2-2 under Linux. > > Shroud works like a dream! I don't have this problem when compiling. Maybe you could put in a trace(3) to see where the problem is? > I wonder if I have the final official version of the translator though - > when I run ecu without an arguement, I get: > > Euphoria to C Translator 2.5 for Linux. > Copyright (c) Rapid Deployment Software 2005 > Permission is freely granted to anyone to copy and > redistribute this Public Domain Edition of Euphoria. > > file name to translate to C? > > Wasn't that Public Domain notice deleted from the final version? Doesn't appear to have been. Technically, I think the e2c executables are still PD, but the registered static libs are not. Matt Lewis
3. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Kenneth Rhodes <wolf_man_jacques at excite.com> Apr 21, 2005
- 475 views
Matt Lewis wrote: > > Kenneth Rhodes wrote: > > > > > > Using Euphoria 2.5 official translator, I get a segmentation fault > > when trying to execute translated/compiled versions > > of calendar.exw and wxIDE-0-2-2 under Linux. > > > > Shroud works like a dream! > > I don't have this problem when compiling. Maybe you could put in a trace(3) > to see where the problem is? > Matt Lewis > Okay, I've sent a copy of the ctrace.out file to you (Matt) and Rob Craig as well. For what its worth, I'm using gcc 4.0. Ken Rhodes 100% Microsoft Free!
4. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 21, 2005
- 466 views
Kenneth Rhodes wrote: > > > Okay, I've sent a copy of the ctrace.out file to you (Matt) and > Rob Craig as well. > > For what its worth, I'm using gcc 4.0. That could be the problem. The .so was built using gcc 3.2. I haven't seen the email yet. Did you send it to my gmail address (I can't get to the yahoo account right now)? Matt Lewis
5. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Kenneth Rhodes <wolf_man_jacques at excite.com> Apr 21, 2005
- 471 views
Matt Lewis wrote: > > That could be the problem. The .so was built using gcc 3.2. I haven't > seen the email yet. Did you send it to my gmail address (I can't get > to the yahoo account right now)? > > Matt Lewis > I could have sent it to your Yahoo address. I have just posted a copy of ctrace.out to your gmail account. Ken Rhodes 100% Microsoft Free!
6. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 21, 2005
- 462 views
Kenneth Rhodes wrote: > > Matt Lewis wrote: > > > > Kenneth Rhodes wrote: > > > > > > > > > Using Euphoria 2.5 official translator, I get a segmentation fault > > > when trying to execute translated/compiled versions > > > of calendar.exw and wxIDE-0-2-2 under Linux. > > > > > > Shroud works like a dream! > > > > I don't have this problem when compiling. Maybe you could put in a trace(3) > > > > to see where the problem is? > > > Matt Lewis > > > > Okay, I've sent a copy of the ctrace.out file to you (Matt) and > Rob Craig as well. > > For what its worth, I'm using gcc 4.0. Looking at the trace, I can't see why it crashed. It had already made lots of calls to the library, so that should be fine. Matt Lewis
7. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Robert Craig <rds at RapidEuphoria.com> Apr 21, 2005
- 476 views
- Last edited Apr 22, 2005
Kenneth Rhodes wrote: > Okay, I've sent a copy of the ctrace.out file to you (Matt) and > Rob Craig as well. > > For what its worth, I'm using gcc 4.0. Thanks, I received it. I don't know what the problem might be. I have Mandrake 10.0, so I might be able to duplicate the problem here. By the way, the translator itself is Public Domain. It can be copied freely. It's the fully-enabled libraries that you must register for. Previously, the *Binder* had the PD designation by mistake. (you reported it) That has been corrected. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
8. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Robert Craig <rds at RapidEuphoria.com> Apr 24, 2005
- 500 views
Kenneth Rhodes wrote: > Using Euphoria 2.5 official translator, I get a segmentation fault > when trying to execute translated/compiled versions > of calendar.exw and wxIDE-0-2-2 under Linux. > > Shroud works like a dream! I tried calendar.exw on my Mandrake 10.0 system with GCC 3.3.2 It works fine with the interpreter, exu. It crashes when translated/compiled with ecu. It crashes while executing the statement: c_proc(eucall, {}) at cplusplus.e:11 after doing a few pokes into memory. It has successfully executed this statement a couple of dozen times, and when it crashes, it's the first time that it tries to execute wxEntryStart. The parameters are {0, 0}. I'm not sure how to debug this further because I don't seem to have the source for the eucall C++ routine. In any case, it appears that Matt is doing some very low-level tricky operation here, and for some reason it works when interpreted, but not when compiled. It does not look like a simple code-generation error on the part of the Translator. It may have something to do with calling conventions, or accessing the NULL pointer, or something. Perhaps it only works in the interpreter by luck. calendar.exw is not the only one that fails in this way. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
9. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 24, 2005
- 494 views
Robert Craig wrote: > > Kenneth Rhodes wrote: > > Using Euphoria 2.5 official translator, I get a segmentation fault > > when trying to execute translated/compiled versions > > of calendar.exw and wxIDE-0-2-2 under Linux. > > > > Shroud works like a dream! > > I tried calendar.exw on my Mandrake 10.0 system with GCC 3.3.2 > > It works fine with the interpreter, exu. > > It crashes when translated/compiled with ecu. I'll compile a demo and upload it later today, because I haven't had these problems...I regularly use a translated wxIDE. I strongly suspect that the problem is that wxeu.so was built with a different version of gcc (v3.2). If we find that this is an issue, I can always have multiple versions of the .so (or you could build it yourself :). > It crashes while executing the statement: > c_proc(eucall, {}) > at cplusplus.e:11 > after doing a few pokes into memory. > It has successfully executed this statement a couple of dozen times, > and when it crashes, it's the first time that it tries to execute > wxEntryStart. The parameters are {0, 0}. > > I'm not sure how to debug this further because I don't > seem to have the source for the eucall C++ routine. > In any case, it appears that Matt is doing some very > low-level tricky operation here, and for some reason it works when > interpreted, but not when compiled. It does not look like a > simple code-generation error on the part of the Translator. > It may have something to do with calling conventions, or accessing > the NULL pointer, or something. Perhaps it only works in the > interpreter by luck. calendar.exw is not the only one that fails > in this way. > It's not *that* low level. It's basically a way to call functions by pointer. The source for this is in the patch included in the developer's package. It's in src/common/utilscmn.cpp, and is as follows: // include/wx/utils.h: class WXDLLEXPORT wxEuCall { public: static int eufunc; static int euparam[17]; static int euret; static void eucall(); static int eulog( const char * ); }; // src/common/utilscmn.cpp: typedef int (*eucall_0)(); typedef int (*eucall_1)(int); typedef int (*eucall_2)(int, int); typedef int (*eucall_3)(int, int, int); typedef int (*eucall_4)(int, int, int, int); typedef int (*eucall_5)(int, int, int, int, int); typedef int (*eucall_6)(int, int, int, int, int, int); typedef int (*eucall_7)(int, int, int, int, int, int, int); typedef int (*eucall_8)(int, int, int, int, int, int, int, int); typedef int (*eucall_9)(int, int, int, int, int, int, int, int, int); typedef int (*eucall_10)(int, int, int, int, int, int, int, int, int, int); typedef int (*eucall_11)(int, int, int, int, int, int, int, int, int, int, int); typedef int (*eucall_12)(int, int, int, int, int, int, int, int, int, int, int, int); typedef int (*eucall_13)(int, int, int, int, int, int, int, int, int, int, int, int, int); typedef int (*eucall_14)(int, int, int, int, int, int, int, int, int, int, int, int, int, int); typedef int (*eucall_15)(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int); int wxEuCall::eufunc = 0; int wxEuCall::euparam[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int wxEuCall::euret = 0; int wxEuCall::eulog( const char *file) { wxLog* oldLog = wxLog::SetActiveTarget(new wxLogStderr(fopen( file, "w" ))); return (int) oldLog; } void wxEuCall::eucall() { int params = euparam[0]; // wxLogMessage( "eucall: %d [%d]", eufunc, euparam[0] ); switch (params){ case 0: euret = ( (eucall_0) eufunc)(); break; case 1: euret = ( (eucall_1) eufunc)( euparam[1]); break; case 2: euret = ( (eucall_2) eufunc)( euparam[1], euparam[2]); break; case 3: euret = ( (eucall_3) eufunc)( euparam[1], euparam[2], euparam[3]); break; case 4: euret = ( (eucall_4) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4]); break; case 5: euret = ( (eucall_5) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5]); break; case 6: euret = ( (eucall_6) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6]); break; case 7: euret = ( (eucall_7) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7]); break; case 8: euret = ( (eucall_8) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7], euparam[8]); break; case 9: euret = ( (eucall_9) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7], euparam[8], euparam[9]); break; case 10: euret = ( (eucall_10) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7], euparam[8], euparam[9], euparam[10]); break; case 11: euret = ( (eucall_11) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7], euparam[8], euparam[9], euparam[10], euparam[11]); break; case 12: euret = ( (eucall_12) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7], euparam[8], euparam[9], euparam[10], euparam[11], euparam[12]); break; case 13: euret = ( (eucall_13) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7], euparam[8], euparam[9], euparam[10], euparam[11], euparam[12], euparam[13]); break; case 14: euret = ( (eucall_14) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7], euparam[8], euparam[9], euparam[10], euparam[11], euparam[12], euparam[13], euparam[14]); break; case 15: euret = ( (eucall_15) eufunc)( euparam[1], euparam[2], euparam[3], euparam[4], euparam[5], euparam[6], euparam[7], euparam[8], euparam[9], euparam[10], euparam[11], euparam[12], euparam[13], euparam[14], euparam[15]); break; default: ; } // wxLogMessage( "eucall returning %d", euret ); }
10. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Kenneth Rhodes <wolf_man_jacques at excite.com> Apr 24, 2005
- 500 views
This is very strange. My initial report of the the translate/compile failure was under GNOME 2.6 useing the gnome-terminal. This morning I ran the XFCE desktop and ran the translated/compiled executable of wxIDE with no problem. I then tried gnome-terminal under XFCE and succeeded again! I then ran KDE and tried the executable under konsole - and it failed! Hope this helps. Ken Rhodes 100% Microsoft Free!
11. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 24, 2005
- 481 views
Kenneth Rhodes wrote: > > > This is very strange. My initial report of the the translate/compile failure > was under GNOME 2.6 useing the gnome-terminal. This morning I ran the XFCE > desktop and ran the translated/compiled executable of wxIDE with no problem. > I then tried gnome-terminal under XFCE and succeeded again! I then ran > KDE and tried the executable under konsole - and it failed! Weird. Here's a link to one I translated myself (~1MB): http://wxeuphoria.sourceforge.net/files/wxide.tar.gz Try running that and let me know how it works. Matt Lewis
12. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Kenneth Rhodes <wolf_man_jacques at excite.com> Apr 24, 2005
- 484 views
Matt Lewis wrote: > > Kenneth Rhodes wrote: > > > > > > This is very strange. My initial report of the the translate/compile > > failure > > was under GNOME 2.6 useing the gnome-terminal. This morning I ran the XFCE > > desktop and ran the translated/compiled executable of wxIDE with no problem. > > I then tried gnome-terminal under XFCE and succeeded again! I then ran > > KDE and tried the executable under konsole - and it failed! > > Weird. Here's a link to one I translated myself (~1MB): > > <a > href="http://wxeuphoria.sourceforge.net/files/wxide.tar.gz">http://wxeuphoria.sourceforge.net/files/wxide.tar.gz</a> > > Try running that and let me know how it works. > > Matt Lewis > Your executable ran under XFCE; however I got an error message indicating that control data could not be loaded and gui would not be functional. I renamed it to mwxide and copied it to my wxide directory where the *.edb file is located and still got the same error message. Please note that my compiled version of wxIDE appears to run perfectly, but only under XFCE. I tried it under ICEWM too - failed. Which desktop do you use, Matt? Ken Rhodes 100% Microsoft Free!
13. Re: Eu2C segmentation fault, wxEuphoria v0.6.0
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 24, 2005
- 490 views
Kenneth Rhodes wrote: > > Which desktop do you use, Matt? I generally use GNOME, though I also have KDE installed. It's a RH8.0 box. Matt Lewis