GNU bug report logs - #26593
[PATCH] gnu: icecat: Fix GTK 3 file chooser crash.

Previous Next

Package: guix-patches;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Fri, 21 Apr 2017 17:57:01 UTC

Severity: normal

Tags: fixed, patch

Done: clement <at> lassieur.org (Clément Lassieur)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26593 in the body.
You can then email your comments to 26593 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26593; Package guix-patches. (Fri, 21 Apr 2017 17:57:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clément Lassieur <clement <at> lassieur.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 21 Apr 2017 17:57:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: icecat: Fix GTK 3 file chooser crash.
Date: Fri, 21 Apr 2017 19:55:40 +0200
* gnu/packages/gnuzilla.scm (icecat)[arguments]: Add a 'wrap-xdgdatadirs'
phase to set XDG_DATA_DIRS.
---
 gnu/packages/gnuzilla.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 91bb0a6a7..3b8c80d2c 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -750,7 +750,16 @@ standards.")
                       (copy-file file (string-append icons "/icecat.png"))))
                   '("default16.png" "default22.png" "default24.png"
                     "default32.png" "default48.png" "content/icon64.png"
-                    "mozicon128.png" "default256.png")))))))))
+                    "mozicon128.png" "default256.png"))))))
+         ;; This fixes the file chooser crash that happens with GTK 3.
+         (add-after 'install 'wrap-xdgdatadirs
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib"))
+                    (gtk (assoc-ref inputs "gtk+"))
+                    (gtk-share (string-append gtk "/share")))
+               (wrap-program (car (find-files lib "^icecat$"))
+                 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))))
     (home-page "https://www.gnu.org/software/gnuzilla/")
     (synopsis "Entirely free browser derived from Mozilla Firefox")
     (description
-- 
2.12.2





Information forwarded to guix-patches <at> gnu.org:
bug#26593; Package guix-patches. (Fri, 21 Apr 2017 18:19:02 GMT) Full text and rfc822 format available.

Message #8 received at 26593 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 26593 <at> debbugs.gnu.org
Subject: Re: bug#26593: [PATCH] gnu: icecat: Fix GTK 3 file chooser crash.
Date: Fri, 21 Apr 2017 20:18:31 +0200
Clément Lassieur <clement <at> lassieur.org> writes:

> * gnu/packages/gnuzilla.scm (icecat)[arguments]: Add a 'wrap-xdgdatadirs'
> phase to set XDG_DATA_DIRS.
> ---
>  gnu/packages/gnuzilla.scm | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
> index 91bb0a6a7..3b8c80d2c 100644
> --- a/gnu/packages/gnuzilla.scm
> +++ b/gnu/packages/gnuzilla.scm
> @@ -750,7 +750,16 @@ standards.")
>                        (copy-file file (string-append icons "/icecat.png"))))
>                    '("default16.png" "default22.png" "default24.png"
>                      "default32.png" "default48.png" "content/icon64.png"
> -                    "mozicon128.png" "default256.png")))))))))
> +                    "mozicon128.png" "default256.png"))))))
> +         ;; This fixes the file chooser crash that happens with GTK 3.
> +         (add-after 'install 'wrap-xdgdatadirs
                                     ^
I guess I should rename it to 'wrap-program, and update changelog
accordingly.

> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (lib (string-append out "/lib"))
> +                    (gtk (assoc-ref inputs "gtk+"))
> +                    (gtk-share (string-append gtk "/share")))
> +               (wrap-program (car (find-files lib "^icecat$"))
> +                 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))))
>      (home-page "https://www.gnu.org/software/gnuzilla/")
>      (synopsis "Entirely free browser derived from Mozilla Firefox")
>      (description





Added tag(s) fixed. Request was from clement <at> lassieur.org (Clément Lassieur) to control <at> debbugs.gnu.org. (Fri, 21 Apr 2017 23:03:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 26593 <at> debbugs.gnu.org and Clément Lassieur <clement <at> lassieur.org> Request was from clement <at> lassieur.org (Clément Lassieur) to control <at> debbugs.gnu.org. (Fri, 21 Apr 2017 23:03:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#26593; Package guix-patches. (Sat, 22 Apr 2017 05:21:01 GMT) Full text and rfc822 format available.

Message #15 received at 26593 <at> debbugs.gnu.org (full text, mbox):

From: Pjotr Prins <pjotr.public12 <at> thebird.nl>
To: Clément Lassieur <clement <at> lassieur.org>
Cc: guix-devel <at> gnu.org, ng0 <contact.ng0 <at> cryptolab.net>, 26593 <at> debbugs.gnu.org
Subject: Re: Icecat 52 crashing in file dialogues
Date: Sat, 22 Apr 2017 05:20:19 +0000
On Fri, Apr 21, 2017 at 08:03:51PM +0200, Clément Lassieur wrote:
> ng0 <contact.ng0 <at> cryptolab.net> writes:
> 
> > Hi,
> >
> > has someone else experienced crashes since the icecat update?
> >
> > My system state isn't that old, but a week older than my profile state.
> > File dialgues (save file) cause random crashes, Open file dialogues (change profile picture, etc) cause reproducible crashes all the time.
> 
> Yes, I did experience the same thing.  I wrote a small patch that fixes
> it, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26593.
> 
> I'm not a GTK expert, there might be a cleaner way deal with
> XDG_DATA_DIRS.

Looks like we can use similar wrappers for all GTK tools, including
gnumeric, geeqie, gnucash etc. Those are the ones that crash on me
without XDG_DATA_DIRS. At this point I use alias on my Debian based
system:

alias gnucash='env XDG_DATA_DIRS=/usr/local/share:/usr/share gnucash'
alias gnumeric='env XDG_DATA_DIRS=/usr/local/share:/usr/share gnumeric'


-- 




Information forwarded to guix-patches <at> gnu.org:
bug#26593; Package guix-patches. (Sat, 22 Apr 2017 07:50:02 GMT) Full text and rfc822 format available.

Message #18 received at 26593 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Pjotr Prins <pjotr.public12 <at> thebird.nl>
Cc: guix-devel <at> gnu.org, ng0 <contact.ng0 <at> cryptolab.net>, 26593 <at> debbugs.gnu.org
Subject: Re: Icecat 52 crashing in file dialogues
Date: Sat, 22 Apr 2017 09:49:32 +0200
Pjotr Prins <pjotr.public12 <at> thebird.nl> writes:

> On Fri, Apr 21, 2017 at 08:03:51PM +0200, Clément Lassieur wrote:
>> ng0 <contact.ng0 <at> cryptolab.net> writes:
>> 
>> > Hi,
>> >
>> > has someone else experienced crashes since the icecat update?
>> >
>> > My system state isn't that old, but a week older than my profile state.
>> > File dialgues (save file) cause random crashes, Open file dialogues (change profile picture, etc) cause reproducible crashes all the time.
>> 
>> Yes, I did experience the same thing.  I wrote a small patch that fixes
>> it, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26593.
>> 
>> I'm not a GTK expert, there might be a cleaner way deal with
>> XDG_DATA_DIRS.
>
> Looks like we can use similar wrappers for all GTK tools, including
> gnumeric, geeqie, gnucash etc. Those are the ones that crash on me
> without XDG_DATA_DIRS. At this point I use alias on my Debian based
> system:
>
> alias gnucash='env XDG_DATA_DIRS=/usr/local/share:/usr/share gnucash'
> alias gnumeric='env XDG_DATA_DIRS=/usr/local/share:/usr/share gnumeric'

There is also a 'glib-or-gtk-build-system' (extension of
'gnu-build-system'), that does some more advanced wrapping.  For some
reason, I couldn't get it to work, but if that is the cleaner way, I
could try to dig into it.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 May 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 342 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.