Develop branch Projucer crashes on macOS 10.12.3 & 10.13.5

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.

something definitely broken,
edit: removed image of release Xcode stack. (building Debug now, was Release apparently on my rig)

needs to start bisecting :slight_smile:

So it seems something happened here:

(since this is a pretty big commit it’s not a quick thing to tackle).

It also crashes for me on windows, throwing an exception because of a read access violation.
Juce_component.cpp, line 687!

Just to add some non-OS info. :slight_smile:

Hi all.

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);

Unfortunately, I have found some inconsistency too. I compiled the Projucer (current dev branch), ran in debug and found the following:

It opened the Create New Project menu…

Got a EXC_BAD_ACCESS error @ line 199 in juce_Component.cpp…

template <typename PointOrRect>
static PointOrRect unscaledScreenPosToScaled (const Component& comp, PointOrRect pos) noexcept
    return unscaledScreenPosToScaled (comp.getDesktopScaleFactor(), pos);

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.

1 Like

As @RustyPine 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!


FYI it was a really dumb mistake - a fix should be up on develop in the next few minutes.

That worked for what I saw. Thank you Jules.

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.

Can you post the stack trace?

Hi Ed, I pulled from develop this morning & can’t seem to reproduce the issue. Perhaps I goofed something last week :stuck_out_tongue:

1 Like