crash opening photo
Submitted by Adam Dingle
Assigned to cli..@..ba.org
Link to original bug (#718895)
Description
---- Reported by adam@yorba.org 2012-08-02 01:50:00 -0700 ----
Original Redmine bug id: 5612
Original URL: http://redmine.yorba.org/issues/5612
Searchable id: yorba-bug-5612
Original author: Adam Dingle
Original description:
I'm seeing this on Ubuntu Quantal:
-
Start Shotwell.
-
Double click a photo.
-
Shotwell crashes:
#0 g_logv (log_domain=0x7ffff445754e "GLib", log_level=G_LOG_LEVEL_ERROR, format=0x7ffff44606a0 "%s: failed to allocate %lu bytes", args1=args1@entry=0x7fffd5cc5428) at /build/buildd/glib2.0-2.33.6/./glib/gmessages.c:765 #1 (moved) 0x00007ffff441efc2 in g_log ( log_domain=log_domain@entry=0x7ffff445754e "GLib", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7ffff44606a0 "%s: failed to allocate %lu bytes") at /build/buildd/glib2.0-2.33.6/./glib/gmessages.c:792 #2 (closed) 0x00007ffff441d8b4 in g_malloc (n_bytes=5143184384) at /build/buildd/glib2.0-2.33.6/./glib/gmem.c:164 #3 0x00007ffff53cd520 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 #4 (closed) 0x00007ffff53ce47f in ?? () from /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 #5 0x00007ffff53c5f01 in gdk_pixbuf_scale () from /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 #6 (closed) 0x00007ffff53c664e in gdk_pixbuf_scale_simple () from /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 #7 (closed) 0x00000000005ea29f in photo_get_pixbuf_with_options (self=
<optimized out>
, scaling=<optimized out>
, exceptions=PHOTO_EXCEPTION_NONE, fetch_mode=<optimized out>
, error=0x7fffd5cc5b18) at /home/adam/shotwell/src/Photo.vala:3224 #8 (closed) 0x00000000005ea389 in photo_real_get_pixbuf (base=0xd03180, scaling=0x7fffd5cc5b50, error=0x7fffd5cc5b68) at /home/adam/shotwell/src/Photo.vala:3012 #9 (closed) 0x0000000000635a06 in pixbuf_cache_baseline_fetch_job_real_execute ( base=<optimized out>
) at /home/adam/shotwell/src/PixbufCache.vala:50 #10 (closed) 0x000000000047d968 in workers_thread_start (self=0x18d5700, ignored=<optimized out>
) at /home/adam/shotwell/src/threads/Workers.vala:94 #11 (closed) _workers_thread_start_gfunc (data=<optimized out>
, self=0x18d5700) at /home/adam/shotwell/src/threads/Workers.vala:31 #12 (closed) 0x00007ffff443b5b2 in g_thread_pool_thread_proxy (data=<optimized out>
) at /build/buildd/glib2.0-2.33.6/./glib/gthreadpool.c:309 #13 0x00007ffff443adb5 in g_thread_proxy (data=0x182c280) at /build/buildd/glib2.0-2.33.6/./glib/gthread.c:801 #14 0x00007ffff3fabe9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #15 (closed) 0x00007ffff3cd94bd in clone () from /lib/x86_64-linux-gnu/libc.so.6 #16 0x0000000000000000 in ?? ()
---- Additional Comments From shotwell-maint@gnome.bugs 2013-05-01 11:38:00 -0700 ----
History
Comment 1
Updated by Valentín Barros over 1 year ago
- File #5260-test-photos.tar.gz added
Hi,
I attach 3 images —with the original one and the 50% scaled I'm getting the crash, but with the 25% I'm getting some more strange behavior: The image is shown in with a really low resolution, something like 50x50...
There is my procedure to obtain a backtrace of the crash using the original file:
valentin@valentin-ubuntu:~/Escritorio/shotwell-gsoc$ gdb ./shotwell
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/valentin/Escritorio/shotwell-gsoc/shotwell...done.
(gdb) run
Starting program: /home/valentin/Escritorio/shotwell-gsoc/shotwell
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb642fb40 (LWP 22666)]
[New Thread 0xb5affb40 (LWP 22667)]
[New Thread 0xaca53b40 (LWP 22668)]
[New Thread 0xac20eb40 (LWP 22669)]
[New Thread 0xab01eb40 (LWP 22670)]
[New Thread 0xaa81db40 (LWP 22671)]
[New Thread 0xaa01cb40 (LWP 22672)]
[Thread 0xaa81db40 (LWP 22671) exited]
[Thread 0xac20eb40 (LWP 22669) exited]
[Thread 0xaa01cb40 (LWP 22672) exited]
-- Here I double click an image --
[Thread 0xab01eb40 (LWP 22670) exited]
[New Thread 0xab01eb40 (LWP 22677)]
(shotwell:22663): GLib-ERROR **: /build/buildd/glib2.0-2.32.3/./glib/gmem.c:358: overflow allocating 1535438080*4 bytes
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0xab01eb40 (LWP 22677)]
g_logv (log_domain=0xb738110e "GLib", log_level=`<optimized out>`,
format=0xb73892e4 "%s: overflow allocating %u*%u bytes",
args1=0xab01db3c "\264\222\070\267")
at /build/buildd/glib2.0-2.32.3/./glib/gmessages.c:765
765 /build/buildd/glib2.0-2.32.3/./glib/gmessages.c: No such file or directory.
(gdb)
And the backtrace:
#0 g_logv (log_domain=0xb738110e "GLib", log_level=`<optimized out>`,
format=0xb73892e4 "%s: overflow allocating %u*%u bytes",
args1=0xab01db3c "\264\222\070\267")
at /build/buildd/glib2.0-2.32.3/./glib/gmessages.c:765
#1 0xb7345823 in g_log (log_domain=0xb738110e "GLib",
log_level=G_LOG_LEVEL_ERROR,
format=0xb73892e4 "%s: overflow allocating %u*%u bytes")
at /build/buildd/glib2.0-2.32.3/./glib/gmessages.c:792
#2 0xb73440e1 in g_malloc_n (n_blocks=1535438080, n_block_bytes=4)
at /build/buildd/glib2.0-2.32.3/./glib/gmem.c:357
#3 0xb76c3d39 in ?? () from /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0
#4 0xb76c4a60 in ?? () from /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0
#5 0xb76bb252 in gdk_pixbuf_scale ()
from /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0
#6 0xb76bb92f in gdk_pixbuf_scale_simple ()
from /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0
#7 0x08253e8e in photo_get_pixbuf_with_options (self=0x8672310,
scaling=0xab01e018, exceptions=PHOTO_EXCEPTION_NONE,
fetch_mode=BACKING_FETCH_MODE_BASELINE, error=0xab01e02c)
at /home/valentin/Escritorio/shotwell-gsoc/src/Photo.vala:3224
#8 0x08253f8f in photo_real_get_pixbuf (base=0x8672310, scaling=0xab01e098,
error=0xab01e0ac)
at /home/valentin/Escritorio/shotwell-gsoc/src/Photo.vala:3012
---Type `<return>` to continue, or q `<return>` to quit---
#9 0x08173301 in photo_source_get_pixbuf (self=0x8672310, scaling=0xab01e098,
error=0xab01e0ac)
at /home/valentin/Escritorio/shotwell-gsoc/src/core/DataSourceTypes.vala:60
#10 0x082a91df in pixbuf_cache_baseline_fetch_job_real_execute (base=0x89fb820)
at /home/valentin/Escritorio/shotwell-gsoc/src/PixbufCache.vala:50
#11 0x080b641e in background_job_execute (self=0x89fb820)
at /home/valentin/Escritorio/shotwell-gsoc/src/threads/BackgroundJob.vala:123
#12 0x080b4060 in workers_thread_start (self=0x8b1f770,
ignored=`<optimized out>`)
at /home/valentin/Escritorio/shotwell-gsoc/src/threads/Workers.vala:94
#13 _workers_thread_start_gfunc (data=0x89fb820, self=0x8b1f770)
at /home/valentin/Escritorio/shotwell-gsoc/src/threads/Workers.vala:31
#14 0xb7362047 in g_thread_pool_thread_proxy (data=0x8b20b38)
at /build/buildd/glib2.0-2.32.3/./glib/gthreadpool.c:309
#15 0xb73616b3 in g_thread_proxy (data=0x8b06830)
at /build/buildd/glib2.0-2.32.3/./glib/gthread.c:801
#16 0xb72d1d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#17 0xb7210ace in clone () from /lib/i386-linux-gnu/libc.so.6
Comment 2
Updated by Clinton Rogers over 1 year ago
I remember seeing something like this several weeks ago while working on #5260; because we no longer turn the crank on the main window ourselves, it was occasionally possible to get the app into a state where the window's resources had been allocated, but it wasn't realized, IIRC, leading to the PhotoPage's drawable area reporting itself as having incorrect dimensions the first time we tried to get them. #5260's patch should have fixed this, but there may be some case that is not being caught...
Comment 3
Updated by Valentín Barros over 1 year ago
- File #5612-screenshot.png added
Hello again,
I attach a screenshot showing what I mean by "but with the 25% I'm getting some more strange behavior: The image is shown in with a really low resolution, something like 50x50..." in my previous message.
The program is actually working "normal" with that 25% scaled image I've attached, but the thing I show in this screenshot appears a few seconds —previously I've noticed this thing but only by, lets say, 0.1 second, which I thing is the normal behavior.
Comment 4
Updated by Clinton Rogers over 1 year ago
- File 5612.patch added
- Category set to 4
- Status changed from Open to Review
- % Done changed from 0 to 80
Proposed patch attached and submitted via email.
The problem seems to be that, since we've migrated to GtkApplication and let it take care of window creation and such, the main window and its attendant widgets get realized lazily, and, as such, it was possible to get the app into a state where it needed to know the size of the canvas before the canvas had been given a proper size in order to determine how the image should be scaled (via calls to Scaling.for_widget() and friends).
If this happens, the attached patch will detect it, and use Scaling.for_original() instead, as a safe fallback.
Comment 5
Updated by Clinton Rogers over 1 year ago
- Status changed from Review to 5
- % Done changed from 80 to 100
- Resolution set to fixed
Comment 6
Updated by Anonymous about 1 year ago
- Subject changed from crash opening photo to _Gluten Partiality Is Weep Exclusively fastidious On the level Allergy _
- Description updated (diff)
- Assignee changed from Clinton Rogers to Charles Lindsay
- Target version changed from 0.13 to 33
- % Done changed from 100 to 0
- Resolution changed from fixed to wontfix
Comment 7
Updated by Charles Lindsay about 1 year ago
- Subject changed from _Gluten Partiality Is Weep Exclusively fastidious On the level Allergy _ to crash opening photo
- Description updated (diff)
- Assignee changed from Charles Lindsay to Clinton Rogers
- Target version changed from 33 to 0.13
- % Done changed from 0 to 100
- Resolution changed from wontfix to fixed
(Remove spam.)
Comment 8
Updated by Charles Lindsay 7 months ago
- Status changed from 5 to Fixed
--- Bug imported by chaz@yorba.org 2013-11-25 21:58 UTC ---
This bug was previously known as bug 5612 at http://redmine.yorba.org/show_bug.cgi?id=5612 Imported an attachment (id=262590) Imported an attachment (id=262591) Imported an attachment (id=262592)
Unknown Component Using default product and component set in Parameters Unknown milestone "unknown in product shotwell. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
Version: 0.13
Resolution: RESOLVED FIXED