Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS threading issue with openDatabase? #716

Closed
craig-at-rsg opened this issue Sep 5, 2017 · 7 comments
Closed

iOS threading issue with openDatabase? #716

craig-at-rsg opened this issue Sep 5, 2017 · 7 comments

Comments

@craig-at-rsg
Copy link
Contributor

I have intermittent crashes when my app starts up on iOS, and my guess is it's related to calling openDatabase from different places. I need to restart my app multiple times before I hit this. Here's a screenshot - if this doesn't point to the cause, let me know and I'll try creating a test app.

screen shot 2017-09-05 at 4 37 38 pm

@craig-at-rsg
Copy link
Contributor Author

openDBs is an NSMutableDictionary, which isn't designed for thread safety...

@craig-at-rsg
Copy link
Contributor Author

I used a thread safe dictionary (https://gist.github.com/steipete/5928916) in my local build for openDBs, and that fixed the problem I was seeing. I tried to branch this plugin, but I haven't gotten that working yet..

@brodycj
Copy link
Contributor

brodycj commented Sep 6, 2017 via email

@craig-at-rsg
Copy link
Contributor Author

@brodycj
Copy link
Contributor

brodycj commented Oct 30, 2017

Marking this as a bug, with possible data loss risk. Will integrate the proposed workaround / solution in the near future.

brodycj pushed a commit to brodycj/Cordova-sqlite-storage-common-dev that referenced this issue Nov 2, 2017
brodycj pushed a commit to brodycj/Cordova-sqlite-storage-common-dev that referenced this issue Nov 2, 2017
…onary

(iOS/macOS) with minor changes by @brodybits:
- import PSPDFThreadSafeMutableDictionary in SQLitePlugin.m instead of SQLitePlugin.h
- update SQLitePlugin.m & plugin.xml in single commit
- update plugin version
- update docs

ref: storesafe#716
@brodycj
Copy link
Contributor

brodycj commented Nov 6, 2017

Proposed workaround solution and flag fix for #703 are now integrated with cordova-sqlite-ext, will be integrated with this version in the near future.

@brodycj
Copy link
Contributor

brodycj commented Nov 8, 2017

Proposed workaround solution is now integrated with this plugin version (cordova-sqlite-storage), will be merged into the other plugin versions in the near future. Thanks again for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants