App Crashes Right away on Device but not in the Simulator!

Hi Corona Community!

I have encountered an error when trying to launch my app on my iPad mini!

The app works amazingly in the simulator, however, when I test the app through test flight it crashes straight away!  Everything in the build and application loader is successful and error free.  The only part that has an error is on the actual device! :frowning:

Below is the output from my app using the Xcode console in the device window!

May 21 20:07:07 Todds-iPad kernel[0] <Notice>: xpcproxy[255] Container: /private/var/mobile/Containers/Data/Application/B5D45AA7-3560-4163-9051-96D62E7B3FE0 (sandbox)

May 21 20:07:07 Todds-iPad locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0

May 21 20:07:07 Todds-iPad Spin[255] <Error>: assertion failed: 12B410: libxpc.dylib + 51955 [04694BEB-256F-3132-A00F-0C82B79BC689]: 0x7d

May 21 20:07:07 Todds-iPad Unknown[255] <Error>: 

May 21 20:07:07 Todds-iPad Spin[255] <Warning>: Platform: iPad / iPad2,5 / 8.1 / PowerVR SGX 543 / OpenGL ES 2.0 IMGSGX543-113.3 / 2015.2625

May 21 20:07:07 Todds-iPad ReportCrash[254] <Notice>: ReportCrash acting against PID 255

May 21 20:07:07 Todds-iPad ReportCrash[254] <Notice>: Formulating crash report for process Spin[255]

May 21 20:07:07 Todds-iPad SpringBoard[43] <Warning>: BSXPCMessage received error for message: Connection invalid

May 21 20:07:07 Todds-iPad com.apple.xpc.launchd[1] (UIKitApplication:com.gegelgames.spin[0x3cc8][255]) <Notice>: Service exited due to signal: Segmentation fault: 11

May 21 20:07:07 Todds-iPad mediaserverd[37] <Notice>: ‘’ com.gegelgames.spin(pid = 255) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None

May 21 20:07:07 Todds-iPad mediaserverd[37] <Notice>: ‘’ (pid = 255) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None

May 21 20:07:08 Todds-iPad ReportCrash[254] <Notice>: Saved report to /var/mobile/Library/Logs/CrashReporter/Spin_2015-05-21-200707_Todds-iPad.ips.beta

May 21 20:07:08 Todds-iPad SpringBoard[43] <Warning>: Application ‘UIKitApplication:com.gegelgames.spin[0x3cc8]’ crashed.

May 21 20:07:08 Todds-iPad assertiond[57] <Warning>: Could not set priority of <BKNewProcess: 0x16e23790; com.gegelgames.spin; pid: 255> to 2, priority: No such process

May 21 20:07:08 Todds-iPad assertiond[57] <Warning>: Could not set priority of <BKNewProcess: 0x16e23790; com.gegelgames.spin; pid: 255> to 4096, priority: No such process

May 21 20:07:08 Todds-iPad UserEventAgent[17] <Warning>: id=com.gegelgames.spin pid=255, state=0

May 21 20:07:08 Todds-iPad SpringBoard[43] <Warning>: Unable to deliver -[UIRemoteApplication showTopMostMiniAlertWithSynchronizationPort:] message to port 0: (ipc/send) invalid destination port

May 21 20:07:08 Todds-iPad locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0

May 21 20:07:13 Todds-iPad OTACrashCopier[256] <Notice>: (Warn ) <OTACrashCopierController.m __42-[OTACrashCopierController handleRequest:]_block_invoke:447> Creating Power Assertion for 600 secs

May 21 20:07:13 Todds-iPad locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0

May 21 20:07:13 Todds-iPad OTACrashCopier[256] <Notice>: (Warn ) <OTALogSubmissionOperation.m -[OTALogSubmissionOperation postToServer:forRouting:ofLogs:withConnection:usingParams:]:137> ‘job-1-beta’ sending request of 129770 bytes

May 21 20:07:15 Todds-iPad OTACrashCopier[256] <Notice>: (Warn ) <OTALogSubmissionOperation.m -[OTALogSubmissionOperation postToServer:forRouting:ofLogs:withConnection:usingParams:]:137> ‘job-2-beta’ sending request of 28841 bytes

Any help is appreciated and thanks in advance!

-Max

Well you’re crashing to a segmentation error (Signal 11).  This is a case of where you are trying to access a memory pointer that’s pointing to memory you don’t have access too. 

Are you using any features that only work on the device and not the simulator likes ads, gameNetwork, store etc? 

Rob

@rob

Yes I am using Facebook to allow users to login through Facebook connect.

And I have a button that redirects the user to the app store to review my app which also isn’t supported.

Any help so the app runs?

-Max

@rob

???

my reply to your question is above!

Sorry it took me so long to get back on here.  I’m not on the forums 24 hours a day.

Neither of those should cause that crash if they are coded up properly.  Now you need to show us some code.  I would like to see your build.settings file.   We need to see your code from main.lua where you’re calling these things too.

Please make sure to copy/paste the code using the <> in the edit bar above.

Thanks

Rob

@rob

this is my build.settings file:

[lua]–

– For more information on build.settings see the Corona SDK Build Guide at:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

settings =

{

plugins = 

{

[“CoronaProvider.native.popup.social”] = 

{

publisherId = “com.coronalabs”

},

[“facebook”] = 

{

publisherId = “com.coronalabs”

},

},

orientation =

{

– Supported values for orientation:

– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

default = “portrait”,

supported = { “portrait”, }

},

excludeFiles =

{

– Include only the necessary icon files on each platform

iphone = { “Icon-*dpi.png”, },

android = { “Icon.png”, “Icon-Small-*.png”, “Icon*@2x.png”, },

},

– iOS Section

iphone =

{

plist =

{

UIApplicationExitsOnSuspend = false,

FacebookAppID = “893514267378337”,  --replace XXXXXXXXXX with your Facebook App ID

UIStatusBarHidden = false,

UIPrerenderedIcon = true, – set to false for “shine” overlay

–UIApplicationExitsOnSuspend = true, – uncomment to quit app on suspend

CFBundleIconFiles =

{

“Icon.png”,

“Icon@2x.png”,

“Icon-60.png”,

“Icon-60@2x.png”,

“Icon-60@3x.png”,

“Icon-72.png”,

“Icon-72@2x.png”,

“Icon-76.png”,

“Icon-76@2x.png”,

“Icon-Small.png”,

“Icon-Small@2x.png”,

“Icon-Small@3x.png”,

“Icon-Small-40.png”,

“Icon-Small-40@2x.png”,

“Icon-Small-50.png”,

“Icon-Small-50@2x.png”,

},

–[[

– iOS app URL schemes:

CFBundleURLTypes =

{

{

CFBundleURLSchemes =

{

“fb893514267378337”,  – replace XXXXXXXXX with your Facebook appId

}

}

}

–]]

}

},

– Android Section

android =

{

usesPermissions =

{

“android.permission.INTERNET”,

},

},

}[/lua]

This is my main.lua:

[lua]-----------------------------------------------------------------------------------------

– main.lua


– Your code here

local facebook = require “facebook”

local fbAppID = “893514267378337”

–go to menu

local storyboard = require “storyboard”

storyboard.gotoScene( “menu” ) [/lua]

Where are you initialing facebook?

Can you also put in some print statements to see how far you’re getting?

Rob

@rob

This is where I am initialing Facebook.  When they click the button, Facebook connect will launch.

[lua]–create facebook icon

local facebookIcon = display.newImage( “FB-f-Logo__blue_114.png” )

facebookIcon.x = display.contentCenterX - 100; facebookIcon.y = display.contentCenterY + 235

facebookIcon:scale(.5, .5)

group:insert(facebookIcon)

–make facebook button work

local function facebookBtn(event)

if (event.phase == “began”) then

print(“facebook worked!”)

facebook.login( fbAppID, facebookListener, { “user_friends”, “email” } )

end

end

facebookIcon:addEventListener( “touch”, facebookBtn )[/lua]

I doubt facebook is the cause since you have it on a button.  Something is happening early on in the process that’s crashing it.   Can you put some print statements in and see how far you’re getting.

Rob

@rob 

I added print statements throughout my game.  Only the menu statements print out to the console in the Xcode debugger console meaning thats the problem.

It seems it is crashing due to ‘<Notice>: Service exited due to signal: Segmentation fault: 11’ or ’ <Error>: assertion failed: 12F70: libxpc.dylib + 51915 [8DB46991-F182-35E3-8E95-918A4007AA7A]: 0x7d’

Either of those looks like the problem to me.  The second error above happens first and the first statement occurs after the code prints out to the console.

All my print statements print out successfully but it still crashes immediately!

Any help?

Thanks in advance!

Can you post your console log again, I’m having trouble following your description.

Rob

@rob

May 24 15:56:31 Maxs-iphone wifid[70] <Notice>: WiFi:[454190191.096806]: WiFi unquiescing requested by “locationd”

May 24 15:56:31 Maxs-iphone wifid[70] <Notice>: WiFi:[454190191.134745]: WiFi unquiescing requested by “locationd”

May 24 15:56:32 Maxs-iphone kernel[0] <Notice>: xpcproxy[580] Container: /private/var/mobile/Containers/Data/Application/E458DDFA-9EDF-4FCF-9F9A-2168EDC95E40 (sandbox)

May 24 15:56:32 Maxs-iphone locationd[64] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0

May 24 15:56:33 Maxs-iphone Spin[580] <Error>: assertion failed: 12F70: libxpc.dylib + 51915 [8DB46991-F182-35E3-8E95-918A4007AA7A]: 0x7d

May 24 15:56:33 Maxs-iphone Unknown[580] <Error>: 

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: Platform: iPhone / iPhone5,2 / 8.3 / PowerVR SGX 543 / OpenGL ES 2.0 IMGSGX543-115.5 / 2015.2625

May 24 15:56:33 Maxs-iphone wifid[70] <Notice>: WiFi:[454190193.470297]: WiFi unquiescing requested by “locationd”

May 24 15:56:33 Maxs-iphone wifid[70] <Notice>: WiFi:[454190193.511113]: WiFi unquiescing requested by “locationd”

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: adding menu sound effect

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: creating circle

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: create wheel effect

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: add menu objects

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: create facebook icon

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: create review app icon

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: create mute icon

May 24 15:56:33 Maxs-iphone ReportCrash[581] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)

May 24 15:56:33 Maxs-iphone ReportCrash[581] <Notice>: ReportCrash acting against PID 580

May 24 15:56:34 Maxs-iphone ReportCrash[581] <Notice>: Formulating crash report for process Spin[580]

May 24 15:56:34 Maxs-iphone com.apple.xpc.launchd[1] (UIKitApplication:com.gegelgames.spin[0x1865][580]) <Notice>: Service exited due to signal: Segmentation fault: 11

May 24 15:56:34 Maxs-iphone SpringBoard[43] <Warning>: BSXPCMessage received error for message: Connection invalid

May 24 15:56:34 Maxs-iphone mediaserverd[37] <Notice>: ‘’ com.gegelgames.spin(pid = 580) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None

May 24 15:56:34 Maxs-iphone mediaserverd[37] <Notice>: ‘’ (pid = 580) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None

May 24 15:56:34 Maxs-iphone wifid[70] <Notice>: WiFi:[454190194.205512]: BG Application: Not Present, BG Daemon: Present. Daemons: apsd networkd UserEventAgent 

May 24 15:56:34 Maxs-iphone SpringBoard[43] <Warning>: Application ‘UIKitApplication:com.gegelgames.spin[0x1865]’ crashed.

May 24 15:56:34 Maxs-iphone assertiond[58] <Warning>: Could not set priority of <BKNewProcess: 0x14d5ed90; com.gegelgames.spin; pid: 580; hostpid: -1> to 2, priority: No such process

May 24 15:56:34 Maxs-iphone assertiond[58] <Warning>: Could not set priority of <BKNewProcess: 0x14d5ed90; com.gegelgames.spin; pid: 580; hostpid: -1> to 4096, priority: No such process

May 24 15:56:34 Maxs-iphone SpringBoard[43] <Warning>: Unable to deliver -[UIRemoteApplication showTopMostMiniAlertWithSynchronizationPort:] message to port 0: (ipc/send) invalid destination port

May 24 15:56:34 Maxs-iphone locationd[64] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0

May 24 15:56:34 Maxs-iphone ReportCrash[581] <Notice>: Saved report to /var/mobile/Library/Logs/CrashReporter/Spin_2015-05-24-155633_Maxs-iphone.ips.beta

May 24 15:56:37 Maxs-iphone SpringBoard[43] <Warning>: The view controller <SBBulletinRootViewController: 0x1472a280> returned NO from -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementPerform message: attempt to write a readonly database sql: BEGIN IMMEDIATE;

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementReset message: attempt to write a readonly database sql: BEGIN IMMEDIATE;

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementPerform message: attempt to write a readonly database sql: INSERT INTO outgoing_message (guid, alternate_guid, account_guid, from_identifier, message_data, data, protobuf_data, destinations, data_to_encrypt, encrypt_payload, compress_payload, use_top_level_dict, wants_response, expiration_date, command, wants_delivery_status, delivery_status_context, message_uuid, priority, date, is_sent, identifier, forced_local, peer_response_identifier, expects_peer_response, wants_app_ack, non_waking, fire_and_forget, stored_size, duet_identifiers, bypass_duet, queue_one_identifier, enforce_remote_timeout) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementReset message: attempt to write a readonly database sql: INSERT INTO outgoing_message (guid, alternate_guid, account_guid, from_identifier, message_data, data, protobuf_data, destinations, data_to_encrypt, encrypt_payload, compress_payload, use_top_level_dict, wants_response, expiration_date, command, wants_delivery_status, delivery_status_context, message_uuid, priority, date, is_sent, identifier, forced_local, peer_response_identifier, expects_peer_response, wants_app_ack, non_waking, fire_and_forget, stored_size, duet_identifiers, bypass_duet, queue_one_identifier, enforce_remote_timeout) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementPerform message: attempt to write a readonly database sql: INSERT OR REPLACE INTO _SqliteDatabaseProperties VALUES (?, ?);

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementReset message: attempt to write a readonly database sql: INSERT OR REPLACE INTO _SqliteDatabaseProperties VALUES (?, ?);

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementPerform message: attempt to write a readonly database sql: BEGIN IMMEDIATE;

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementReset message: attempt to write a readonly database sql: BEGIN IMMEDIATE;

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementPerform message: attempt to write a readonly database sql: INSERT OR REPLACE INTO _SqliteDatabaseProperties VALUES (?, ?);

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementReset message: attempt to write a readonly database sql: INSERT OR REPLACE INTO _SqliteDatabaseProperties VALUES (?, ?);

May 24 15:56:37 Maxs-iphone identityservicesd[42] <Warning>: [Warning] SQLite error in function: CSDBSqliteStatementReset message: attempt to write a readonly database sql: SELECT ROWID, guid, alternate_guid, account_guid, from_identifier, message_data, data, protobuf_data, destinations, data_to_encrypt, encrypt_payload, compress_payload, use_top_level_dict, wants_response, expiration_date, command, wants_delivery_status, delivery_status_context, message_uuid, priority, date, is_sent, identifier, forced_local, peer_response_identifier, expects_peer_response, wants_app_ack, non_waking, fire_and_forget, stored_size, duet_identifiers, bypass_duet, queue_one_identifier, enforce_remote_timeout FROM outgoing_message WHERE guid = ? ORDER BY ROWID ASC;

@rob

Also, I just tested my app on my iPhone 5 also running iOS 8.3 and it indeed crashes too.

I then tested it on my iPhone 6 and it DOESN’T CRASH!

I have absolutely no idea why it would run on an iPhone 6 but not an iPhone 5 or iPad mini, all running the same updated software.  Thanks in advance for helping me!

-Max

This is the last print statement before you crash:

May 24 15:56:33 Maxs-iphone Spin[580] <Warning>: create mute icon

What is going on in your code after that print?

Rob

@rob 

Nothing is happening after that print.  Below is my menu.lua file which is my first scene that contains all of my print statements.

[lua]–remove status bar

display.setStatusBar(display.HiddenStatusBar)

–require modules

local storyboard = require “storyboard”

local scene = storyboard.newScene()

local widget = require “widget” 

local easing = require “easing”

local facebook = require “facebook”

local fbAppID = “893514267378337”

local physics = require “physics”

physics.start()

physics.setGravity( 0, 3)

physics.setReportCollisionsInContentCoordinates( true )

–create scene

function scene:createScene( event )

local group = self.view

–menu sound effect

local menuSoundEffect = audio.loadStream(“quirk-tone.mp3”)

audio.play(menuSoundEffect, { loops = -1 } )

print(“adding menu sound effect”)

–create background

local bg = display.newRect( 150, 150, 1220, 840)

bg:setFillColor(.2, .8, 1)

group:insert(bg)

–create circle to be made into wheel

local wheel = display.newCircle(150, 100, 100)

wheel.x = display.contentCenterX; wheel.y = display.contentCenterY

wheel:scale(1.7, 1.7)

group:insert(wheel)

print(“creating circle”)

–initialize kernel to create wheel effect

local kernel = require “kernel_generator_custom_wheel”

graphics.defineEffect( kernel )

–create wheel using effect on circle

wheel.fill.effect = “generator.custom.wheel”

print(“create wheel effect”)

local function wheelAnimation()

wheel.rotation = math.random() * 360

print(“wheel animation started”)

end

timer.performWithDelay( 180, wheelAnimation, -1 )

–make game title

local title = display.newText(“SPIN”, display.contentCenterX, 20, “BebasNeueBold”, 120)

group:insert(title)

–make ‘play’ button

local playBtn = display.newRoundedRect(display.contentCenterX, display.contentCenterY, 150, 150, 20)

group:insert(playBtn)

local playText = display.newText(“PLAY”, display.contentCenterX, display.contentCenterY, “BebasNeueBold”, 70)

playText:setFillColor(0, 0, 0)

group:insert(playText)

print(“add menu objects”)

–make play button work and take user to game

local function startGame(event)

if (event.phase == “began”) then

storyboard.removeScene( “menu” )

storyboard.gotoScene( “game” )

print(“go to ‘game’ to start”)

end

end

playBtn:addEventListener( “touch”, startGame )

–create facebook icon

local facebookIcon = display.newImage( “FB-f-Logo__blue_114.png” )

facebookIcon.x = display.contentCenterX - 100; facebookIcon.y = display.contentCenterY + 235

facebookIcon:scale(.5, .5)

group:insert(facebookIcon)

print(“create facebook icon”)

–make facebook button work

local function facebookBtn(event)

if (event.phase == “began”) then

facebook.login( fbAppID, facebookListener, { “user_friends”, “email” } )

print(“facebook worked!”)

end

end

facebookIcon:addEventListener( “touch”, facebookBtn )

–review app icon

local reviewIcon = display.newRoundedRect(display.contentCenterX, display.contentCenterY + 235, 58, 60, 5) 

reviewIcon:setFillColor(.99, .6, .4)

local star = display.newImage( “imageedit_1_3872267622.gif” )

star.x = display.contentCenterX; star.y = display.contentCenterY + 235

star:scale(.25, .25)

group:insert(reviewIcon)

group:insert(star)

print(“create review app icon”)

–make review button work

local function reveiwBtn(event)

if (event.phase == “began”) then

system.openURL( “itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=XXXXXXXXX” )

–fill in XXXXXXX as app id for review page

print(“review button worked!”)

end

end

reviewIcon:addEventListener( “touch”, reveiwBtn )

–mute button icon

local muteIcon = display.newRoundedRect(display.contentCenterX + 100, display.contentCenterY + 235, 58, 60, 5)

local mute = display.newImage( “imageedit_1_8962693955.gif” )

mute.x = display.contentCenterX + 100; mute.y = display.contentCenterY + 235

mute:scale(.25, .25)

group:insert(muteIcon)

group:insert(mute)

print(“create mute icon”)

–make mute button work

local function muteBtn(event)

if (event.numTaps == 1) then

audio.stop()

elseif (event.numTaps == 2) then

audio.play(menuSoundEffect)

print(“mute worked!”)

end

end

muteIcon:addEventListener( “tap”, muteBtn )

end

–enter scene

function scene:enterScene( event )

local group = self.view

end

–exit scene

function scene:exitScene( event )

local group = self.view

end

–destroy scene

function scene:destroyScene( event )

local group = self.view

end

scene:addEventListener( “createScene”, scene)

scene:addEventListener( “enterScene”, scene)

scene:addEventListener( “exitScene”, scene)

scene:addEventListener( “destroyScene”, scene)

return scene

[/lua]

@rob

Above is my menu.la file where the crash is occurring as it is my first scene.  Thanks in advance for your help! Also, keep in mind the app worked only on the iPhone 6, not the iPhone 5 or iPad mini.

Put some more prints in after line 125, say maybe at 126, 136 and 138.  Also put a print in your enterScene function too.

Though this isn’t the cause, you do need to uncomment the CFBundleURLTypes if you expect Facebook to work on iOS. 

@rob

I added print statements to all the lines you said above…

Each and every statement prints out normally before the error and crash!  I have no idea what is wrong with it because I tested it on my friends iPhone 6 and it runs perfectly opposed to my iPhone 5 and iPad mini!  Thanks for your assistance thus far!

Hope we figure this out!

-Max

So something is happening after createScene finishes.  The only thing I see is your wheel timer.  Do me a favor and comment out the entire wheel code starting with the shader through the random rotation of it.  Perhaps there is a bug in the shader and it doesn’t like being rotated or something.