Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Crash with batch build on linux

<< < (4/10) > >>

BlueHazzard:
Thank you for your feedback....

The patch in ticket 738 is for sure a simple and fast solution....
I have looked into the log window management, and it looks somehow like a big pile that needs some rework...


--- Quote ---Destroy the window after closing the workspace, not before
--- End quote ---
This is somehow the solution i would like look into... Maybe i find some time...

oBFusCATed:
Is this the full stack you will see in a debugger? I doubt it is? How to reproduce this?


--- Quote ---The window is destroyed in the CodeBlocksApp::OnInit method and this needs to change.

--- End quote ---
Obviously this is the only correct fix. I doubt wx is really happy when we destroy windows from OnInit.
Do not push the fix from the patch in #738, it just hides the problem as I've already stated!!!

BlueHazzard:
i am playing around with this, and this is my first try:

--- Code: ---diff --git a/src/src/app.cpp b/src/src/app.cpp
index 22a46dfb1..abb415c60 100644
--- a/src/src/app.cpp
+++ b/src/src/app.cpp
@@ -974,6 +974,7 @@ int CodeBlocksApp::BatchJob()
     wxString bb_title = m_pBatchBuildDialog->GetTitle();
     m_pBatchBuildDialog->SetTitle(bb_title + _T(" - ") + title);
     m_pBatchBuildDialog->Show();
+    m_pBatchBuildDialog->Bind(wxEVT_CLOSE_WINDOW, [=](wxCloseEvent& evt) { m_Frame->Close();});
 
     if (m_ReBuild)
     {
@@ -1000,7 +1001,7 @@ int CodeBlocksApp::BatchJob()
     // The batch build log might have been deleted in
     // CodeBlocksApp::OnBatchBuildDone().
     // If it has not, it's still compiling.
-    if (m_pBatchBuildDialog)
+    /*if (m_pBatchBuildDialog)
     {
         // If operation is "--clean", there is no need to display the dialog
         // as the operation is synchronous and it already has finished by the
@@ -1015,7 +1016,7 @@ int CodeBlocksApp::BatchJob()
             m_pBatchBuildDialog->Destroy();
             m_pBatchBuildDialog = nullptr;
         }
-    }
+    }*/
 
     if (tbIcon)
     {

--- End code ---
I know Bind is not possible with wx28 but it is a first try... There are still other problems, but i wanted to know if this approach is ok. I am not familiar with this kind of wxWidgets stuff...

BlueHazzard:
I also added a timer that moves the BatchBuild() out of the OnInit function. Somehow this is missing in this diff...

oBFusCATed:
Can you post the full patch?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version