Just pulled to the develop branch tip and I’m running into issues with running the Projucer. When I open the app it crashes after a couple seconds. The exact stack trace is different every time but I get the whiff that something is getting deleted and then referenced.
Tested on both my machines. Anybody else running into this issue?
Have you build the Projucer yourself with the develop branch? If yes, you could launch the Projucer in Debug mode, debug it, and find out why it crashes.
I’m having a problem with this commit too. In my case, JUCE specifically triggers an assertion in some MessageManager::Lock code when trying to decrement the ReferenceCountedObjectPtr count of the old pointer, apparently where that old pointer was some random garbage with a negative ref count.
The trigger? juce_MessageManager.cpp line 297: blockingMessage = *new BlockingMessage (this);
Tried again, this time it stopped at the same menu, and I chose to open an existing project which caused no problems a day or so ago. It crashed and I received this in the debugger…
Projucer(29844,0x101e11380) malloc:
*** error for object 0x1032093a8: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
I don’t see juce_Component.cpp having changed in that commit, but I do see juce_PopupMenu.cpp. I did not check if this is used in the Projucer primarily because it is getting late here, but thought I should mention that this is happening.
Ed is about to dump a whole bunch of changes to the screen-scaling code next week, so if this still persists after that, maybe remind us again to have a look.
As @tadn suggested this is something due to something is getting deleted and then referenced so it might be unrelated to screen-scaling. In this thread alone there are multiple crashes each one in a different location.
The commit that regressed this isn’t related to any screen-scaling,
It seems to be related to many areas with RefCounts as you wrote:
allow ReferenceCountedObjectPtrs to be constructed or copied from references as well as pointers
Ah - right, I was just expecting this to be about scaling (as so many threads recently have been!) but yes, it’s something else. Thanks - I’ll fix this right away!
Just pulled to the latest develop tip, trashed “~/Library/Application Support/Projucer”, and I’m getting a very similar crash again. Crashes a few moments after launching.
This time built with latest macOS (10.13.6) and no changes to the projucer xcode project.