Opened 20 months ago
Last modified 20 months ago
#3501 new bug
GdkPixbuf crash with .ico tracker icons on Windows
Reported by: | Doadin | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 2.0.6 |
Component: | GTK UI | Version: | develop |
Keywords: | Cc: |
Description (last modified by Cas)
PS E:\Program Files\Deluge> .\deluge-debug -L debug -l E:\Documents\deluge.log deluge\ui\gtk3\common.py:83: Warning: cannot register existing type 'GdkPixbufGdipAnim' return Pixbuf.new_from_file_at_size(filename, size, size) deluge\ui\gtk3\common.py:83: Warning: g_once_init_leave: assertion 'result != 0' failed return Pixbuf.new_from_file_at_size(filename, size, size) deluge\ui\gtk3\common.py:83: Warning: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed return Pixbuf.new_from_file_at_size(filename, size, size)
Change History (17)
comment:1 Changed 20 months ago by Doadin
- Component changed from Unknown to GTK UI
- Priority changed from minor to blocker
- Version changed from 2.0.0 to develop
comment:2 Changed 20 months ago by Doadin
comment:3 Changed 20 months ago by Cas
This could be an issue that was mentioned by mhertz, I think I saw a patch he created for his build
comment:4 Changed 20 months ago by Cas
- Milestone changed from needs verified to 2.0.6
comment:5 Changed 20 months ago by Cas
- Description modified (diff)
comment:6 Changed 20 months ago by Doadin
comment:7 Changed 20 months ago by Doadin
From what I have been able to gather so far it is a specific icon not the amount of icons. I tried adding several more trackers to get more icons loading and it was fine however if I have a torrent with only dler.com tracker deluge crashes.
comment:8 Changed 20 months ago by Doadin
I think its pretty confirmed as I can add more trackers and they load but if I add or remove that one tracker it crashes. And if I set that function to print the file its loading every time before the crash its always that ico.
comment:9 Changed 20 months ago by Cas
That's the one.
Is the package missing the optional dependency pillow that is used for resizing tracker icons. Could that fix this?
comment:10 Changed 20 months ago by Doadin
if filename == "C:\\Users\\bob\\AppData\\Roaming\\deluge\\icons\\dler.org.ico": return create_blank_pixbuf(size) else: return Pixbuf.new_from_file_at_size(filename, size, size)
Stops the crash
comment:11 Changed 20 months ago by Doadin
I get this even running from python which has pillow installed.
comment:12 Changed 20 months ago by Cas
We need to be able to replicate. Can you upload the copy of the icon stored locally? Also what is the tracker URL you are using?
comment:13 Changed 20 months ago by Cas
Finally replicated on Windows and it's not quite as obvious as it seems. I shall report my findings for now and then we can consider reporting upstream (gvsbuild and/or gdk-pixbuf) and determining best fix.
The problem can be replicated in a simple Python repl by switching types loaded, specifically gif or ico types on Windows:
Install Python and extract gvsbuild release to C:\Program Files\Gtk
set PATH=C:\Program Files\Gtk;C:\Program Files\Gtk\bin;C:\Program Files\Gtk\lib;%PATH% python.exe
from gi.repository.GdkPixbuf import Pixbuf Pixbuf.new_from_file("any.gif") Pixbuf.new_from_file("any.ico") <stdin>:1: Warning: cannot register existing type 'GdkPixbufGdipAnim' <stdin>:1: Warning: g_once_init_leave: assertion 'result != 0' failed <stdin>:1: Warning: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
So what happens with Deluge is that a png favicon is loaded followed by an ico favicon (or vice versa) resulting in a crash. I found this snippet of information in this old Inkscape bug: https://bugs.launchpad.net/inkscape/+bug/1467103
As we have found png (and jpeg) are unaffected and a likely is related to gvsbuild using native_windows_loaders=true which disables gdk-pixbuf loaders for gif,ico & bmp
To workaround this crashing on Windows we can disable loading gif,ico & bmp or convert all ico, gif and bmp to png, not ideal either way... Otherwise we need to find a gdk-pixbuf build option that gvsbuild can use.
comment:14 Changed 20 months ago by Doadin
It seems there are several open bug reports for ico files and the general census seems to be they don't have anyone who knows ico well to fix the issues, probably easiest for us to just ignore ico tracker icons, imo don't care about the icons anyways so if some don't load w.e. Id rather have a blank then waste resources converting.
comment:15 Changed 20 months ago by Cas
Reported to gvsbuild: https://github.com/wingtk/gvsbuild/issues/489
This is not specific to the image file content it is a problem with the loaders on Windows.
comment:16 Changed 20 months ago by Cas
- Summary changed from Deluge Crash GTK to GdkPixbuf crash with .ico tracker icons on Windows
comment:17 Changed 20 months ago by Cas
Workaround applied [90744dc2e]
Seems to be an issue with a tracker image specifically this one http://dler.com/favicon.ico