Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343006 - NPE in MIBreakpointsManager when terminating
Summary: NPE in MIBreakpointsManager when terminating
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 14:43 EDT by Marc Khouzam CLA
Modified: 2011-04-15 15:23 EDT (History)
2 users (show)

See Also:


Attachments
Fix (1.18 KB, patch)
2011-04-15 14:43 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-04-15 14:43:35 EDT
Created attachment 193398 [details]
Fix

I got the following when terminating a session:

java.lang.NullPointerException
	at org.eclipse.cdt.dsf.gdb.service.GDBProcesses_7_2.eventDispatched(GDBProcesses_7_2.java:367)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.cdt.dsf.service.DsfSession.doDispatchEvent(DsfSession.java:517)
	at org.eclipse.cdt.dsf.service.DsfSession.access$2(DsfSession.java:462)
	at org.eclipse.cdt.dsf.service.DsfSession$3.run(DsfSession.java:389)
	at org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor$TracingWrapperRunnable.run(DefaultDsfExecutor.java:371)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

The attached patch checks if the service is already null before using it.
Comment 1 Marc Khouzam CLA 2011-04-15 14:44:31 EDT
Committed to HEAD.
Comment 2 CDT Genie CLA 2011-04-15 15:23:09 EDT
*** cdt cvs genie on behalf of mkhouzam ***
Bug 343006: NPE in MIBreakpointsManager when terminating

[*] GDBProcesses_7_2.java 1.12 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java?root=Tools_Project&r1=1.11&r2=1.12