Patch #2292 2007-12-21 17:27

jenslody

clear RemoteDebuggingMap when closing a project
Download
2292-clear_RemoteDe.patch (817 bytes)
Category
Application::Bugfix
Status
Deleted
Close date
2008-02-02 12:36
Assigned to
 
--- codeblocks-1.0svn.orig/src/plugins/debuggergdb/debuggergdb.cpp    2007-12-07 20:03:07.000000000 +0100
+++ codeblocks-1.0svn.work/src/plugins/debuggergdb/debuggergdb.cpp    2007-12-08 23:55:25.000000000 +0100
@@ -2463,10 +2463,13 @@
     // allow others to catch this
     event.Skip();
 
-    // remove all search dirs sotred for this project so we don't have conflicts
+    // remove all search dirs stored for this project so we don't have conflicts
     // if a newly opened project happens to use the same memory address
     GetSearchDirs(event.GetProject()).clear();
 
+    // clear the RemoteDebuggingMap for this project
+    m_RemoteDebugging.clear();
+
     // remove all breakpoints belonging to the closed project
     m_State.RemoveAllProjectBreakpoints(event.GetProject());
     if (m_pBreakpointsWindow)
jenslody 2007-12-21 17:34

If a project that has emote-debuggers set, the map holding the information about them (m_RemoteDebugging) is not cleared when the project is closed.

If than a new project is created C::B crashes.

This happens because a new project is saved immediately after creating, but the count of "m_RemoteDebugging" is not zero, so C::B tries to save it, but when it runs GetTitle() on the Elements in the map, C::B crashes without a report because of a segfault.

This patch clears the map when a project is closed.

mandrav 2008-02-02 12:36

Hmm, thanks for the patch but the problem seems to be more high-level than this.

The debugger should know what project these internal vars refer to.

I will have to fix it differently.

The patch will be deleted but thanks for bringing this up :)