Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi,
When running my application using the SWT "S-Leak" utility, it shows there is a leak of an SWT Color resource when the SWT GLCanvas is created: java.lang.Error at org.eclipse.swt.graphics.Device.new_Object(Device.java:854) at org.eclipse.swt.graphics.Resource.init(Resource.java:89) at org.eclipse.swt.graphics.Color.<init>(Color.java:89) at com.jogamp.opengl.swt.GLCanvas.<init>(GLCanvas.java:385) Looking at the source code at that line, it seems to verify this: com/jogamp/opengl/swt/GLCanvas.java: 383: // Bug 1362 fix or workaround: Seems SWT/GTK3 at least performs lazy initialization 384: // Minimal action required: setBackground of the parent canvas before reparenting! 385: setBackground(new Color(parent.getDisplay(), 255, 255, 255)); At line 385, the color is allocated and the reference is lost. SWT does not take ownership of resources when passed into functions such as setBackground - it is the responsibility of the caller to release the resource when no longer needed. This was using the latest 2.5.0 build. Thanks! James |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Please create a bug report to avoid losing your precious analysis.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
This post was updated on Apr 02, 2025; 10:49am.
Hi,
I've created debug and test logs via the relevant batch files. I don't really feel comfortable uploading them here publicly, so I'd like to use the bug system. However, I can't see how to create an account on: https://jogamp.org/bugzilla/ Cheers, James |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by badjames
Eclipse 4.26.0 Release Build: 4.26
https://download.eclipse.org/eclipse/downloads/drops4/R-4.26-202211231800/ Source of Color.class says: ? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by badjames
Give me your email address and I can create one.
Then you would need 'password reset' to set yourself a new password using that email address. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by Sven Gothel
Probably also about time to bump SWT to latest for 2.6.0
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In reply to this post by Sven Gothel
Hi Sven,
Due to the Eclipse RCP application I am developing for, we are using an older version of SWT. Specifically, SWT 3.110 which I think was released along with Eclipse 4.10. That older 3.110 version still needs Colors to be disposed, as evidenced by the fact that all the constructors require a Device object. I have added a custom version of JOGL 2.5.0 GLCanvas to my code that sets the background color to white using the system color, which is pre-allocated (and managed) by SWT: setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); This removes the Color leak as detected by S-Leak and also prevents the GDI object leak I was seeing in Process Explorer. As this is fixed in later versions of SWT, I'm not suggesting that JOGL needs to change. Probably unlikely that other people would be using such an old version of SWT. Cheers, James |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
resolved in jogl commit cc624a1c3ea7b4599c1c21191bac689310fadfdc
<https://jogamp.org/cgit/jogl.git/commit/?id=cc624a1c3ea7b4599c1c21191bac689310fadfdc> thx for the report. |
Free forum by Nabble | Edit this page |