Re: [Ecls-list] cl_boot crash

2010-08-01 Thread Juan Jose Garcia-Ripoll
The problem you just found is intimately related to the other one. ECL uses a garbage collector, evaluation environments and other stuff that has to be created *for each* thread where you want to execute or evaluate Common Lisp code. In the simple modification you made the routine new_Command1 just

Re: [Ecls-list] cl_boot crash

2010-07-31 Thread John DeSoi
On Jul 31, 2010, at 5:49 PM, Juan Jose Garcia-Ripoll wrote: > Yes, there seems to be one issue remaining. If you start the 4D application > and attempt to quit (just from the Finder, not using GDB), then 4D hangs. It > has to be killed using the dock menu or process manager. > > Here I cannot

Re: [Ecls-list] cl_boot crash

2010-07-31 Thread Juan Jose Garcia-Ripoll
On Sat, Jul 31, 2010 at 8:44 PM, John DeSoi wrote: > Thanks so much for your help so far. I think we are almost there. I would > have never figured it out :). > I must say I thought all the time that the cause was related to the use of secondary threads for the plugin: it is the most fragile and

Re: [Ecls-list] cl_boot crash

2010-07-31 Thread John DeSoi
Hi Juanjo, Thanks so much for your help so far. I think we are almost there. I would have never figured it out :). On Jul 31, 2010, at 10:32 AM, Juan Jose Garcia-Ripoll wrote: > Finally, to shut down the plugin one needs some mechanism to communicate it > to the thread that it should stop. I

Re: [Ecls-list] cl_boot crash

2010-07-31 Thread Juan Jose Garcia-Ripoll
On Sat, Jul 31, 2010 at 4:32 PM, Juan Jose Garcia-Ripoll < juanjose.garciarip...@googlemail.com> wrote: > In your case ECL is initialized from a secondary thread, because this is a > GUI, and the garbage collector fails to recognize the limits of the stack. > Furthermore, the thread in which it is

Re: [Ecls-list] cl_boot crash

2010-07-31 Thread Juan Jose Garcia-Ripoll
I will post what I found because it may be important for other plugin developers. The Boehm-Weiser garbage collector assumes that it is initialized from the main thread of a program. That thread has to live as long as the garbage collector, and in some platforms it has some special properties, suc

Re: [Ecls-list] cl_boot crash

2010-07-29 Thread Juan Jose Garcia-Ripoll
On Thu, Jul 29, 2010 at 2:26 PM, John DeSoi wrote: > I ran it without GDB and 4D crashes (quits and the OS says that the > application crashed). Below are the details from Crash Reporter. I called > GC_init() rather than cl_boot. This is OS X 10.5.8. > This obviously points out a problem in the

Re: [Ecls-list] cl_boot crash

2010-07-29 Thread John DeSoi
On Jul 29, 2010, at 4:20 AM, Juan Jose Garcia-Ripoll wrote: > This is _not_ necessarily a crash. If this is OS X, this signal is used by > the garbage collector to detect when memory is written to, marking it for > inspection later on. What I meant is to really run a program, no GDB > involved

Re: [Ecls-list] cl_boot crash

2010-07-29 Thread Juan Jose Garcia-Ripoll
On Thu, Jul 29, 2010 at 2:34 AM, John DeSoi wrote: > > On Jul 28, 2010, at 5:36 AM, Juan Jose Garcia-Ripoll wrote: > > > There might be some incompatibility between the garbage collector and > 4D's code. To ensure this is not the case, remove the call to cl_boot() and > call instead GC_init(). If

Re: [Ecls-list] cl_boot crash

2010-07-28 Thread John DeSoi
On Jul 28, 2010, at 5:36 AM, Juan Jose Garcia-Ripoll wrote: > There might be some incompatibility between the garbage collector and 4D's > code. To ensure this is not the case, remove the call to cl_boot() and call > instead GC_init(). If the collector still crashes then this is the culprit. I

Re: [Ecls-list] cl_boot crash

2010-07-28 Thread Juan Jose Garcia-Ripoll
On Wed, Jul 28, 2010 at 2:13 AM, John DeSoi wrote: > I'm trying to create a 4D plugin to host ECL (OS X 10.5.8). I call cl_boot > when the plugin is initialized, but 4D always crashes. If I trace under GDB, > it appears to crash in GC_push_all_eager at the line "q = (ptr_t)(*p);" > There might b

Re: [Ecls-list] cl_boot crash

2010-07-27 Thread John DeSoi
Hi Louis, That is exactly what I have. Thanks for the suggestion. John On Jul 27, 2010, at 10:55 PM, Louis Höfler wrote: > I initialize it like this: > int argc = 1; > char* argv[1]; > argv[0] = ""; > cl_boot(argc, argv); > > Using a unitialized variable for cl_boot will crash it. John

Re: [Ecls-list] cl_boot crash

2010-07-27 Thread Louis Höfler
ecls-list@lists.sourceforge.net Betreff: [Ecls-list] cl_boot crash I'm trying to create a 4D plugin to host ECL (OS X 10.5.8). I call cl_boot when the plugin is initialized, but 4D always crashes. If I trace under GDB, it appears to crash in GC_push_all_eager at the line "q = (ptr_t)(*p);&qu

[Ecls-list] cl_boot crash

2010-07-27 Thread John DeSoi
I'm trying to create a 4D plugin to host ECL (OS X 10.5.8). I call cl_boot when the plugin is initialized, but 4D always crashes. If I trace under GDB, it appears to crash in GC_push_all_eager at the line "q = (ptr_t)(*p);" I have included part of the crash report below. Unfortunately, I know ju