Projucer crashing when deleting exporter


#1

Hey,

I found a very strange bug in Projucer (5. 0. 1.). It crashes when I attempt to delete exporter (Visual Studio 2015) from Projucer project, save and then “Reaload from the disk”. But it does only if Projucer is compiled as Release x64 and if the project is opened automatically in Projucer (because it was the last project opened).

To explain, it doesn’t crash when i start Projucer, then I manually open project and try to delete the exporter.
But it does crash when I start Projucer (it loads automatically the last opened project) and then I delete the exporter.

Side note, maybe another bug:
When I compile as Debug (or as 32-bit) or when the project is opened manually, after deleting the exporter I get error “Error writing to file ProjectName.jucer: At least one of your JUCE module paths is invalid”. Which is strange, because the paths are saved for each project independently, and I have no other exporter in the created.

I’m using Win7 SP1 x64 and Visual Studio 2015. Tested on current develop branch.
The crash does not happen on Projucer 4.3.1. The “Error writing to file…” does.


#2

I’m afraid I can’t reproduce this. Are you able to supply a stack trace?


#3

I would like to, but I get only addresses in call stack (that’s because debugging is disabled in Release mode). If I manually enable debugging for the Release config it won’t crash. Seems like this is impossible to debug.

Anyway, here’s step-by-step:

Compile Projucer 5.0.1. as Release x64 (debugging disabled (as default))
Open Projucer
Open some project (which has one Visual Studio 2015 exporter (I didn’t tested with multiple))
Close Projucer
Open Projucer (the project is opened automatically)
Delete the exporter
CTRL+S
"The juer file has been modified", click "Reload from the disk"
Crash


#4

OK, I’ve tracked this down and pushed a fix.

Please try this again with the tip of the develop branch.


#5

The crash is fixed now, but it spawned new bug. (How did you tracked it down? I was trying a lot but haven’t found any way how to do it.)

The new bug is: when you delete your last exporter you can’t save the project.
Steps to reproduce:

  1. Open Projucer
  2. Delete all exporters
  3. CTRL+S
  4. “Error writing to jucer file: … No exporters found!”

The jucer file is unchanged, exporters are not deleted (they’re still visible in Builds folder). This is present both in Release and Debug configurations.


#6

That’s not a bug: directly underneath “Error writing to jucer file: … No exporters found!” the dialog also says “Please add an exporter before saving”. Perhaps we should change this, but it’s expected that the project wouldn’t be saved after displaying this message.


#7

You’re right, on the other hand I think user shouldn’t be able to delete something if he can’t save the project because of that. And maybe one could find a situation when he does not need a exporter anymore.