Here's a patch that (re?)enables C::B to open (source-, header and resource-)files by double-clicking on it in explorer or to open them via command-line from console.
I tested it on my laptop with Debian Sid-/Experimental-mix and on my virtual W2K-box.
--- codeblocks-1.0svn.orig/src/src/app.cpp 2007-12-07 20:03:08.000000000 +0100
+++ codeblocks-1.0svn.work/src/src/app.cpp 2007-12-11 00:21:48.000000000 +0100
@@ -900,6 +900,10 @@
m_HasProject = true;
s_DelayedFilesToOpen.Add(parser.GetParam(param));
}
+ else if (ft == ftSource || ft == ftHeader || ft == ftResource)
+ {
+ s_DelayedFilesToOpen.Add(parser.GetParam(param));
+ }
else if (ft == ftCodeBlocksWorkspace)
{
// only one workspace can be opened
Please have a look to my patch for "debuggergdb.cpp" also: http://forums.codeblocks.org/index.php/topic,7402.msg56437.html#msg56437 (http://forums.codeblocks.org/index.php/topic,7402.msg56437.html#msg56437).
The problem here is that the crash just happens in the rare case, someone has a Project with RemoteDebugging-targets, closes this one and then creates a new one, that of course has no such targets.
In this case the new project is saved automatically, but the RemoteDebuggingMaps size is not zero, so C::B tries to save it too. But when it runs GetTitle() it crashs.
So clearing the Map in OnProjectClose() is the easiest way to avoid this, and it should not break anything other.
Sorry to have mixed two issues in the post, but I don't want to file a bug-report if it's not really necessary.