<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>670</bug_id>
          
          <creation_ts>2013-01-19 01:41:37 +0100</creation_ts>
          <short_desc>Regression: Drawable already added to animator</short_desc>
          <delta_ts>2013-01-19 01:48:01 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Newt</product>
          <component>x11</component>
          <version>1</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Xerxes Rånby">xerxes</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>---</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2101</commentid>
    <comment_count>0</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2013-01-19 01:41:37 +0100</bug_when>
    <thetext>Testcase:
java -cp jogl-demos/jar/jogl-demos.jar:jogamp-all-platforms/jar/jogl-all.jar:jogamp-all-platforms/jar/gluegen-rt.jar:jogamp-all-platforms/jar/jogl-test.jar:/usr/share/java/junit.jar RawGL2ES2demo

Testsystem:
Ubuntu 12.04 i386 using Mesa GL drivers
1280x1024 monitor
The testcase tries to open a 1920x1080 resolution decides to rezise the window to match monitor, the demo sucessfully renders the first frame visible then hits the Drawable already added to animator exception.

Regression introduced between 1 Jan 2013 and 11 Jan 2013:
1 Jan 2013 is OK
http://jogamp.org/deployment/archive/master/gluegen_619-joal_384-jogl_885-jocl_725/archive/

11 jan 2013 hits this bug
http://jogamp.org/deployment/archive/master/gluegen_620-joal_385-jogl_888-jocl_728/

15 jan 2015 hits this bug
http://jogamp.org/deployment/archive/master/gluegen_624-joal_389-jogl_896-jocl_735/

Output:
familjen@familjen:~/jogamp/test/11jan$ java -cp jogl-demos/jar/jogl-demos.jar:jogamp-all-platforms/jar/jogl-all.jar:jogamp-all-platforms/jar/gluegen-rt.jar:jogamp-all-platforms/jar/jogl-test.jar:/usr/share/java/junit.jar RawGL2ES2demo
Chosen GLCapabilities: GLCaps[glx vid 0x6a, fbc 0x81: rgba 0x8/8/8/8, trans-rgba 0xff/ff/ff/ff, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, dbl, mono  , hw, GLProfile[GL2ES2/GL2.hw], on-scr[.]]
INIT GL IS: jogamp.opengl.gl4.GL4bcImpl
GL_VENDOR: X.Org
GL_RENDERER: Gallium 0.4 on AMD RV770
GL_VERSION: 2.1 Mesa 8.0.4
Horray! vertex shader compiled
Horray! fragment shader compiled
Window resized to width=1213 height=970
Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: Drawable already added to animator: com.jogamp.opengl.util.Animator[started false, animating false, paused false, drawable 1, totals[dt 0, frames 0, fps 0.0], modeBits 1, init&apos;ed true, animThread null, exclCtxThread false(null)], NEWT-GLWindow[ 
	Helper: GLAnimatorControl: com.jogamp.opengl.util.Animator[started false, animating false, paused false, drawable 1, totals[dt 0, frames 0, fps 0.0], modeBits 1, init&apos;ed true, animThread null, exclCtxThread false(null)], GLEventListeners num 1 [RawGL2ES2demo@13f991[init true], ], 
	Drawable: X11OnscreenGLXDrawable[Realized true,
	Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@19bfb30,
	Handle    0x4c00002,
	Surface   jogamp.newt.driver.x11.WindowDriver[Config X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7b8eac90, ResourceToolkitLock[obj 0x1884174, isOwner false, &lt;814013, 195d4fe&gt;[count 1, qsz 0, owner &lt;main-Display-.x11_:0-1-EDT-1&gt;]]], idx 0], visualID 0x6a, fbConfigID 0x81,
	requested GLCaps[rgba 0x8/8/8/1, trans-rgba 0x0/0/0/0, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2ES2/GL2.hw], on-scr[.]],
	chosen    GLCaps[glx vid 0x6a, fbc 0x81: rgba 0x8/8/8/8, trans-rgba 0xff/ff/ff/ff, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, dbl, mono  , hw, GLProfile[GL2ES2/GL2.hw], on-scr[.]]]
, NEWT-Screen[.x11_:0-1-s0, idx 0, refCount 1, 1280x1024, X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7a660830, ResourceToolkitLock[obj 0x1d2b01b, isOwner false, &lt;127fa12, 192c8d9&gt;[count 0, qsz 0, owner &lt;NULL&gt;]]], idx 0], NEWT-Display[.x11_:0-1, excl false, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7a660830, ResourceToolkitLock[obj 0x1d2b01b, isOwner false, &lt;127fa12, 192c8d9&gt;[count 0, qsz 0, owner &lt;NULL&gt;]]]]]
, ParentWindow null
, ParentWindowHandle 0x0 (false)
, WindowHandle 0x4c00002
, SurfaceHandle 0x4c00002 (lockedExt window true, surface true)
, Pos 0/0 (auto false), size 1213x970
, Visible true, focus true
, Undecorated false (false)
, AlwaysOnTop false, Fullscreen false
, WrappedWindow null
, ChildWindows 0, SurfaceUpdatedListeners num 0 [], WindowListeners num 1 [com.jogamp.newt.opengl.GLWindow$1@1c05ffd, ], MouseListeners num 0 [], KeyListeners num 0 [], windowLock &lt;de1b8a, 1e232b5&gt;[count 2, qsz 0, owner &lt;main-Display-.x11_:0-1-EDT-1&gt;], surfaceLockCount 1]], 
	Context: X11OnscreenGLXContext [OpenGL 2.1, options 0x302, 2.1 (Compatibility profile, ES2 compatible, FBO, hardware) - 2.1 Mesa 8.0.4, this 0x13785d3, handle 0x7b875448, jogamp.opengl.gl4.GL4bcImpl@16f144c,
	 quirks: [NoDoubleBufferedPBuffer, NoSetSwapIntervalPostRetarget],
	Drawable: X11OnscreenGLXDrawable[Realized true,
	Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@19bfb30,
	Handle    0x4c00002,
	Surface   jogamp.newt.driver.x11.WindowDriver[Config X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7b8eac90, ResourceToolkitLock[obj 0x1884174, isOwner false, &lt;814013, 195d4fe&gt;[count 1, qsz 0, owner &lt;main-Display-.x11_:0-1-EDT-1&gt;]]], idx 0], visualID 0x6a, fbConfigID 0x81,
	requested GLCaps[rgba 0x8/8/8/1, trans-rgba 0x0/0/0/0, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2ES2/GL2.hw], on-scr[.]],
	chosen    GLCaps[glx vid 0x6a, fbc 0x81: rgba 0x8/8/8/8, trans-rgba 0xff/ff/ff/ff, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, dbl, mono  , hw, GLProfile[GL2ES2/GL2.hw], on-scr[.]]]
, NEWT-Screen[.x11_:0-1-s0, idx 0, refCount 1, 1280x1024, X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7a660830, ResourceToolkitLock[obj 0x1d2b01b, isOwner false, &lt;127fa12, 192c8d9&gt;[count 0, qsz 0, owner &lt;NULL&gt;]]], idx 0], NEWT-Display[.x11_:0-1, excl false, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7a660830, ResourceToolkitLock[obj 0x1d2b01b, isOwner false, &lt;127fa12, 192c8d9&gt;[count 0, qsz 0, owner &lt;NULL&gt;]]]]]
, ParentWindow null
, ParentWindowHandle 0x0 (false)
, WindowHandle 0x4c00002
, SurfaceHandle 0x4c00002 (lockedExt window true, surface true)
, Pos 0/0 (auto false), size 1213x970
, Visible true, focus true
, Undecorated false (false)
, AlwaysOnTop false, Fullscreen false
, WrappedWindow null
, ChildWindows 0, SurfaceUpdatedListeners num 0 [], WindowListeners num 1 [com.jogamp.newt.opengl.GLWindow$1@1c05ffd, ], MouseListeners num 0 [], KeyListeners num 0 [], windowLock &lt;de1b8a, 1e232b5&gt;[count 2, qsz 0, owner &lt;main-Display-.x11_:0-1-EDT-1&gt;], surfaceLockCount 1]], direct true] , 
	Window: jogamp.newt.driver.x11.WindowDriver[Config X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7b8eac90, ResourceToolkitLock[obj 0x1884174, isOwner false, &lt;814013, 195d4fe&gt;[count 1, qsz 0, owner &lt;main-Display-.x11_:0-1-EDT-1&gt;]]], idx 0], visualID 0x6a, fbConfigID 0x81,
	requested GLCaps[rgba 0x8/8/8/1, trans-rgba 0x0/0/0/0, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2ES2/GL2.hw], on-scr[.]],
	chosen    GLCaps[glx vid 0x6a, fbc 0x81: rgba 0x8/8/8/8, trans-rgba 0xff/ff/ff/ff, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, dbl, mono  , hw, GLProfile[GL2ES2/GL2.hw], on-scr[.]]]
, NEWT-Screen[.x11_:0-1-s0, idx 0, refCount 1, 1280x1024, X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7a660830, ResourceToolkitLock[obj 0x1d2b01b, isOwner false, &lt;127fa12, 192c8d9&gt;[count 0, qsz 0, owner &lt;NULL&gt;]]], idx 0], NEWT-Display[.x11_:0-1, excl false, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7a660830, ResourceToolkitLock[obj 0x1d2b01b, isOwner false, &lt;127fa12, 192c8d9&gt;[count 0, qsz 0, owner &lt;NULL&gt;]]]]]
, ParentWindow null
, ParentWindowHandle 0x0 (false)
, WindowHandle 0x4c00002
, SurfaceHandle 0x4c00002 (lockedExt window true, surface true)
, Pos 0/0 (auto false), size 1213x970
, Visible true, focus true
, Undecorated false (false)
, AlwaysOnTop false, Fullscreen false
, WrappedWindow null
, ChildWindows 0, SurfaceUpdatedListeners num 0 [], WindowListeners num 1 [com.jogamp.newt.opengl.GLWindow$1@1c05ffd, ], MouseListeners num 0 [], KeyListeners num 0 [], windowLock &lt;de1b8a, 1e232b5&gt;[count 2, qsz 0, owner &lt;main-Display-.x11_:0-1-EDT-1&gt;], surfaceLockCount 1]]
	at com.jogamp.opengl.util.AnimatorBase.add(AnimatorBase.java:179)
	at RawGL2ES2demo.main(RawGL2ES2demo.java:286)
Window resized to width=1215 height=1000
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:0, 0x7a660830, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0, 0x7b8eac90, refCount 1, unCloseable false]


Expected output:
~/jogamp/test/1jan$ java -cp jogl-demos/jar/jogl-demos.jar:jogamp-all-platforms/jar/jogl-all.jar:jogamp-all-platforms/jar/gluegen-rt.jar:jogamp-all-platforms/jar/jogl-test.jar:/usr/share/java/junit.jar RawGL2ES2demo
Chosen GLCapabilities: GLCaps[glx vid 0x6a, fbc 0x81: rgba 0x8/8/8/8, trans-rgba 0xff/ff/ff/ff, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, dbl, mono  , hw, GLProfile[GL2ES2/GL2.hw], on-scr[.]]
INIT GL IS: jogamp.opengl.gl4.GL4bcImpl
GL_VENDOR: X.Org
GL_RENDERER: Gallium 0.4 on AMD RV770
GL_VERSION: 2.1 Mesa 8.0.4
Horray! vertex shader compiled
Horray! fragment shader compiled
Window resized to width=1213 height=970
Window resized to width=1215 height=1000
cleanup, remember to release shaders
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:0, 0x8c7e080, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0, 0x8c7e9c8, refCount 1, unCloseable false]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102</commentid>
    <comment_count>1</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2013-01-19 01:43:44 +0100</bug_when>
    <thetext>Note that the exception triggers in between the two window resize
Window resized to width=1213 height=970
&lt;exception&gt;
Window resized to width=1215 height=1000

I am using the Ubuntu Unity window-manager</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-01-19 01:48:01 +0100</bug_when>
    <thetext>GLAnimatorControl.add(..) says:
  @throws IllegalArgumentException if drawable was already added to this animator</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>