Where are you initialing facebook?
Can you also put in some print statements to see how far you’re getting?
Rob
Where are you initialing facebook?
Can you also put in some print statements to see how far you’re getting?
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
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
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;
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
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]
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.
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.
You are 100% right! I commented out the shader and rotation code and now the app runs on my devices! However, when I press play to to go the game scene (which also contains the same shader which the user can drag to rotate it), the app crashes! There is defiantly something wrong with the shader or the movement of it. Any suggestions on what I should do? Someone on the forum helped me make the shader and it works great on the simulator AND iPhone 6 and iPhone 6 plus! So there is something very wrong here. Thanks for the help throughout this issue. Can’t wait to figure this out!
-Max
Yea, I don’t know shaders well at all. You can break down the problem a bit more by creating the shader but not rotating/moving it and see if that’s okay. Then create a new thread about the shader and hopefully someone with a lot more experience than I have can answer.
Rob
I will do exactly what you said above.
However, I don’t understand why it works fine on an iPhone 6 or iPhone 6 plus!
If you could explain that to me or give me your theory that would be great! Thanks!
I followed what you said to do in your latest reply and the app crashes! Something is wrong with the shader that won’t run!
Any suggestions on how to go about fixing this?
You are going to have to ask on one of the shader threads or start a new thread.
The iPhone 6/6 Plus has more memory and a more advanced GPU which could explain the issue on the older devices, but still the iPhone 5 and iPad Mini 2 are not very old.
Rob
Nobody is responding to any of my posts about my problem!
Any suggestions? The app works on an iPhone 6 and iPhone 6 plus but nothing lower…
Might I suggest changing the title of your post to something like “Custom shader crashing with segment violation” that better describe your problem. You can also bump your post ever 24 hours if you don’t get a response.
Rob