my RCP application (Video-Player with OpenCV java) throws the famous:
org.eclipse.swt.SWTError: No more handles
Error
So now I found Sleak and a tutorial
I tryed the first way, but when I start the app and click on the snap button in the Sleak-View I got:
"WARNING: Device is not tracking resource allocation".
When I do it the second way(.options file and -debug in the eclipse.ini (inserted befor the -vmargs)
I get some results in the sleak view but they are all Eclipse Resources... like said there I've trace eclipse ... but I do not want to ...
I'am running on Eclipse 4.3 SR1 (RCP) with sleak build for 4.3
(I have tryed it with the 4.4 build but it did not work either)
And in my RCP (e4) application is no Part where I do
Display display = PlatformUI.createDisplay();
like proposed here.
I just faced this problem and solved it.
Go to debug configuration-> tracing tab.
Here make sure that you have selected org.eclipse.ui on the left side and select tracing/graphics and debug on the right side.
Now launch it . In your RCP you will be getting the sleak information now.
Add this to your debug Configuration:
Tracing Tab:
org.eclipse.ui:
debug = true
trace/graphics = true
http://www.vogella.com/tutorials/EclipsePerformance/article.html#performance_sleak
I recently faced the same problem, and managed to find a solution. Here's what I discovered, who knows it might help you.
On our RCP startup, there's a call to PlatformUI.createDisplay() on our Application class, which chains to a call to Workbench.createDisplay(). That's the exact point where the debug settings needed by Sleak are properly read and set.
What happened on our software was that a call to Display.getDefault() was made BEFORE the above call to PlatformUI.createDisplay(). It caused the creation of a new Display object, which was set as the default one. This creation did not read and set the debug settings, because it happened on a different path.
By the time our code got to the PlatformUI.createDisplay() call, it didn't actually create a new Display. Instead, it returned the previously-created, not-debug-friendly one. Thus leading Sleak into warning about "device not tracking resource allocation".
Adding a breakpoint at the method Display.register (Display display) helped us identifying the early creation origin and properly change it.
You might have not hand written the createDisplay() call on your code, but I'm pretty sure there's one somewhere, because every Platform needs a Display.
Struggled with this for most of day, finding a variety of out-of-date cookbooks and HowTo pages... In one of the eclipse forum posts, someone referenced this page, which worked for me. (Oxygen, pure E4 standalone RCP application)
https://wiki.eclipse.org/Eclipse4/RCP/FAQ#How_to_use_Sleak_in_e4AP
Even tho it seems odd, you have to have your Eclipse workbench application running with various flags set, before it pays any attention to your project settings when running your application in the debugger.