flutter_cached_network_image icon indicating copy to clipboard operation
flutter_cached_network_image copied to clipboard

database locked

Open yayxs opened this issue 6 years ago • 24 comments

Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a trasection

yayxs avatar Dec 07 '19 07:12 yayxs

Can you reproduce this?

renefloor avatar Feb 21 '20 13:02 renefloor

getting alot of this warning

I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction

i think it's happening when opening a page with alots of cached images

Saifallak avatar Mar 29 '20 12:03 Saifallak

I started to notice this as well when loading some cached images. I am not able to reproduce it constantly, but my app has like 10 cached images in the home page, and it seems to lock when some days have passed after opening my deployed app, so it may be something regarding the loading of old / invalid images from the cache.

davidmartos96 avatar Apr 03 '20 10:04 davidmartos96

getting alot of this warning

I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
I/flutter ( 9137): Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction

i think it's happening when opening a page with alots of cached images

same here.

image

zinwalin avatar Jun 13 '20 02:06 zinwalin

Are you also use a database for other parts of your app?

renefloor avatar Jun 14 '20 12:06 renefloor

Are you also use a database for other parts of your app?

It happens only in pages which used cached_network_image.

zinwalin avatar Jun 15 '20 01:06 zinwalin

Are you also use a database for other parts of your app?

It happens only in pages which used cached_network_image.

I understand, but that was not my question. I'm just trying to understand what is going wrong.

My question was if you use a database in other parts of your app. Do you use sqflite or anything similar that is also calling a database?

renefloor avatar Jun 15 '20 06:06 renefloor

Hello, I have the same problem, I'm not using any kind of database yet, only API requests.

hooshyar avatar Jun 17 '20 09:06 hooshyar

When I load for example 3-4 images, there isn't a problem, but when image count rises the error appears and screen locks, I can guess that writing more than 4-5 large files to the Database without using transactions, causes this.

hooshyar avatar Jun 17 '20 10:06 hooshyar

I have the same problem here,

06-19 02:50:20.815 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:20.922 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:20.930 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:21.020 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:21.048 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:21.237 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:21.582 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:21.610 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:22.081 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:22.082 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:22.082 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction
06-19 02:50:22.082 29857-30011/com.tcel.musicatl I/flutter: Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction

ariefwijaya avatar Jun 18 '20 20:06 ariefwijaya

Any solution for this ?? I'm also facing same issue.

I have 300+ images in ListView

imran-samed avatar Aug 12 '20 05:08 imran-samed

I have the same problem.

  • Listview with around 100 images I need to cache.
  • I am not using a local database anywhere else in this app (not knowingly).

Is there a workaround available?

jim-blip avatar Aug 15 '20 18:08 jim-blip

Having the same issue when loading cached map tiles using flutter_map. I'm using a local sqlite database for other parts of the app. It only seems to happen when loading several map layers at the same time. A few map layers loaded at the same time does not produce this problem. Any ideas?

Swepilot avatar Sep 23 '20 07:09 Swepilot

I have the same problem with 100 images

aBuder avatar Sep 30 '20 12:09 aBuder

I used database for other part of my app and have the same problem with images in list

mhorizon avatar Jan 06 '21 23:01 mhorizon

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

no-response[bot] avatar Apr 30 '21 10:04 no-response[bot]

@baseflow this should be reopened

Saifallak avatar Apr 30 '21 10:04 Saifallak

It would be great if anybody can give a reproducible example, because things that 'happen sometimes' are really hard to fix.

renefloor avatar Apr 30 '21 11:04 renefloor

any updates?

andynvt avatar Feb 19 '22 03:02 andynvt

I am also facing this issue. App getting stuck.

MrVipinVijayan avatar Jun 16 '22 05:06 MrVipinVijayan

Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction. app crashes

MrVipinVijayan avatar Jun 18 '22 04:06 MrVipinVijayan

Warning database has been locked for 0:00:10.000000. Make sure you always use the transaction object for database operations during a transaction

this Error crash my app i have simple code , 1000+ images listview

Nithinjovee avatar May 27 '23 09:05 Nithinjovee