| My suggestion: I would not waste my time trying
to get FLTK to work on a multi-threaded application.
It will most likely fail (esp on Windows). The FLTK
developers already said that the way Csound implements
FLTK when doing it in a separate thread is not guaranteed
to work. Csound can also implement it on a single thread,
and that is the correct way of doing things as prescribed
by the FLTK model. However this will again be liable to
fail if the csound lib is used in a multi-threaded
application. In order for it to work with no issues, it will
have to be single-threaded, if multi-threading is used
all FLTK code has to run on the main/parent/starting thread.
This path has been threaded by John Ramsdell and then
by myself, independently, reaching similar dead-ends and
the conclusion is: don't bother.
While multithreading works on Linux, Windows and OSX 10.3
with the 'classic' command-line frontends, this is just
an accident and might stop working in the future.
With frontends that are themselves multithreaded, things
get more problematic and that's why Lettuce has these
problems with FLTK widgets.
You can debug, but you'll see that the source of the
problem will most likely be FL::wait().
Victor
>
> Rory Walsh wrote:
>
> > ... probably the root to my problem is that when I stop
> > Csound from Lettuce the fltk panel remains open, hence
> > when I re-run the instrument it's not surprising that I
> > get errors. I'm working with the Borland C++ debugger.
> > I'd like to know more about the threading issues with
> the fltk opcodes. Are there any preprocessor commands I
> > can include that may sort it out?
>
> Alas, I'm too far from Windows these days, but perhaps I
> can offer a hint. You'll need a debugger capable of
> illustrating the separate threads so you can see
> where/why the FLTK panel stays open. Maybe there's a
> setting for the Borland debugger ?
>
> Can you run the executable from the debugger ? If so, run
> a backtrace from the error point and post the results.
> Istvan and Michael can certainly help you more than I
> can. I am not a programmer, and C++ really leaves me in
> the dust. :)
>
> Best,
>
> dp
>
> --
> Send bugs reports to this list.
> To unsubscribe, send email to
> csound-unsubscribe@lists.bath.ac.uk |