Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337927 - [multi-process] Invalid assert when fetching process information
Summary: [multi-process] Invalid assert when fetching process information
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
: 310994 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-22 21:02 EST by Marc Khouzam CLA
Modified: 2011-05-17 13:31 EDT (History)
4 users (show)

See Also:
marc.khouzam: review? (john.cortell)


Attachments
Fix removing the assertion (2.34 KB, patch)
2011-02-22 21:02 EST, 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-02-22 21:02:51 EST
Created attachment 189564 [details]
Fix removing the assertion

When requesting a process execution data, we expect the name of the process to be available,  so we added an "assert false" in that case.

I found a couple of situation where we could actually hit this code in a valid situation:

1- when changing the Preference that allows GDB to be kept running even when a process runs to completion
2- when running multiple processes and one of them runs to completion.

In both those cases, the debug session remains alive, but we remove the process name from our list because we got an event from GDB telling us that the process is finished.

Since the debug session is alive, the DView updates and request the data for the old process, which makes us hit the assertion.  The process will immediately be removed from the DView, so it is ok to return a name of "Unknown name" instead of having the assert.
Comment 1 Marc Khouzam CLA 2011-02-22 21:05:39 EST
Committed to HEAD.

John, do you agree?
Comment 2 John Cortell CLA 2011-02-22 21:09:22 EST
I do. Though I know the assertion sometimes fails on a basic launch. Unfortunately, I don't think there's a way to separate out that scenario from yours, so removing the assert it the right thing to do, IMO.
Comment 4 Marc Khouzam CLA 2011-05-17 13:31:50 EDT
*** Bug 310994 has been marked as a duplicate of this bug. ***