Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356613

Summary: [breakpoints] NPE when opening thread filter page with one running and one terminated launch
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: cdtdoug, nobody, pawel.1.piech
Version: 8.0Flags: marc.khouzam: review? (nobody)
Target Milestone: 8.0.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix to return an empty array instead of null marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-09-02 11:11:54 EDT
1- start two different debug sessions
2- terminate one but leave it showing in the debug view
3- open breakpoint properties for any breakpoint and choose 'filter'
=> NPE due to the terminated launch
Comment 1 Marc Khouzam CLA 2011-09-02 14:48:53 EDT
Created attachment 202692 [details]
Fix to return an empty array instead of null

In GdbThreadFilterEditor, I noticed that syncGetThreads() would return an empty array upon failure, while syncGetContainers() would return null.  The null was causing the NPE, so I changed it to return an empty array.

I'll commit to master and 8_0
Comment 2 Marc Khouzam CLA 2011-09-02 15:44:27 EDT
(In reply to comment #1)
 
> I'll commit to master and 8_0

I'm having trouble accessing the repo right now.  I'll try again later on.
Comment 3 Marc Khouzam CLA 2011-09-02 16:27:54 EDT
Committed to both branches.

Mikhail, can you review?  One-line patch.
Comment 4 CDT Genie CLA 2011-09-02 17:23:01 EDT
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 356613: NPE when opening thread filter page with one running and one terminated launch

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d7f7e9cdac837654f4b36aad012a0be705115c2e
Comment 5 CDT Genie CLA 2011-09-02 17:23:02 EDT
*** cdt git genie on behalf of Marc Khouzam ***

    Bug 356613: NPE when opening thread filter page with one running and one terminated launch

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=1992418e3830759e80ac0b3d377283655e9f09c3