Bug 1082 - Incr. Robustness of GLDrawableFactoryImpl.createOffscreenDrawable(..) and AWTPrintLifecycle.setupPrint()
Summary: Incr. Robustness of GLDrawableFactoryImpl.createOffscreenDrawable(..) and AWT...
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2.3.0
Hardware: All all
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 1078
  Show dependency treegraph
 
Reported: 2014-10-01 00:59 CEST by Sven Gothel
Modified: 2019-03-29 17:54 CET (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
4813455dc413fb37da28ed4845fb6f22c65629f4 39cd0dfa0e46a3617b51e5b15a5fccedeae77f39
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2014-10-01 00:59:03 CEST
Add Fallback in AWTPrintLifecycle.setupPrint(): 
Use Onscreen GLAD if Offscreen-GLAD Realization throws an Exception (Stability)

- GLDrawableFactoryImpl: createOffscreenDrawable(..) and createDummyAutoDrawable(..)
  Temporary catch exception during setRealized(true) of newly created GLDrawable,
  to unrealize the instance before propagating the exception.

  This handling removes a memory leak in case the exception of this method is handled
  and application continues to operate, e.g. as in AWTPrintLifecycle.setupPrint().

  The underlying drawable gets unrealized, since it's setRealized(boolean)
  implementation toggles its realize-state before delegating the realize-operation.
  Hence this is functional.

- AWTPrintLifecycle.setupPrint() Stability
  Catch exception thrown by factory.createOffscreenAutoDrawable(..)'s setRealize(true)
  to continue operation w/ onscreen GLAD.
Comment 1 Sven Gothel 2014-10-01 00:59:43 CEST
Commit 4813455dc413fb37da28ed4845fb6f22c65629f4
  - Fix as described
Comment 2 Sven Gothel 2014-10-01 05:06:02 CEST
39cd0dfa0e46a3617b51e5b15a5fccedeae77f39
 Bug 1078, Bug 1082: Fix regression (copy/paste), 
 add missing assignment of printGLAD in NewtCanvasAWT.setupPrint()