Compiler error?

bridged with qdn.public.qnxrtp.devtools
Post Reply
Simon A. Platten

Compiler error?

Post by Simon A. Platten » Mon Dec 09, 2002 12:09 pm

Hi,

I'm not sure whats going on here, but it use to work fine...

static void* MyThread(void* pArg)
{
CMyClass* pClass = (CMyClass*)pArg;

pClass->DoSomething();
}

The above is just a simple example to illustrate the problem. When I run
the application on a remote host using the Debugger in the IDE, it crashes
everytime it reaches this thread, the error messages are:

1) Dialog appears with message: An error has occurred when activating this
view

2) Checking the output from GDB I see in red: Attempt to dereference a
generic pointer

3) When I check the .log file it contains:

Log: Mon Dec 09 12:04:53 GMT 2002
2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in:
org.eclipse.ui.
java.lang.NullPointerException
at
org.eclipse.debug.internal.ui.VariablesContentProvider.hasChildren(Variables
ContentProvider.java:83)
at
org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer
..java:932)
at
org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.j
ava:1273)
at
org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeView
er.java:257)
at
org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeView
er.java:241)
at
org.eclipse.jface.viewers.AbstractTreeViewer$3.run(AbstractTreeViewer.java:6
52)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredVie
wer.java:546)
at
org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer
..java:644)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:234)
at
org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:65
9)
at
org.eclipse.debug.internal.ui.VariablesView.setViewerInput(VariablesView.jav
a:160)
at
org.eclipse.debug.internal.ui.VariablesView.selectionChanged(VariablesView.j
ava:119)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.selectionChanged(DebugUIPlugin.j
ava:793)
at
org.eclipse.debug.internal.ui.LaunchesView.setFocus(LaunchesView.java:214)
at org.eclipse.ui.internal.WorkbenchPage$1.run(WorkbenchPage.java:109)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java
:808)
at org.eclipse.core.runtime.Platform.run(Platform.java:393)
at
org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:106)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:1326)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:97)
at
org.eclipse.debug.internal.ui.DebugView.openEditorAndSetMarker(DebugView.jav
a:371)
at
org.eclipse.debug.internal.ui.DebugView.showMarkerForCurrentSelection(DebugV
iew.java:475)
at
org.eclipse.debug.internal.ui.DebugView.selectionChanged(DebugView.java:418)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:147)
at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.
java:907)
at
org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.jav
a:687)
at
org.eclipse.debug.internal.ui.LaunchesViewer.setSelection(LaunchesViewer.jav
a:67)
at org.eclipse.debug.internal.ui.DebugView.autoExpand(DebugView.java:95)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$4.run(DebugUIPlugin.java:380)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:26)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:85)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1260)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1095)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:673)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:656)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.jav
a:815)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
at org.eclipse.core.launcher.Main.run(Main.java:442)
at org.eclipse.core.launcher.Main.main(Main.java:315)


Any ideas anyone?

Thank you

--
Simon Platten, Senior Software Engineer

VT Controls
Bessemer Way, Harfreys Industrial Estate, Great Yarmouth, Norfolk, NR31 0LX.
Tel: (0)1493 668811 Fax: (0)1493 651137
Email: simon.platten@vtcontrols.co.uk

Any views or opinions expressed are solely those of the author and do not
necessarily
represent those of VT Group, its holding company or any of its subsidiaries
or associates.

Simon A. Platten

Re: Compiler error?

Post by Simon A. Platten » Tue Dec 10, 2002 11:30 am

I believe that that isn't actually a compiler fault at all, but more a
problem in the way the debugger handles breakpoints in threads.
Initially I experienced no problems when using break points in threads,
however now I am having lots of problems, the solution was to debug the
routine without using a thread then pop it back in after debugging. Not
ideal.

"Simon A. Platten" <simon.platten@vtcontrols.co.uk> wrote in message
news:at2170$928$1@inn.qnx.com...
Hi,

I'm not sure whats going on here, but it use to work fine...

static void* MyThread(void* pArg)
{
CMyClass* pClass = (CMyClass*)pArg;

pClass->DoSomething();
}

The above is just a simple example to illustrate the problem. When I run
the application on a remote host using the Debugger in the IDE, it crashes
everytime it reaches this thread, the error messages are:

1) Dialog appears with message: An error has occurred when activating this
view

2) Checking the output from GDB I see in red: Attempt to dereference a
generic pointer

3) When I check the .log file it contains:

Log: Mon Dec 09 12:04:53 GMT 2002
2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in:
org.eclipse.ui.
java.lang.NullPointerException
at

org.eclipse.debug.internal.ui.VariablesContentProvider.hasChildren(Variables
ContentProvider.java:83)
at

org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer
.java:932)
at

org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.j
ava:1273)
at

org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeView
er.java:257)
at

org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeView
er.java:241)
at

org.eclipse.jface.viewers.AbstractTreeViewer$3.run(AbstractTreeViewer.java:6
52)
at

org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredVie
wer.java:546)
at

org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer
.java:644)
at
org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:234)
at

org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:65
9)
at

org.eclipse.debug.internal.ui.VariablesView.setViewerInput(VariablesView.jav
a:160)
at

org.eclipse.debug.internal.ui.VariablesView.selectionChanged(VariablesView.j
ava:119)
at

org.eclipse.debug.internal.ui.DebugUIPlugin.selectionChanged(DebugUIPlugin.j
ava:793)
at
org.eclipse.debug.internal.ui.LaunchesView.setFocus(LaunchesView.java:214)
at org.eclipse.ui.internal.WorkbenchPage$1.run(WorkbenchPage.java:109)
at

org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java
:808)
at org.eclipse.core.runtime.Platform.run(Platform.java:393)
at
org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:106)
at

org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:1326)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:97)
at

org.eclipse.debug.internal.ui.DebugView.openEditorAndSetMarker(DebugView.jav
a:371)
at

org.eclipse.debug.internal.ui.DebugView.showMarkerForCurrentSelection(DebugV
iew.java:475)
at

org.eclipse.debug.internal.ui.DebugView.selectionChanged(DebugView.java:418)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:147)
at

org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.
java:907)
at

org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.jav
a:687)
at

org.eclipse.debug.internal.ui.LaunchesViewer.setSelection(LaunchesViewer.jav
a:67)
at org.eclipse.debug.internal.ui.DebugView.autoExpand(DebugView.java:95)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$4.run(DebugUIPlugin.java:380)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:26)
at

org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:85)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1260)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1095)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:673)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:656)
at

org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.jav
a:815)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
at org.eclipse.core.launcher.Main.run(Main.java:442)
at org.eclipse.core.launcher.Main.main(Main.java:315)


Any ideas anyone?

Thank you

--
Simon Platten, Senior Software Engineer

VT Controls
Bessemer Way, Harfreys Industrial Estate, Great Yarmouth, Norfolk, NR31
0LX.
Tel: (0)1493 668811 Fax: (0)1493 651137
Email: simon.platten@vtcontrols.co.uk

Any views or opinions expressed are solely those of the author and do not
necessarily
represent those of VT Group, its holding company or any of its
subsidiaries
or associates.

Simon A. Platten

Re: Compiler error?

Post by Simon A. Platten » Tue Dec 10, 2002 1:05 pm

Scratch my last comments, it isn't thread related...and it isn't a compiler
error, at least I don't think so...the debugger is throwing up the dialog
everytime it hits a breakpoint.

"Simon A. Platten" <simon.platten@vtcontrols.co.uk> wrote in message
news:at2170$928$1@inn.qnx.com...
Hi,

I'm not sure whats going on here, but it use to work fine...

static void* MyThread(void* pArg)
{
CMyClass* pClass = (CMyClass*)pArg;

pClass->DoSomething();
}

The above is just a simple example to illustrate the problem. When I run
the application on a remote host using the Debugger in the IDE, it crashes
everytime it reaches this thread, the error messages are:

1) Dialog appears with message: An error has occurred when activating this
view

2) Checking the output from GDB I see in red: Attempt to dereference a
generic pointer

3) When I check the .log file it contains:

Log: Mon Dec 09 12:04:53 GMT 2002
2 org.eclipse.ui 2 Problems occurred when invoking code from plug-in:
org.eclipse.ui.
java.lang.NullPointerException
at

org.eclipse.debug.internal.ui.VariablesContentProvider.hasChildren(Variables
ContentProvider.java:83)
at

org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer
.java:932)
at

org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.j
ava:1273)
at

org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeView
er.java:257)
at

org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeView
er.java:241)
at

org.eclipse.jface.viewers.AbstractTreeViewer$3.run(AbstractTreeViewer.java:6
52)
at

org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredVie
wer.java:546)
at

org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer
.java:644)
at
org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:234)
at

org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:65
9)
at

org.eclipse.debug.internal.ui.VariablesView.setViewerInput(VariablesView.jav
a:160)
at

org.eclipse.debug.internal.ui.VariablesView.selectionChanged(VariablesView.j
ava:119)
at

org.eclipse.debug.internal.ui.DebugUIPlugin.selectionChanged(DebugUIPlugin.j
ava:793)
at
org.eclipse.debug.internal.ui.LaunchesView.setFocus(LaunchesView.java:214)
at org.eclipse.ui.internal.WorkbenchPage$1.run(WorkbenchPage.java:109)
at

org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java
:808)
at org.eclipse.core.runtime.Platform.run(Platform.java:393)
at
org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:106)
at

org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:1326)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:97)
at

org.eclipse.debug.internal.ui.DebugView.openEditorAndSetMarker(DebugView.jav
a:371)
at

org.eclipse.debug.internal.ui.DebugView.showMarkerForCurrentSelection(DebugV
iew.java:475)
at

org.eclipse.debug.internal.ui.DebugView.selectionChanged(DebugView.java:418)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:147)
at

org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.
java:907)
at

org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.jav
a:687)
at

org.eclipse.debug.internal.ui.LaunchesViewer.setSelection(LaunchesViewer.jav
a:67)
at org.eclipse.debug.internal.ui.DebugView.autoExpand(DebugView.java:95)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$4.run(DebugUIPlugin.java:380)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:26)
at

org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:85)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1260)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1095)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:673)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:656)
at

org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.jav
a:815)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
at org.eclipse.core.launcher.Main.run(Main.java:442)
at org.eclipse.core.launcher.Main.main(Main.java:315)


Any ideas anyone?

Thank you

--
Simon Platten, Senior Software Engineer

VT Controls
Bessemer Way, Harfreys Industrial Estate, Great Yarmouth, Norfolk, NR31
0LX.
Tel: (0)1493 668811 Fax: (0)1493 651137
Email: simon.platten@vtcontrols.co.uk

Any views or opinions expressed are solely those of the author and do not
necessarily
represent those of VT Group, its holding company or any of its
subsidiaries
or associates.

Post Reply

Return to “qdn.public.qnxrtp.devtools”