Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Simulator causing brand new Mac Mini to crash?
Started by Alan PlantPot Mar 11 2019 06:33 AM

- - - - -
15 replies to this topic
mac crash simulator
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

A few weeks ago we purchased a brand new Mac Mini (running Mojave) which was crashing regularly, and I put that down to malfunctioning hardware. Apple have sent a replacement and I’ve done a completely fresh install, and everything was fine until I started using Corona. Within 10 minutes the Mac completely froze (I waited about 6 or 7 minutes before forcing a shutdown using the hardware power button).
 
Both Mac Minis have only crashed when Corona was running, in particular restarting the simulator seemed to be a big trigger point.
 
Unfortunately this freeze/crash didn’t generate any error logs whatsoever - in fact all logging has a gap for the 7 mins where it was frozen.
My guess is that it could be related to shaders - a memory leak or something like that perhaps? I had already noticed on the first Mac that when we used shaders it caused visual issues such as some display objects (which were not part of the shader) only being half rendered or not rendering at all, or textures becoming distorted (weird tiling etc). Those things didn’t ever happen on my 2011 Mac Mini (High Sierra). It seems to predominantly cause text to be incorrectly rendered, though sometimes our background image gets superimposed with other textures from within the app. In the attached image (please ignore the red rectangles) you can see the Quit button is rendered but only half of its colour fill has been applied - this is not something we are doing in code, and it doesn't happen on my old Mac Mini or on android/ios devices.
 
When one of these things happens it won’t always lead to a freeze and crash, but I can’t go very long before it does. I tried disabling the shader entirely in the sim, and while it was much more stable it did still occasionally crash when I tried to reload the sim.
 
Why MacOS completely crashes the machine rather than force quitting the app…I don’t know. Apple technical mastery at work I guess.
 
When I installed Corona I did get a message saying “this app does not support Mac OS 10.14” or something along those lines, I'm not sure if the message was generated by Corona or the OS. 
When I tried reinstalling (and cleared the /Library/ files) I didn’t get the message again. I would assume this means the message came from the OS and it has remembered that I clicked "ok" for the Corona app, but I can’t say for sure.
 
 
Has anyone else experienced any similar crash issues on newer Macs (whether Mac Mini, Macbook etc)? 
Can anyone at Corona offer any suggestions for what could be happening here?
 
 
 

Attached Thumbnails

  • Picture 4.jpg


[TOPIC: post.html]
#2

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,013 posts
  • Corona SDK

Check the security control panel and make sure you give the Corona Simulator "Full Drive Access" or whatever it is called (I don't remember from the top of my head).



[TOPIC: post.html]
#3

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

Full Disk Access?  

 

The other Security places that use Corona automatically prompted an "Allow Corona to do X" alert, but I haven't had anything similar appear for Full Disk Access.  

 

Did you experience similar issues that were solved by this? I've just given Full Disk Access to the Corona Simulator and restarted it, and I still have text which is failing to render.



[TOPIC: post.html]
#4

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,013 posts
  • Corona SDK

I was using a different machine than the one I am using now and had similar issues. The machine I am currently using still has 10.13 (I have not updated it). I don't remember if it was finally resolved by giving Corona "Full Disk", by removing some fonts that were either corrupted or somehow 10.14 didn't like or by removing a utility that dynamically tried to load fonts (I have a lot of fonts). Sadly that is all I got. Sorry, Alan that I can't be of any further help.

 

Sometimes when I have an issue I try so many things and end up fixing it but have no idea what fixed it in the end.



[TOPIC: post.html]
#5

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

Hmmm, fonts might be worth looking into as we do use some custom ones. Given that text objects seem to be the mainly affected objects I really should've thought of that myself.  

 

Sometimes when I have an issue I try so many things and end up fixing it but have no idea what fixed it in the end.

 

 

I'd be lying if I said that I never do this   :P

 

 

Edit: just tried changing all fonts to just use native.systemFont and still had the same issues  :(



[TOPIC: post.html]
#6

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

@Corona 

 

I can't be 100% sure of this yet, but disabling the zoomBlur shader from the app when in the simulator seems like it may have stopped the crash (it's possible that I've just got lucky and it will still crash at some point). It has definitely stopped the mis-rendered text issue, as that was reproducible very quickly before no longer seems to be happening.  

 

So perhaps there is something in the zoomBlur shader specifically which the latest Mac hardware (or Mojave) doesn't work well with?


  • agramonte likes this

[TOPIC: post.html]
#7

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,013 posts
  • Corona SDK

Thank you! I believe you are 100% correct. I think you should mark that is the correct answer. My Mojave machine has the zoomBlur disabled.



[TOPIC: post.html]
#8

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

So did you previously have zoomBlur on as well? And then disabling it fixes the issues you were having?

 

Out of interest, what hardware are you using? In case it's a useful reference to anyone at Corona I'm using:

 

Mac Mini (2018) running Mojave 10.14.3.

CPU: 3 GHz Intel Core i5

RAM: 8 GB 2667 MHz DDR4

GPU: Intel UHD Graphics 630 1536 MB



[TOPIC: post.html]
#9

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 612 posts
  • Corona Staff

We had similar issues with new macbooks pro. I tracked it down that it involves nested masks. For example, Device Sking involves mask, as well as text. If you're using device skin, try select "borderless" variant and see if crashing still occurs.

 

I was trying to fix it, but it seems that there's something wrong with Intel graphics driver which is causing crashes.



[TOPIC: post.html]
#10

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

Changing to borderless sim didn't make any difference. 

 

Does "nested masks" in this context include newText objects? My understanding is that behind the scenes all text objects are basically masked bitmaps. 

 

I don't think we have many manually masked objects (the odd container, newMask etc here and there) in general, and even fewer which are nested but I'm not 100% sure without checking.  



[TOPIC: post.html]
#11

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 612 posts
  • Corona Staff

Usually it's a mask on a group, with text object inside. It seems like when doing it, memory gets corrupted on GPU somehow.



[TOPIC: post.html]
#12

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

I assume the issue you already knew was the one described here: 

https://forums.coronalabs.com/topic/73147-newest-fastest-macbook-pro-has-a-serious-simulator-display-problem/page-4

 

The descriptions there are identical to what I've been seeing. It's possible that the borderless sim would prevent crashes, earlier I only checked for distorted text as that seems to be a precursor to the crashing. I know that disabling shaders in the sim seems to "fix" the problem for us, so I'd rather not do too much testing of borderless sim with shaders in case it still crashes. The crashes can't be good in the long term so I'm keen to just avoid them for now.

 

It's crazy that the OS/hardware allows it to reach the point where it crashes the whole machine, the most you would expect is for it to force quit Corona.



[TOPIC: post.html]
#13

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 612 posts
  • Corona Staff

When I was trying to pinpoint this issue you posted, I saw all signs of system memory corruption occasionally, like random screen corruptions, rebooting, even kernel panic once. It was very hard to track down what exactly causing it, because, well, everything stops working :)

I'm pretty sure at this point that issue is with OpenGL with Intel graphics driver for macOS.



[TOPIC: post.html]
#14

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

I agree, my machine would freeze for over 5 mins - I had to forcibly shut it down with the power button. When I went back to check the logs there was no logging of any kind during that time - so the entire OS was completely frozen. 

 

Well done Apple...



[TOPIC: post.html]
#15

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 612 posts
  • Corona Staff

Hey. I recently stumbled on similar issue in another game. Could you try downloading and telling if you see crazy glitching in this one?

Try to switch to windowed mode too



[TOPIC: post.html]
#16

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 903 posts
  • Corona SDK

Yeah, that went crazy for me too. The screen was flickering constantly and it was almost impossible to see what I was doing (just trying to exit the app was hard work).




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: mac, crash, simulator