Max Gilead wrote:
>
> Jean-Yves BRUD wrote:
>
> > Hello,While using gljMakeCurrent() method, I get a false return(and a
> > "problem in use() method" in the sDisplay function).After that, the
> > refresh does not work or work bad. It seems to occur wile memory
> > become low. - Is anybody got already this messsage ?
>
> In some particular piece of code? In general when I see this message I
> consider this a bug in my code ;-) because this means I try to activate
> the context while component is not already on screen. I don't know of
> other situations that can cause this message. This sometimes happend
> when system is heavily loaded (that's what you mean by 'memory become
> low'?) and another thread tries to use display before it's really
> visible.
>
> > - What might exactly mean the false return of the gljMakeCurrent()
> > method ?
>
> As I said above, only reason that I know is that component is not
> already visible on screen. Are there any other possible reasons?
>
.. or the Context is allready being used by another thread !
E.g., you have a GLAnimCanvas, the context is being used
by your rendering thread and you use a JVM with native threading !
Then you press a button, and your action listener trys to occupy the
allready occupied context !
Thats it !
To avoid this ... just out all stuff in the display() method
and use flags ! Or just be sure, that you give your action
a chance the next time ...
Sven
--
mailto:sgo...@ja...
www : http://www.jausoft.com
voice : +49-521-2399440, +49-170-2115963; fax: +49-521-2399442
|