Comments (5)
Original comment by [email protected]
on 27 May 2010 at 2:55
- Changed state: Started
from omnidroid.
Start to take a look at this issue.
Original comment by [email protected]
on 16 Jun 2010 at 3:55
from omnidroid.
Code review at:
http://codereview.appspot.com/1717045
Caused by:
Exception is caused by database cursor objects being left open even when not in
use. Excerpt from the logs:
06-16 16:36:27.458: INFO/dalvikvm(234): Uncaught exception thrown by finalizer
(will be discarded):
06-16 16:36:27.458: INFO/dalvikvm(234): Ljava/lang/IllegalStateException;:
Finalizing cursor android.database.sqlite.SQLiteCursor@43818050 on
RegisteredApps that has not been deactivated or closed
06-16 16:36:27.458: INFO/dalvikvm(234): at
android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
06-16 16:36:27.458: INFO/dalvikvm(234): at
dalvik.system.NativeStart.run(Native Method)
Another similar problem is found where the database object itself is left open
even when not in use. Excerpt from the logs:
06-16 16:14:21.893: ERROR/Database(233): Leak found
06-16 16:14:21.893: ERROR/Database(233): java.lang.IllegalStateException:
/data/data/edu.nyu.cs.omnidroid.app/databases/omnidroid SQLiteDatabase created
and never closed
06-16 16:14:21.893: ERROR/Database(233): at
android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1581)
06-16 16:14:21.893: ERROR/Database(233): at
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:638)
06-16 16:14:21.893: ERROR/Database(233): at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
659)
06-16 16:14:21.893: ERROR/Database(233): at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
652)
06-16 16:14:21.893: ERROR/Database(233): at
android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:482)
06-16 16:14:21.893: ERROR/Database(233): at
android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:193)
06-16 16:14:21.893: ERROR/Database(233): at
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.ja
va:98)
06-16 16:14:21.893: ERROR/Database(233): at
edu.nyu.cs.omnidroid.app.model.CoreRuleDbHelper.<init>(CoreRuleDbHelper.java:65)
06-16 16:14:21.893: ERROR/Database(233): at
edu.nyu.cs.omnidroid.app.controller.HandlerService.onStart(HandlerService.java:5
8)
06-16 16:14:21.893: ERROR/Database(233): at
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2776)
06-16 16:14:21.893: ERROR/Database(233): at
android.app.ActivityThread.access$3400(ActivityThread.java:116)
06-16 16:14:21.893: ERROR/Database(233): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1855)
06-16 16:14:21.893: ERROR/Database(233): at
android.os.Handler.dispatchMessage(Handler.java:99)
06-16 16:14:21.893: ERROR/Database(233): at
android.os.Looper.loop(Looper.java:123)
06-16 16:14:21.893: ERROR/Database(233): at
android.app.ActivityThread.main(ActivityThread.java:4203)
06-16 16:14:21.893: ERROR/Database(233): at
java.lang.reflect.Method.invokeNative(Native Method)
06-16 16:14:21.893: ERROR/Database(233): at
java.lang.reflect.Method.invoke(Method.java:521)
06-16 16:14:21.893: ERROR/Database(233): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
06-16 16:14:21.893: ERROR/Database(233): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
06-16 16:14:21.893: ERROR/Database(233): at
dalvik.system.NativeStart.main(Native Method)
Summary of changes:
Made sure that database cursor objects are closed when they are not needed
after acquiring them. Same thing also applies to database objects.
Test Cases (must check the logs that no exception occurs while performing
these):
1. Go all types of screens while creating a new rule - root event, add action,
add filter.
2. With Omnidroid active, go to home and open another application. Go back to
home and re-open Omnidroid.
3. Open Omnidroid and proceed to any screen as deep as possible. Keep on
pressing back until you reach the home screen and reopen Omnidroid again.
Original comment by [email protected]
on 18 Jun 2010 at 2:29
from omnidroid.
Forgot to add one more test case:
4. Trigger a saved rule.
Original comment by [email protected]
on 19 Jun 2010 at 2:06
from omnidroid.
Checked-in on r757.
Original comment by [email protected]
on 19 Jun 2010 at 3:09
- Changed state: Fixed
from omnidroid.
Related Issues (20)
- Event Handler Limit Crash HOT 1
- Events not executing until lock/unlock performed HOT 12
- no market access HOT 2
- Adopt Guice
- Filter, between pre-midnight and post-midnight HOT 1
- contact groups/aliases for recipient/blacklists HOT 3
- decide whether to perform actions smartly
- An action to Enable/disable actions HOT 1
- Crash when using "Time is day of week" filter HOT 2
- Sensor data not fully utilized in some cases HOT 6
- Enhancement: Disable Data traffic on low battery HOT 2
- Trigger on Wi-Fi SSID HOT 1
- Performance improvement suggestion
- Slow operation in UI thread HOT 1
- Add phone filter : in contact / not in contact
- Enhancement request: action on enter/leave WiFi or mobile base station HOT 1
- Unlock attempt event
- Phone shut down action
- Feature request: event on wifi network available / unavailable
- wrong orders of longitude and latitude when constructing a new OmniArea object in the LocationMonitor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omnidroid.