Black screen due to nested mask limit?

Is it possible that the screen can go black due to a violation of the nested mask limit, but the screen can still be touched and the objects still respond to touch even if the screen is black?

My app has an implementation of text fields that create native.newTextField over display.newText when the newText is touched. I also overlay layers of popups on top of each other, some of which contain scrollView or listView widgets or newText objects, so there’s a real chance the app is over the 3 nested mask limit, although I guess there’s no way to know that. At some point (maybe with graphics 2.0, maybe iOS 8, maybe something else), the app started blacking out when exiting newTextFields, but the screen remains responsive to touch, and if you manage to touch the black screen where a newText exists, the whole screen shows back up again when the newTextField is displayed.

Running this on an iPhone 6 on xCode 6, the device console shows absolutely nothing, and I have showRuntimeErrors turned on, but there is no hint of an error message at all.

The worst part is, it’s completely random as to whether the screen blacks out or not when exiting the newTextField. It’s probably about 50% of the time, but it is totally random.

I’ve tried shoving the scene.view off-screen so that the nested masks (if they exist) aren’t under the newTextField. I’ve tried display.getCurrentStage():insert(stage.view). I’ve tried some other things. Nothing makes any difference at all.

Is this behavior seen by anyone else? Is it consistent with exceeding nested masks on iPhone?

Any help would be deeply appreciated – the app is in a bad state until this is fixed.

Solved, and it’s not the masking limit. Since 2011, I’ve been destroying my newTextField objects from the userInput “ended” phase. It worked until either the hardware got faster or something in Corona changed, but it’s obviously not a good idea to destroy objects from within an event of the object itself. Looks like the usual timer.performWithDelay(1,…) approach to calling display.remove() from within the object’s event has resolved this problem. The randomness of the problem definitely looks like a timing issue in retrospect.

Solved, and it’s not the masking limit. Since 2011, I’ve been destroying my newTextField objects from the userInput “ended” phase. It worked until either the hardware got faster or something in Corona changed, but it’s obviously not a good idea to destroy objects from within an event of the object itself. Looks like the usual timer.performWithDelay(1,…) approach to calling display.remove() from within the object’s event has resolved this problem. The randomness of the problem definitely looks like a timing issue in retrospect.