External module working on simulator but not on device

Hi guys,

I’m working on a little project which involves a circle timer. So I wrote a module for that which is working fine on the simulator, but doesn’t work on an actual device. This is the code:

local functions = {} local myCircle1 local myCircleMask1 local myCircle2 local myCircleMask2 local userTime = 0 local function deleteCircles() display.remove(myCircle1) display.remove(myCircle2) end local function loadCircle2() transition.to(myCircle1, {time = userTime, maskRotation = 0}) timer.performWithDelay(userTime, deleteCircles) end local function loadCircle1() transition.to(myCircle2, {time = userTime, maskRotation = 0}) timer.performWithDelay(userTime, loadCircle2) end function functions.newPieTimer(scale, x, y, time, r, g, b) myCircle1 = display.newImage("assets/circleTimer/circle.png", x, y) myCircle1:scale(scale, scale) myCircle1:setFillColor(r/255, g/255, b/255) myCircleMask1 = graphics.newMask("assets/circleTimer/circleMask.png") myCircle1:setMask(myCircleMask1) myCircle1.maskRotation = 180 myCircle2 = display.newImage("assets/circleTimer/circle.png", x, y) myCircle2:scale(scale, scale) myCircle2:setFillColor(r/255, g/255, b/255) myCircle2.rotation = 180 myCircleMask2 = graphics.newMask("assets/circleTimer/circleMask.png") myCircle2:setMask(myCircleMask2) myCircle2.maskRotation = 180 userTime = time/2 loadCircle1() end return functions

So the circle shows up on the simulator but not on the device, any thoughts?

Kind regards

Bram

What is the error on the device? Please copy and paste the entire error message from xcode or adb.

Hi, 

I debugged it on device but no errors are showing up.

I placed some print statements in my module and it looks like it is executing.

Hmmm, another update: I put all of the code into my main file so I wouldn’t need the module but that didn’t fix it, still nothing on the actual device. 

Any thoughts?

Owkay, I’m sorry for all the post but I found the problem now I just need the solution :slight_smile:

Everything appears fine on my device if I leave the masks out, but I need those of course…

I didn’t do anything special with the masks I believe.

I got one image in white (to display on screen) and that same image in black to mask the white image.

What is the error on the device? Please copy and paste the entire error message from xcode or adb.

Hi, 

I debugged it on device but no errors are showing up.

I placed some print statements in my module and it looks like it is executing.

Hmmm, another update: I put all of the code into my main file so I wouldn’t need the module but that didn’t fix it, still nothing on the actual device. 

Any thoughts?

Owkay, I’m sorry for all the post but I found the problem now I just need the solution :slight_smile:

Everything appears fine on my device if I leave the masks out, but I need those of course…

I didn’t do anything special with the masks I believe.

I got one image in white (to display on screen) and that same image in black to mask the white image.