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

SQLiteOpenHelper getWritableDatabase not working #841

Closed
tomipoc opened this issue May 11, 2017 · 3 comments
Closed

SQLiteOpenHelper getWritableDatabase not working #841

tomipoc opened this issue May 11, 2017 · 3 comments
Labels
contribution wanted Can you contribute to resolving this issue? Please join in!
Milestone

Comments

@tomipoc
Copy link

tomipoc commented May 11, 2017

I have another issue. I tried to create a new SQLiteOpenHelper class
class DatabaseHandler < android.database.sqlite.SQLiteOpenHelper
and I have added a function to recreate the database:

       def recreate
		db = getWritableDatabase
		db.execSQL('DROP TABLE IF EXISTS ' + TABLE_DICTIONARY)
		onCreate(db)
		db.close
	end

On this line the app gets stuck:
db = getWritableDatabase

I got these in the log:

20170508 085214.682000 D/SQLiteDatabase(17765): beginTransaction()
20170508 085215.562000 I/art     (17765): Background sticky concurrent mark sweep GC freed 111908(5MB) AllocSpace objects, 2(40KB) LOS objects, 0% free, 63MB/63MB, paused 88.595ms total 722.901ms
20170508 085216.196000 I/art     (17765): Background partial concurrent mark sweep GC freed 38352(2028KB) AllocSpace objects, 2(300KB) LOS objects, 19% free, 64MB/80MB, paused 91.752ms total 631.484ms
20170508 085216.198000 D/OpenGLRenderer(17765): Flushing caches (mode 0)
20170508 085216.198000 D/OpenGLRenderer(17765): Flushing caches (mode 0)
20170508 085216.201000 D/OpenGLRenderer(17765): Flushing caches (mode 0)
20170508 085217.936000 I/art     (17765): Background sticky concurrent mark sweep GC freed 34018(2008KB) AllocSpace objects, 3(552KB) LOS objects, 0% free, 85MB/85MB, paused 88.699ms total 621.152ms
20170508 085218.642000 I/art     (17765): Background partial concurrent mark sweep GC freed 492712(22MB) AllocSpace objects, 1(184KB) LOS objects, 19% free, 65MB/81MB, paused 98.698ms total 703.059ms
20170508 085219.653000 I/art     (17765): Rejecting re-init on previously-failed class java.lang.Class<org.jruby.util.JavaNameMangler>
20170508 085220.577000 I/art     (17765): Background sticky concurrent mark sweep GC freed 36882(1748KB) AllocSpace objects, 1(184KB) LOS objects, 0% free, 86MB/86MB, paused 101.472ms total 667.596ms
20170508 085221.392000 I/art     (17765): Background partial concurrent mark sweep GC freed 392655(17MB) AllocSpace objects, 2(368KB) LOS objects, 18% free, 70MB/86MB, paused 122.975ms total 818.327ms
20170508 085222.354000 I/art     (17765): Rejecting re-init on previously-failed class java.lang.Class<org.jruby.util.JavaNameMangler>

Could you please help me to find out what can cause the problem?

@donv donv added this to the 1.6.2 milestone May 15, 2017
@donv donv added the contribution wanted Can you contribute to resolving this issue? Please join in! label May 15, 2017
@donv
Copy link
Member

donv commented May 15, 2017

Not sure what causes this. I am swamped with other projects right now. Hopefully someone else can take a look and help you. If you create a GitHub project with an example app that fails, it should be easy for others to try it and see what is wrong.

@tomipoc
Copy link
Author

tomipoc commented May 26, 2017

Thanks! I will upload a project to my github and share it here.

@donv
Copy link
Member

donv commented May 8, 2023

Closing this issue since it relates to Ruboto 1.x. Ruboto 2 now uses Android Studio with a much simpler setup. A guide to getting started is in the README.

@donv donv closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution wanted Can you contribute to resolving this issue? Please join in!
Projects
None yet
Development

No branches or pull requests

2 participants