! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
UCA crash when icon is not found
Status:
CLOSED: FIXED

Comments

Description Nick Schermer editbugs 2006-02-14 08:17:58 CET
UCA (and Thunar) seems to crash then you set an icon, remove the directory and
then try to edit the action again.

Reproducible: Always
Steps to Reproduce:
1. Create new UCA action
2. Close Thunar
3. Remove icon and directory
4. Start Thunar (warning in console: "icon not found")
5. Goto UCA editor
6. Try to edit the action

Actual Results:  
Thunar will crash

Expected Results:  
Show the "not found" icon and do not crash.
Comment 1 Benedikt Meurer editbugs 2006-02-14 12:10:18 CET
Any error message/backtrace?
Comment 2 Nick Schermer editbugs 2006-02-14 12:12:28 CET
No errors to the terminal, but i'll post a more detailed bug tonight including bt.
Comment 3 Nick Schermer editbugs 2006-02-14 19:27:22 CET
Okay I've got some more information about this bug.

When the icon does not exist anymore and you right click the window (with an
action for directories) the following message is shown:

Gtk-WARNING **: Error loading icon: Failed to open file
'/root/Dummy/Dummy/Dummy/terminal.png': No such file or directory

This warning is harmless and the fallback icon is shown.
----------------------------------------------------------------------------
Next step is editing the action, the dialog shows up fine, with the fallback
icon in the "actions list". But when you select the action and push the edit
button, Thunar dies with a seg. fault:

Backtrace:
#0  0xb7ab0a56 in gdk_pixbuf_get_width () from /usr/lib/libgdk_pixbuf-2.0.so.0
#1  0xb6addd15 in ?? () from /opt/xfce4/lib/thunarx-1/thunar-uca.so

(This is line 729 from thunar-uca-editor.c) The get_height function crashes
because gdk_pixbuf_new_from_file returns NULL.
You can easally solve this by moving the icons re-size function. You can find
this in the attached patch. (Hopefully this will save you some time ^_~)

Greets, Nick
Comment 4 Nick Schermer editbugs 2006-02-14 19:41:56 CET
Created attachment 446 
Move icon resize function
Comment 5 Benedikt Meurer editbugs 2006-02-15 00:07:05 CET
Committed with revision 19882, thanks.

2006-02-15	Benedikt Meurer <benny@xfce.org>

	* THANKS, thunar-uca/thunar-uca-editor.c: Apply patch provided by
	  Nick Schermer <nickschermer@gmail.com> to fix a crash in the
	  thunar-uca plugin if the icon specified for an action cannot
	  be loaded. Bug #1458.


Bug #1458

Reported by:
Nick Schermer
Reported on: 2006-02-14
Last modified on: 2010-12-23

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Version:
unspecified

Attachments

Move icon resize function (1.34 KB, patch)
2006-02-14 19:41 CET , Nick Schermer
no flags

Additional information