Greetings,
i looked for the right place to post a bug report, but didn't find. If here is not the right place, please say me.
Well, here's the description of the bug:
1. Moving a file from a virtual folder to another.
2. Modify (write into) this file
Result: crash of C::B
Config:
OS: Ubuntu 7.10
C::B 8.02
This bug occur every times this operation is done.
Today I tried with the Windows version (C::B 8.02 also), and the crash don't occur, thus this bug is only on the ubuntu (*nux ?) version.
Hope it helps.
r0d.
I can confirm this.
Here's a patch that fixes this issue:
--- codeblocks-1.0svn.orig/src/sdk/cbproject.cpp 2008-03-10 17:55:06.000000000 +0100
+++ codeblocks-1.0svn.work/src/sdk/cbproject.cpp 2008-04-02 23:00:01.000000000 +0200
@@ -1226,6 +1226,8 @@
SetModified(true);
+ Manager::Get()->GetProjectManager()->RebuildTree();
+
return true;
}
Thanks for reply.
That means that i have to modify the source of C::B and rebuild it?
Yes.
Or wait until the bug is fixed in this or another way in svn, and then download the next nightly, or wait until I upload a patched version to my repo.
I will do so in some hours (I can post it here if it's done), because at work my upload is 16 times faster than at home (ISDN).
The svn-versions in my repo are build for debian from etch up to unstable/experimental, but should also work under Ubuntu.
Will look into this today. :)
Quote from: Biplab on April 03, 2008, 07:36:30 AM
Will look into this today. :)
Hi Biplab,
the crash happens in line 280 in "projectfile.cpp" when the new image should be set in the tree after changing the files content.
tree->SetItemImage(m_TreeItemId, (int)state, wxTreeItemIcon_Normal);
"m_TreeItemId" only gets set when the tree is build (or rebuild), so I think it's invalid after dragging the node.
The crash does not appear when the project is saved before editing (after saving the project, C::B does a rebuild of the tree).
So I think the easiest way is to rebuild the tree after dragging is completed.
Another solution would be to renew "m_TreeItemId" only, but I haven't got the time to figure out the right place for doing this, so I went the easy way.
Quote from: jens on April 03, 2008, 07:32:54 AM
... I can post it here if it's done ...
A patched version is in my repo (see signature).
It's based on svn4984 and therefore called "*1.0svn4984
-1*.deb" .
Thank you very much, for this. But sorry (I am ashamed) I won't use it. I'm not accustomed to linux yet, and i don't have the time to start the process of modifying my IDE. In a few month i will, when i'll be more "zen" with linux.
Thank you one more time.
If you follow the instructions on my website you can use "apt-get", "synaptic", "aptitude" or any other "apt"-frontend I perhaps don't know to update C::B.
The only thing is to remove the 8.02-version of C::B before (or to force downgrade), because the package-managers only look for version numbers (1.0 for svn and 8.02 for stable) and not for the package date.
Thanks r0d for the pointing this bug and Jens for the patch. Fixed in revision 4985. :)