files hangs on hover over huge thumbnails

Bug #1422857 reported by SuperScript
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Files
Fix Released
High
Jeremy Wootten

Bug Description

I have on my computer a few huge (22.3 MB) .JP2 files. Each time I mouse-over (highlight) the icons of these files, Pantheon Files hangs while it's memory usage climbs by about 100MB (per time). This memory is not deallocated afterward.

Eventually, it either hangs my computer forcing me to kill it from TTY1, or crashes with a SEGFAULT, or I kill it with System Monitor.

Related branches

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

This is presumably related to the Overlay bar? In which case it should not happen in List view, where the Overlay is not displayed.

Changed in pantheon-files:
importance: Undecided → High
Revision history for this message
SuperScript (superscript18) wrote :

The crash still occurs in list view.

My guess is that the code that brightens an icon on hover is working with the full file data instead of the 48x48 icon, loading the entire .JP2 file's pixel data into the RAM.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

OK, thanks. I'll need to create some large JP2 files and try to reproduce this bug. I assume it does not happen with ordinary jpg or other image files? Looking at the code, it appear the OverLay bar still updates in list view - it just isnt shown. So it could still be the OverLay as this attempts to determine image properties like resolution for image files.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

I can confirm that Files UI blocks when hovering over 18.8 MB .JP2 file (in Icon View) for several seconds and the cpu usage climbs to 100% for one core. The memory usage temporarily increases by about 400 MB during this time but drops back to about 40 MB more each time.

Changed in pantheon-files:
assignee: nobody → Jeremy Wootten (jeremywootten)
status: New → In Progress
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

As far as I have been able to ascertain, this being caused by the Gdk.PixbufLoader that is used to determine the image dimensions. It requires the whole of the JP2 file being loaded in before it can determine the dimensions (which is slow and also blocks the UI) and then leaks memory when closed.

Until a better solution is found I will add JP2 files to the list of image types that are skipped by the OverlayBar as far as determining the resolution is concerned.

PropertiesWindow also blocks for several seconds when used on large JP2 files although it uses a different method to determine the image dimensions, but at least it does not leak memory.

Cody Garver (codygarver)
Changed in pantheon-files:
milestone: none → loki-alpha1
status: In Progress → Fix Committed
Changed in pantheon-files:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.