News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Unloading TODO plugin makes the UI visible at a strange place

Started by oBFusCATed, April 29, 2012, 03:25:20 PM

Previous topic - Next topic

oBFusCATed

Hi,

I found a bug in the TODO plugin.
The problem is that if the plugin is unloaded from Plugins->Manage... the UI from the plugin is shown on top of the manager pane.
I have this little patch, which fixes the problem, but looking at the svn blame for the commented line I can see that it was commented because of a crash.
Can you test this patch end to report if this is still the case.
I've done all my testing on linux, so I don't know what is the state on windows.
Killerbot any thoughts?

Index: src/plugins/todo/todolist.cpp
===================================================================
--- src/plugins/todo/todolist.cpp       (revision 7948)
+++ src/plugins/todo/todolist.cpp       (working copy)
@@ -136,7 +136,8 @@
         CodeBlocksDockEvent evt(cbEVT_REMOVE_DOCK_WINDOW);
         evt.pWindow = m_pListLog->GetWindow();
         Manager::Get()->ProcessEvent(evt);
-//        delete m_pListLog;
+        m_pListLog->GetWindow()->Destroy();
+        delete m_pListLog;
     }
     else
     {
@@ -144,7 +145,7 @@
//        evt.window = m_pListLog->GetWindow();
         Manager::Get()->ProcessEvent(evt);
     }
-    m_pListLog = 0;
+    m_pListLog = nullptr;
}

void ToDoList::BuildMenu(wxMenuBar* menuBar)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

Seems this crash is similar to this one: http://forums.next.codeblocks.org/index.php/topic,16270.0.html

And the fix seems the same: http://cmpt.benbmp.org/codeblocks/patches/todo_load_unload.patch
Can anyone do some testing on windows of this patch?

Steps:
1. Load C::B
2. Plugins->Manage..
3. Load-unload the todo many times
4. Enable/disable Settings -> Environement -> Todo -> Include Todo window in massage pane
5. Repeat 3
6. Do some closing of C::B
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Alpha


oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]