Segfault cancelling new project


#1

Open Jucer (1.52.63), File->New Project, press Cancel -> segfault

code bt
#0 0x00000000 in ?? ()
#1 0x0805a332 in JucerApplication::createNewProject (this=0x9b7a510) at …/…/Source/Application/jucer_Application.h:372
#2 0x0805a5dd in JucerApplication::perform (this=0x9b7a510, info=@0x9baa890) at …/…/Source/Application/jucer_Application.h:344
#3 0x081e7adb in juce::ApplicationCommandTarget::tryToInvoke (this=0x9b7a510, info=@0x9baa890, async=false) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/application/juce_ApplicationCommandTarget.cpp:59
#4 0x081e7bb6 in juce::ApplicationCommandTarget::CommandTargetMessageInvoker::handleMessage (this=0x9b84810, message=@0x9b9a720) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/application/juce_ApplicationCommandTarget.cpp:196
#5 0x081c2842 in juce::MessageManager::deliverMessage (this=0x9b6a090, message=0x9b9a720) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/events/juce_MessageManager.cpp:115
#6 0x08361d66 in juce::InternalMessageQueue::dispatchNextInternalMessage (this=0x9b6dab0) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/native/linux/juce_linux_Messaging.cpp:231
#7 0x08361dfe in juce::InternalMessageQueue::dispatchNextEvent (this=0x9b6dab0) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/native/linux/juce_linux_Messaging.cpp:101
#8 0x0835402c in juce::juce_dispatchNextMessageOnSystemQueue (returnIfNoPendingMessages=false) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/native/linux/juce_linux_Messaging.cpp:432
#9 0x081c25fd in juce::MessageManager::runDispatchLoopUntil (this=0x9b6a090, millisecondsToRunFor=-1) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/events/juce_MessageManager.cpp:164
#10 0x081c27ee in juce::MessageManager::runDispatchLoop (this=0x9b6a090) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/events/juce_MessageManager.cpp:141
#11 0x081e942b in juce::JUCEApplication::main (commandLine=@0xbfdb39b8) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/application/juce_Application.cpp:216
#12 0x081e9638 in juce::JUCEApplication::main (argc=1, argv=0xbfdb3a84) at …/…/JuceLibraryCode/…/…/…/amalgamation/…/src/application/juce_Application.cpp:247
#13 0x0805799a in main (argc=-2082109099, argv=0x5d8918ec) at …/…/Source/Application/jucer_Main.cpp:28
[/code]

Is jucer_Application.h trying to setVisible(true) on a window that was just closed?

code down
#1 0x0805a332 in JucerApplication::createNewProject (this=0x9b7a510) at …/…/Source/Application/jucer_Application.h:372
372 mw->setVisible (true);
(gdb) l
367 if (newProj != 0)
368 mw->setProject (newProj.release());
369 else
370 closeWindow (mw);
371
372 mw->setVisible (true);
373 }
374
375 void askUserToOpenFile()
376 {
(gdb) p mw
$2 = (class MainWindow *) 0x9bb8700
(gdb) p newProj
$3 = {object = 0x0}[/code]

*edit: And, I just realized, why is there a second main application window opening when you do New Project?

– Johan


#2

Whoops! Thanks for spotting that deliberate mistake!

The second window is just there ready to hold the new project - I guess it doesn’t need to be created until the new project wizard has finished though.