[
https://issues.apache.org/jira/browse/CB-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13827201#comment-13827201
]
Marc MacLeod commented on CB-2301:
----------------------------------
@Travis Dahl
I'm also working on a Meteor app and ran into this issue. If you, or anyone
else is interested, I've come up with solution that works for now. See below.
I'm using https://github.com/SpaceCapsule/Meteor-cordova to load my Meteor app
in an iFrame, and make phonegap functions available to the meteor app. Then, in
my client startup function I included some logic to disconnect the client and
reconnect it when the user pauses/resumes the mobile app:
Meteor.startup ->
cordova = new Cordova()
# for the mobile app, disconnect meteor when it's backgrounded
cordova.addEventListener 'pause', ->
cordova.call 'console.log', ['METEOR: App paused.']
Meteor.disconnect()
cordova.addEventListener 'resume', ->
cordova.call 'console.log', ['METEOR: App resumed.']
Meteor.reconnect()
The specific issue I filed:
https://github.com/SpaceCapsule/Meteor-cordova/issues/7
> EXC_BAD_ACCESS on resume/wake on iOS device
> -------------------------------------------
>
> Key: CB-2301
> URL: https://issues.apache.org/jira/browse/CB-2301
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 2.2.0
> Environment: iPhone 5 running iOS 6.0.2 and Phonegap 2.2.0. (Xcode
> 4.5.2 on Mountain Lion)
> Reporter: Ross Holdway
> Assignee: Shazron Abdullah
> Priority: Critical
> Labels: cordova, ios, phonegap
> Fix For: 2.5.0
>
> Attachments: Sample.zip, Screenshot.png
>
>
> I have implemented a websocket connection (using socket.io) within my app
> which it uses to communicate with the server. On locking and waking the
> device, it disconnects and reconnects correctly, but on leaving the device
> locked for 1 minute or longer when unlocking, the application will crash
> sometimes instantly, or sometimes after reconnecting with the server.
> If I do the same, but run my app within mobile Safari, it does not crash,
> leading me to believe this is an issue with Phonegap/Cordova.
> On app crash, within Xcode I get within WebThread -
> WebCore::ThreadTImers::sharedTimerFiredInternal() an EXC_BAD_ACCESS (code=1)
> error
> Screenshot of crash state in Xcode
> -http://pictat.com/i/2013/1/28/24904screenshot.jpg
> Hopefully someone will have an idea as to what could be causing this, or
> recommend some tests for me to run etc because I'm really clueless on how to
> proceed with fixing this!
> Many Thanks,
> Ross
--
This message was sent by Atlassian JIRA
(v6.1#6144)