Android build crashes when second scene references "display"

We have a welcome screen scene that then transitions to a character select scene. The character select scene works fine on the simulator but on my Android device it crashes (no runtime error) with this message:
 

Jul 17 08:54:17.345 Pixel XL:   Force finishing activity com.gmail.l

Jul 17 08:54:17.345 iamd94.ULF4/com.ansca.corona.CoronaActivity

Jul 17 08:54:17.367 Pixel XL: Failed setting process 

Jul 17 08:54:17.367 group of 29101 to 1

Jul 17 08:54:22.266 Pixel XL: Ignoring remove of i

Jul 17 08:54:22.266 nactive process: ProcessRecord{e9b2ce0 0:com.gmail.liamd94.ULF4/u0a152}

We narrowed it down to this happens as soon as there’s any reference of “display”

Here’s the files:

https://github.com/dwesa/ULF4/blob/master/scenes/welcomeScreen.lua

https://github.com/dwesa/ULF4/blob/master/scenes/selection/selectionView.lua

Hi @liamd94,

Do you get any error message in the Corona Console window? Most often, this type of thing is caused with a file name case mismatch… the Simulator is forgiving on that point, but actual devices are not forgiving whatsoever and the file case names of images and so forth must match exactly.

Brent

That was our first thought as well but the logs above are the only things we get in the console. We additionally intentionally broke our filenames to verify that it would show a proper error and those were fairly straightforward runtime errors explaining what was going on. No such indication here.

You don’t by any chance have a global variable named display do you?

Not that I can see. I searched through our files but it doesn’t appear so.

The problem with going too OOP is code like this

overFile = images.buttons.startGame.overFilePath

which then forces you to follow the rabbit hole to

overFilePath = buttonsBaseDir .. "playButtonDown.png"

(Note: there are much more ‘readable’ OO ways of doing this!

so what is your file called?

Hi @liamd94,

Do you get any error message in the Corona Console window? Most often, this type of thing is caused with a file name case mismatch… the Simulator is forgiving on that point, but actual devices are not forgiving whatsoever and the file case names of images and so forth must match exactly.

Brent

That was our first thought as well but the logs above are the only things we get in the console. We additionally intentionally broke our filenames to verify that it would show a proper error and those were fairly straightforward runtime errors explaining what was going on. No such indication here.

You don’t by any chance have a global variable named display do you?

Not that I can see. I searched through our files but it doesn’t appear so.

The problem with going too OOP is code like this

overFile = images.buttons.startGame.overFilePath

which then forces you to follow the rabbit hole to

overFilePath = buttonsBaseDir .. "playButtonDown.png"

(Note: there are much more ‘readable’ OO ways of doing this!

so what is your file called?