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

Splitting debugger in two - specific debugger and common GUI

<< < (108/136) > >>

MortenMacFly:

--- Quote from: oBFusCATed on December 13, 2011, 07:47:00 pm ---Here is a patch that fixes it. Is it OK to commit it?

--- End quote ---
To be honest its strange to see why this patch should work?! But if it does and you are sure to have found the reason, feel free to go ahead. My worries are that the batch window might need the XRC stuff to be initialised (I am not sure about that) so it might have some side effects... (remember that you can enable plugins at will in batch mode) - I'll try though... If the XRC stuff is really not needed in batch mode (Yiannis?!) than it would actually be a good thing not to initialise it, as this safes time.

Jenna:
I did not test the patch, but if I see it correctly, OnInit will always return false, if we are not in batch-build mode and do not give a script to execute on commandline.
This should be true in most cases, where C::B is used "normally".

oBFusCATed:
Jens, I'm not sure I understand what you've just said/written... :(

Jenna:

--- Quote from: oBFusCATed on December 13, 2011, 09:51:31 pm ---Jens, I'm not sure I understand what you've just said/written... :(

--- End quote ---
On normal startup of C::B m_Batch is false and m_Script is empty and with your patch, OnInit() will always return false and therefore end the application.

oBFusCATed:
Argh, you're right.

What about this version then:


--- Code: ---Index: C:/dev/cb_dev/debugger1/src/src/app.cpp
===================================================================
--- C:/dev/cb_dev/debugger1/src/src/app.cpp (revision 7633)
+++ C:/dev/cb_dev/debugger1/src/src/app.cpp (working copy)
@@ -524,8 +524,7 @@
 
         // set safe-mode appropriately
         PluginManager::SetSafeMode(m_SafeMode);
-
-        if(!m_Batch && m_Script.IsEmpty() && !InitXRCStuff())
+        if(!InitXRCStuff() && !m_Batch && m_Script.IsEmpty())
         {
            // wsSafeShowMessage(_T("Fatal error"), _T("Initialisation of resources failed."));
             return false;


--- End code ---

I've search the svn history and it seems that the check was added on purpose by Thomas in r2706.
Thomas any comments on this?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version