I am using the latest tag named "tip" and I am using JIRA on demand.
I just incorporated JIRA mobile connect into my ios app and it is behaving a bit oddly i.e. it is going into an infinite loop and hangs my app. After turning the debug mode on and digging a bit deeper, I find the source of this problem is that the sqlite database table is locked.
The sequence of events is like follows:-
JMCIssueStore.m
calls updateWithData
method which has logic in it i.e.[self createSchema:YES]
which attempts to drop the existing 2 tables and recreate the schema.[db executeUpdate:@"DROP table if exists ISSUE"]
,
the database table is found to be locked and JMC goes in an infinite loop retrying to execute this statement.I am unable to find any answers for this on the Atlassian Q&A portal or otherwise on the web and I find it surprising as surely other people using this should be having the same issue or I have done something obviously wrong in trying to integrate it.
Has anyone encountered this or something similar? As this is one of the key features for which I am using JIRA Mobile Connect, i really need to figure out if it is worth debugging Jira mobile connect for this or just giving up and doing it from scratch.
The whole issue stemmed from a documentation error in the integration process of JIRA Mobile Connect specifically step 9 here where they asked to exclude all the JMC files from using ARC - which I had done. This is the root cause of the problem.
After going through the Angry Nerds Sample files and comparing it with my own, I realised they were exactly the same and still the Angry Nerds sample worked and mine didnt.
I retraced all my integration steps and on reaching step 9, it struck me that when I was going through the code, there were no sign of any manual release statements - which was odd if the code was indeed not using ARC.
I removed all my -fno-objc-arc
flags from all the JMC files. And hey presto! the crashing issue isnt there anymore.