Opened 3 years ago
Last modified 3 years 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 )
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 by , 3 years ago
Component: | Unknown → GTK UI |
---|---|
Priority: | minor → blocker |
Version: | 2.0.0 → develop |
comment:2 by , 3 years ago
comment:3 by , 3 years ago
This could be an issue that was mentioned by mhertz, I think I saw a patch he created for his build
comment:4 by , 3 years ago
Milestone: | needs verified → 2.0.6 |
---|
comment:5 by , 3 years ago
Description: | modified (diff) |
---|
comment:6 by , 3 years ago
comment:7 by , 3 years ago
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 by , 3 years ago
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 by , 3 years ago
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 by , 3 years ago
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:12 by , 3 years ago
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 by , 3 years ago
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 by , 3 years ago
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 by , 3 years ago
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 by , 3 years ago
Summary: | Deluge Crash GTK → GdkPixbuf crash with .ico tracker icons on Windows |
---|
Seems to be an issue with a tracker image specifically this one http://dler.com/favicon.ico