ACCESS_VIOLATION at ActionContributionItem.d:193
yidabu
dyuyan.spam at gmail.com
Tue Apr 7 00:49:23 PDT 2009
On Sun, 05 Apr 2009 13:59:58 +0200
Frank Benoit <keinfarbton at googlemail.com> 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.action.ActionContributionItem.ActionContributionItem.actionPropertyChange.org.eclipse.jface.util.PropertyChangeEvent.PropertyChangeEvent.__dgliteral1.org.eclipse.jface.util.PropertyChangeEvent.PropertyChangeEvent org.eclipse.jface\src\org\eclipse\jface\action\ActionContributionItem.d:193 (0x004830fd) thread(3436)
->us
#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 org.eclipse.swt.widgets.RunnableLock.RunnableLock.run(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.
thanks!
My code like this:
auto menuManager = new MenuManager("#PopUp");
menuManager.setRemoveAllWhenShown(true);
menuManager.addMenuListener(new MyMenuListener);
auto menu = menuManager.createContextMenu( treeViewer.getTree() );
treeViewer.getTree.setMenu( menu );
class MyMenuListener : IMenuListener {
void menuAboutToShow(IMenuManager manager) {
fillContextMenu(manager);
}
}
public class TestAction : Action {
public this() {
super( "test", null);
}
void run() {}
}
void fillContextMenu(IMenuManager manager) {
manager.add( new TestAction );
}
--
yidabu <yidabu.spam at gmail.com>
http://www.dsource.org/projects/dwin/
D 语言-中文(D Chinese):
http://www.d-programming-language-china.org/
http://bbs.d-programming-language-china.org/
http://dwin.d-programming-language-china.org/
http://scite4d.d-programming-language-china.org/
More information about the Digitalmars-d-dwt
mailing list