Bug #18007 2011-03-18 09:15

austin_hastings

Batch build tries to interact with user

I have a workspace file that was saved with at least on GENERATED file open in a window.

When I invoke the C::B batch builder (from a Jenkins CI server) the full rebuild causes the generated file to get rebuilt.

Code::Blocks then pops up a dialog asking if I want to reload the file. The CI version doesn't show the window - presumably because it is running as a service and cannot communicate with the desktop. But the build runs forever - I suspect that the dialog either failed to create or returned an error, but the "do you want to reload the file" logic is ignoring that condition.

At any rate, I suggest that in a batch build either none of the files should even be loaded, or there should be some intelligence in the pop-up code to know when a non-interactive session is running.

Category
Application::WrongBehaviour
Group
 
Status
Closed
Close date
2011-04-18 07:33
Assigned to
mortenmacfly
mortenmacfly 2011-04-18 07:22

You can fix this yourself quickly in CodeBlocksApp::OnAppActivate(wxActivateEvent& event) (app.cpp), if you change the line:

if (Manager::Get()->GetEditorManager() && Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/check_modified_files"), true))

to:

if (!m_Batch && Manager::Get()->GetEditorManager() && Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/check_modified_files"), true))

Not sure about the side effect though... this needs some testing.

mortenmacfly 2011-04-18 07:33

This bug is now fixed in HEAD.

Thank you for reporting it.