Re: Crash when creating more than ~15 jogl/awt windows
Posted by Sven Gothel on Jun 15, 2011; 8:52pm
URL: https://forum.jogamp.org/Crash-when-creating-more-than-15-jogl-awt-windows-tp3054540p3069529.html
On Wednesday, June 15, 2011 07:44:22 PM GiGurra [via jogamp] wrote:
>
> What I find is wierd is that there seems to be a maximum number of contexts
> PER PROCESS.
> I can easily have over 100 contexts, as long as they are split into separate
> processes.
>
> What I wonder is, is this normal?
Sorry for having ignored this thread, busy w/ RC3.
I see you have copy/paste your code in an email as a test case I assume,
could you make your question, or bug-statement more clear and
rephrase it as a junit test please ?
Then I will pull it, or copy your attached java files (no copy/paste please)
- to investigate the limitations you mentioned.
For sure Julien is right, there are some native constraints by driver and hardware
which are _not_ specified. In the past multithreading and/or multiple context per windows
were pretty buggy in drivers .. but IMHO this has changed over time until today.
However, having unit tests covering those issues are a great thing to have.
- UC1: n ctx - n drawables - n threads (ctx/draw)
- normal case, no issue IMHO
- UC2.1: n ctx - 1 drawable - 1 thread
- UC2.2: n ctx - 1 drawable - n thread
- UC3: n ctx - n drawables - n threads, alternate ctx/drawable association
- ctx1 - draw1, ctx2 - draw2
- ctx2 - draw1, ctx1 - draw2
- ..
I can imagine that maybe UC2.2 and UC3 could cause problems w/ some drivers,
at least this was true for some drivers back in 2005.
A maximum number of ctx/threads, well, I don't know.
I would do all of the above using NEWT ofc, as Julien mentioned,
NEWT animation threads will not funnel via one rendering thread.
+++
Using AWT however is a 'bitch' here, since (see above),
it needs to funnel _all_ GL access via the AWT-EDT.
Hence you fill see a saturation phenomenom very easily, ie stottering animation.
No 'error' shall happen though.
+++
You 50 'window/ctx per thread' max looks like a driver limitation .. indeed weird.
Would be awesome to put this in a unit test to see the diff behavior on diff platforms/drivers.
Cheers, Sven