Summary: | GLUgl2.gluScaleImage() consumes all memory | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Wade Walker <wwalker3> |
Component: | opengl | Assignee: | Sven Gothel <sgothel> |
Status: | VERIFIED FIXED | ||
Severity: | enhancement | CC: | odimond |
Priority: | --- | ||
Version: | 2 | ||
Hardware: | All | ||
OS: | all | ||
Type: | --- | SCM Refs: | |
Workaround: | --- | ||
Attachments: |
JOGL 2 unit test
JOGL 1 unit test |
Description
Wade Walker
2011-01-24 23:52:39 CET
Created attachment 222 [details]
JOGL 2 unit test
Created attachment 223 [details]
JOGL 1 unit test
Problem identified in Type_Widget. In JOGL 1, the constructor was: public Type_Widget() { buffer = ByteBuffer.allocate( 4 ); } In JOGL 2, it's this: public Type_Widget() { buffer = ByteBuffer.allocateDirect( 4 ); } When I change it back to how it was in JOGL 1, the unit test no longer eats all memory and crashes. Apparently creating these direct buffers inside the inner loops of Image.fill_image() and Image.empty_image() is more than the JVM can handle for some reason. With this fix, the unit test consumes hardly any memory; without the fix, it eats > 6GB before hitting the page file. I'll submit the JOGL2 unit test and fix as a pull request shortly. merged, passed in #280 |