| There were threading problems in csound5 that I resolved by changing all
Fl::wait(n)
to:
Fl::lock()
Fl::wait(n)
Fl::unlock()
This works on Windows and on Linux, though on Linux you have to configure
FLTK to build with threads enabled (see FLTK configure --help). Perhaps you
need to do that on OS X also.
Original Message:
-----------------
From: Matt J. Ingalls ingalls@mills.edu
Date: Thu, 13 May 2004 11:49:31 -0700 (PDT)
To: csound-dev@eartha.mills.edu
Subject: [CSOUND-DEV:4690] Re: fltk (almost) on osx
its a static library. this is how it is in the provided sdk [at least
for the mac/codewarrior package] all the fltk code is compiled into static
library that all the example projects link to. since csound will not
compile for me with c++ compiler, i had to put widgets.cpp in the fltk
library.
anyway, i doubt the problems [other than the debugger not liking it for
some reason] is due to the lib.
i am guessing the crashing is due to thread conflicts, probably the
fltk thread is fighting with the application thread to set screen drawing
parameters...
-m
On Thu, 13 May 2004, Gabriel Maldonado wrote:
> A separate library? Couldn't be this the cause of the crash? (I don't
> know how OsX handles dynamic (?) libraries). Strange indeed, because
> this stuff seems to work on Linux stably.
>
> Gab
>
> Matt J. Ingalls wrote:
> > well i cant quite figure out how the fltk opcodes are working [where is
> > the krate code!?!?]
> >
> > anyway i was able to get it to work with:
> >
> > // Fl::run();
> > while(fl_windows.size()) {
> > long i = 0;
> > if (i == 0)
> > Fl::flush();
> > i++;
> > }
> >
> > notice there is NO call to Fl::run() or Fl::wait().. as far as i can
tell
> > those are the only 2 routines to "run" fltk. [ so this is really weird
> > ????]
> >
> > one side effect now is resizing the window messes up the drawing [weird
> > colors and random lines, etc]
> >
> > anyway, its crashing a lot [somewhat randomly] and i have no good way to
> > debug since i had to put widgets.cpp in a separate library so i am about
> > to give up for a while at least..
> >
> > -m
> >
> >
> > On Wed, 12 May 2004, Gabriel Maldonado wrote:
> >
> >
> >>As I told it before, you should make the main FLTK panel to receive some
> >>bogus message. I suspect this could function, because you told me that
> >>if you resize the window, the widgets go to the right positions.
> >>
> >>Anyway, try to ask to the FLTK list/newsgroup
> >>(http://www.fltk.org/newsgroups.php) , maybe there is some mac OsX/FLTK
> >>expert there. Be sure to explain that you are running FLTK as a child
> >>thread in mac OsX.
> >>
> >>good luck!
> >>
> >>Gab
> >>
> >>Matt J. Ingalls wrote:
> >>
> >>>well i was unable to turn on the c++ compiler without thousands of
errors.
> >>>but i was able to compile widgets.cpp inside the fltk library.
> >>>after adding some #defined(__MACH__) to use some of the linux code,
> >>>got fltk sort of working on mac, but in addition to the many crashes,
> >>>the fltk windows do not update, which isnt too nice. i tried
> >>>replacing FL:run() with
> >>>while (1) { Fl:wait(); Fl::redraw(); }
> >>>
> >>>no difference.
> >>>
> >>>any suggestions?
> >>>
> >>>
> >>>-m
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> >
> >
>
>
> --
> Gabriel Maldonado
> http://csounds.com/maldonado
> --
>
>
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ . |