question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AsyncImage caching delete of images crashes app

See original GitHub issue

Versions

  • Python: 3.7.1
  • OS: Mac OS Mojave
  • Kivy: 1.10.1
  • Kivy installation method: pip

Description

I am running the app locally, doing nothing more than simply opening the page where a ‘close.png’ image is used. It is placed in about 20 boxlayouts within a gridview. Then just sit and wait and get the error below.

Code and Logs

[INFO   ] [Base        ] Leaving application in progress...
 Traceback (most recent call last):
   File "/user/home/demo/main.py", line 287, in <module>
     MainApp().run()
   File "/user/home/anaconda/envs/kivyenv/lib/python3.7/site-packages/kivy/app.py", line 826, in run
     runTouchApp()
   File "/user/home/anaconda/envs/kivyenv/lib/python3.7/site-packages/kivy/base.py", line 502, in runTouchApp
     EventLoop.window.mainloop()
   File "/user/home/anaconda/envs/kivyenv/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 727, in mainloop
     self._mainloop()
   File "/user/home/anaconda/envs/kivyenv/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 460, in _mainloop
     EventLoop.idle()
   File "/user/home/anaconda/envs/kivyenv/lib/python3.7/site-packages/kivy/base.py", line 337, in idle
     Clock.tick()
   File "/user/home/anaconda/envs/kivyenv/lib/python3.7/site-packages/kivy/clock.py", line 581, in tick
     self._process_events()
   File "kivy/_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
   File "kivy/_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
   File "kivy/_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
   File "kivy/_clock.pyx", line 167, in kivy._clock.ClockEvent.tick
   File "/user/home/anaconda/envs/kivyenv/lib/python3.7/site-packages/kivy/cache.py", line 212, in _purge_by_timeout
     lastaccess = Cache._objects[category][key]['lastaccess']
 KeyError: '<replace_path_to>/image_assets/close.png'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
OutsourcedGurucommented, Mar 18, 2020

I’m going to demote my earlier suggestion to just:

<AsyncImage>:
    nocache: True

I’m not seeing this for standard Image objects, just AsyncImage.

The problem—when seen—varies in impact from just a WARNING in the log to an unresponsive interface to a cycling interface (as driven by nodm).

0reactions
no-response[bot]commented, Jun 14, 2020

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 the means to take action. Please reach out if you have or find the answers we need so that we can investigate further.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AsyncImage - Cancelled Loading bef… - Apple Developer
List cells that show up when the app loads have images loaded fine, but as soon as I start scrolling any cells below...
Read more >
iOS - SDWebImage Crashes deleting all the images in cache
I was using sdwebimage for caching images for my Facebook feed like view . But now I get a lot of crashes randomly...
Read more >
Save and cache images in a SwiftUI app - YouTube
In this video we will implement a simple NSCache to temporarily save an image. Caching is a very common technique used in all...
Read more >
Download, Save and Expire images using FileManager and ...
... Rebuilding AsyncImage With Caching, Cache Image . ... using Swift Concurrency Async Await and cache it in our SwiftUI app using NSCache....
Read more >
Asynchronous image downloader and cacher in Swift
A Swift implementation for downloading and caching network images. A source code for image download and caching on iOS and Swift.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found