You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Latest Eclipse RCP introduced a watchdog that reports all no disposed SWT resource that get garbage collected.
Since them I get a lot of traces in the console with this stack trace:
java.lang.Error: SWT Resource was not properly disposed
at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:172)
at org.eclipse.swt.graphics.Resource.<init>(Resource.java:120)
at org.eclipse.swt.graphics.TextLayout.<init>(TextLayout.java:299)
at org.eclipse.draw2d.ScaledGraphics.zoomTextLayout(ScaledGraphics.java:980)
at org.eclipse.draw2d.ScaledGraphics.drawTextLayout(ScaledGraphics.java:414)
at org.eclipse.draw2d.Graphics.drawTextLayout(Graphics.java:457)
...
I use draw2d 3.10.xxx but it seems the bug is still present in latest version, I think the problem originates here:
The zoomed TextLayout should be disposed when returning null.
The text was updated successfully, but these errors were encountered:
cedric780
changed the title
"Error: SWT Resource was not properly disposed" in ScaledGraphics.zoomTextLayout(ScaledGraphics.java:980)
"Error: SWT Resource was not properly disposed" in ScaledGraphics.zoomTextLayout()
May 2, 2024
cedric780
added a commit
to cedric780/gef-classic
that referenced
this issue
May 2, 2024
…ScaledGraphics.zoomTextLayout()
[eclipse#436] Fix "Error: SWT Resource was not properly disposed" in ScaledGraphics.zoomTextLayout()
Resolveseclipse#436
Dispose the TextLayout when returning null.
Signed-off-by: Cedric Marin <cedric.dev.780@gmail.com>
#437)
* Fix [#436] "Error: SWT Resource was not properly disposed" in ScaledGraphics.zoomTextLayout()
[#436] Fix "Error: SWT Resource was not properly disposed" in ScaledGraphics.zoomTextLayout()
Resolves#436
Dispose the TextLayout when returning null.
Signed-off-by: Cedric Marin <cedric.dev.780@gmail.com>
* Apply ptziegleril suggestion:
> Instead of creating and disposing the resources, wouldn't it make more sense to move it so that it's only created after this check?
---------
Signed-off-by: Cedric Marin <cedric.dev.780@gmail.com>
Latest Eclipse RCP introduced a watchdog that reports all no disposed SWT resource that get garbage collected.
Since them I get a lot of traces in the console with this stack trace:
I use draw2d 3.10.xxx but it seems the bug is still present in latest version, I think the problem originates here:
gef-classic/org.eclipse.draw2d/src/org/eclipse/draw2d/ScaledGraphics.java
Line 999 in 1dd4d1d
The
zoomed
TextLayout should be disposed when returning null.The text was updated successfully, but these errors were encountered: