<?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>37</bug_id>
          
          <creation_ts>2003-09-07 07:09:45 +0200</creation_ts>
          <short_desc>GLJPanel + Animator.stop() halts event dispatch thread</short_desc>
          <delta_ts>2010-03-24 07:45:50 +0100</delta_ts>
          <reporter_accessible>0</reporter_accessible>
          <cclist_accessible>0</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>1</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</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>53</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2010-03-24 07:45:50 +0100</bug_when>
    <thetext>


---- Reported by gkw 2003-09-07 19:09:45 ----

The stop method of Animator class calls wait() to block the current thread until
the animation thread is finished.  This doesn&apos;t work with GLJPanel since both
threads are the same, the event dispatch thread.  Halting the event dispatch
thread puts the app into a coma.

This fix works but I don&apos;t know how correct it is.
/** Stops this animator, blocking until the animation thread has
      finished. */
  public synchronized void stop() {
    shouldStop = true;
    if( EventQueue.isDispatchThread() ) {
			return;
		}
		while (shouldStop &amp;&amp; thread != null) {
      try {
        wait();
      } catch (InterruptedException e) {
      }
    }
  }



---- Additional Comments From kbr 2005-02-03 00:11:23 ----

Sorry for not commenting on this bug until now. The heuristic for whether the
Animator should wait or not was updated in a recent JOGL release, but not a lot
of debugging was done for the GLJPanel case. Some recent work on the GLJPanel
has required revisiting of some of these issues and a similar fix to the one
mentioned below was just checked in.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:45 EDT  ---

This bug was previously known as _bug_ 37 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=37
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>