> Can anyboby explain me why do I get this kind of error?
Perhaps - although we might need to see more detail of your code...
> I am using VectorLinux 6.0 Standard.With xfce graph environment.
Which fltk variant?
> I have inherited whole project from previous worker. And I
> don't really
> know how project was developed before.
> I get this kind of error using functions which look like this:
> Function {name(some_struct *struct_name)}{open return_type void}
> {code
> Fl::lock();
> //do smth
> Fl::unlock();
> //do smth
> Fl::flush();
> }
> It is strange to me that I have this error on two different
> OS (Mandriva 2007(KDE 3.x) and VectorLinux 6.0(xfce)) and in
> different functions. But functions is similar to what I've
> written before.
> And I have this error in different time interval. My app runs
> for some time and than it throws this error.
>
> Any help would be appreciated.
The use of lock() and unlock() imply that this is threaded code. Is it?
If so, you need to be aware that interaction between threads, and
interacting with the GUI context from multiple threads, can be very
error prone.
In particular, you can only safely call Fl::flush() from the "main"
thread (i.e. the thread of execution in which the fltk main loop
resides, which ideally should be the thread that contains your main()
entry point.)
>From a subsidiary thread, you should call Fl::awake() instead, never
Fl::flush(), so that looks like an outright error.
Also, be aware that you can not create or destroy any widgets from
subsidiary threads, they can only be created or destroyed in the main
thread. Note that this also means that you must not throw any of the
fl_alert family of dialog boxes from the subsidiary threads - they must
always be thrown from the main thread.
There is some discussion of this in Chapter 10 of the fltk-1.1.9 manual.
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk