ACCESS_VIOLATION at ActionContributionItem.d:193

yidabu dyuyan.spam at
Tue Apr 7 00:49:23 PDT 2009

On Sun, 05 Apr 2009 13:59:58 +0200
Frank Benoit <keinfarbton at> wrote:

> yidabu schrieb:
> > switched to dwt2, jface IMenuListener causes problem, the gui is not responsed when acition.sebEnalbed(false), how to fix this?
> > 
> > thanks!
> > 
> > 
> Like you reported in the IRC, this is solved.
> Frank

captured exception by ddbg when mouse right click on treeviewer:

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION(0xc0000005) at org.eclipse.jface\src\org\eclipse\jface\action\ActionContributionItem.d:193 (0x004830fd) thread(3436)
#0  org.eclipse.jface.action.ActionContributionItem.ActionContributionItem.actionPropertyChange () at org.eclipse.jface\src\org\eclipse\jface\action\ActionContributionItem.d:193
#1 0x0048565a in  java.lang.Runnable._DgRunnableT! () at imp\java\lang\Runnable.di:57
#2 0x00572f19 in void*) () from RunnableLock

what's the exceptin means? 

I tested a sample code, it's works fine, I can not give you a sample to reproduce the exception.

It seems a thread issue with my code, how to fix this? the app works fine with dwt-win, dmd 1.037 and dsss(lib), now I built dwt2.lib by dsss, get the sampe exception.

I ported my code to dwt2, I spend twot days to tried to figured the thread issue out, but failed.


My code like this:

auto menuManager = new MenuManager("#PopUp");
menuManager.addMenuListener(new MyMenuListener);
auto menu = menuManager.createContextMenu( treeViewer.getTree() );
treeViewer.getTree.setMenu( menu );

class MyMenuListener : IMenuListener {    
    void menuAboutToShow(IMenuManager manager) {

public class TestAction : Action {    
    public this() {
        super( "test", null);
    void run() {}

void fillContextMenu(IMenuManager manager) {
    manager.add( new TestAction );

yidabu <yidabu.spam at>

D 语言-中文(D Chinese):

More information about the Digitalmars-d-dwt mailing list