Comments (1)
java.lang.IllegalStateException: Cannot access database on the main thread since it may potentially lock the UI for a long period of time.
at androidx.room.RoomDatabase.assertNotMainThread(RoomDatabase.java:261)
at androidx.room.RoomDatabase.beginTransaction(RoomDatabase.java:327)
at com.codebutler.farebot.persist.db.dao.SavedCardDao_Impl.delete(SavedCardDao_Impl.java:93)
at com.codebutler.farebot.persist.db.DbCardPersister.deleteCard(DbCardPersister.kt:10)
at com.codebutler.farebot.app.feature.history.HistoryScreen.onDeleteSelectedItems(HistoryScreen.kt:170)
at com.codebutler.farebot.app.feature.history.HistoryScreenView$onAttachedToWindow$1$1.onActionItemClicked(HistoryScreenView.kt:80)
at androidx.appcompat.app.AppCompatDelegateImpl$ActionModeCallbackWrapperV9.onActionItemClicked(AppCompatDelegateImpl.java:2171)
at androidx.appcompat.view.StandaloneActionMode.onMenuItemSelected(StandaloneActionMode.java:141)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:981)
at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
at android.view.View.performClick(View.java:7455)
at android.view.View.performClickInternal(View.java:7432)
at android.view.View.access$3700(View.java:835)
at android.view.View$PerformClick.run(View.java:28810)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
It looks like the for ((savedCard in items)
in HistoryScreen.onDeleteSelectedItems should be moved to a background thread and post back to the UI thread to loadCards()
afterward?
from farebot.
Related Issues (20)
- Unable to copy serial numbers or other data fields
- Trimet hop fastpass HOT 4
- "Attempt to invoke virtual method 'short android.os.Bundle.getShort(java.lang.String)' on a null object reference" HOT 3
- CEPAS 2.0 card 'Invalid Response' HOT 8
- Support For Touch n Go cards (Malaysia) HOT 1
- Null reference error reading PASMO HOT 5
- Add support for URBS bus cards (Curitiba, BR) HOT 3
- Add support for Ventra tickets (Chicago, IL) HOT 7
- Not working Pixel 2 XL HOT 5
- App crashes when it gets tapped by Nfc A cards
- CEPAS EZ-Link newer cards and Pixel HOT 2
- Unique constraint crash after reading Clipper card HOT 1
- Adding keys crashes app HOT 1
- iOS 13 Support? HOT 9
- Exception when reading Suica card HOT 1
- ClipperRefill: 0x1de
- Clipper card always displays $13.65
- User Suggestion: DO NOT Vibrate on Card Detection
- fail to read CEPAS, but reads with SignCard app
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 farebot.