[Solved] Mac Build hangs on quit.

Is there any news on the following issue? It causes an unfriendly user’s experience IMO.

I noticed that the console outputs the following when it hangs on quit:
LLVM Profile Error: Failed to write file “default.profraw”: Operation not permitted

Anyone know what default.profraw is or what it’s purpose is? Sometimes I see the file pop up next to the .app.

Bump

@_Daniel ,

I do have some updates, but unfortunately, no timeline on a fix.

Our QA team has been able to reproduce the issue and that has helped us partially understand the cause. The slowness is caused by cleanup when shutting down a thread within the mono runtime. We will still need more time to dig in and fix the bug (without causing additional problems).

I am very sorry for the inconvenience this issue has caused.

Thank you for the detailed report! I am glad to know that it is being worked on. The software that it is effecting is a productivity app that is being used by thousands. I will be very grateful once this bug has been resolved or a workaround has been posted.

Any chance you could make Unity IAP open source? That would allow me to try and fix the issue for myself and everyone else. Right now I feel quite stuck.

Can you describe how this has you blocked? Granted it is not the best user experience, but it does not seem like a blocking issue. This would help to properly set the priority. As mentioned, we need to carefully test any potential fix for possible side effects. Open source is not an option, and not in your best interest anyway. It would make it nearly impossible to upgrade, etc. and could introduce unintentional side effects if not thoroughly tested.

I see. To clarify, I did not mean to say that it is preventing me from submitting my app. What I meant by stuck was in regards to resolving the issue, it feels like all I can do is wait for you guys to come out with an update.

Instead of Open Source, what if you just distributed Unity IAP in source code format instead? This would allow me to fix this issue at my own risk. Also it would allow me to find out what this default.profraw is all about because I can not find any mention of it anywhere on the web.

Sorry, that would not be possible, but thank you for asking.

Ok. My apologies if I have come off slightly abrupt. I am truly grateful for Unity IAP and the number of platforms that it supports. And thanks for being so responsive!

@_Daniel ,

We have not resolved this issue yet, but it looks like there may be a possible workaround. I haven’t confirmed this, but according to the comments on the Issue Tracker, it’s possible to use the following code to resolve this problem in 2017.1.2:

#if UNITY_STANDALONE_OSX
System.Diagnostics.Process.GetCurrentProcess().Kill();
#endif

Ok, that is good to know. I will give it a shot.

My project is currently on 5.6.3, and when I tested that code it did not work properly in the Sandbox environment. Also it caused the editor to quit so I would recommend adding !UNITY_EDITOR. If you have any other work arounds (even if they are hacky) I will be eternally grateful.

Yippee, I got it to work in the Sandbox environment! Here’s the code:

void OnApplicationQuit ()
{
#if UNITY_STANDALONE_OSX && !UNITY_EDITOR
    // HACK: fix IAP hang on quit!
    if (Time.time > 1f)
        System.Diagnostics.Process.GetCurrentProcess ().Kill ();
#endif
}
1 Like