score:0

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

score:0

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.

score:0

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.

score:1

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.


Related Query

More Query from same tag