UTF8 related bug

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

UTF8 related bug

Stefan Reichör
Because I have learned today where to look up a crash in stumpwm, I have
another crash that happens from time to time.

When I open a file containing an umlaut (e.g. ö) in evince, the whole
stumpwm session dies with the following backtrace:


Caught '
CONVERT-STRING-FROM-BYTES: Invalid byte sequence #xF6 #x72 #x2E #x70 in CHARSET:UTF-8 conversion
' at the top level. Please report this.
<1/143> #<SYSTEM-FUNCTION EXT:SHOW-STACK> 3
<2/139> #<COMPILED-FUNCTION STUMPWM::PRINT-BACKTRACE>
[138] unwind-protect frame
- #<COMPILED-FUNCTION STUMPWM::BACKTRACE-STRING>
<3/132> #<COMPILED-FUNCTION STUMPWM::BACKTRACE-STRING>
- :TOP-LEVEL
- #<COMPILED-FUNCTION STUMPWM::PERFORM-TOP-LEVEL-ERROR-ACTION>
<4/128> #<COMPILED-FUNCTION STUMPWM::PERFORM-TOP-LEVEL-ERROR-ACTION>
- #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
<5/126> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
- #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
- #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
<6/122> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
- #<EXT:SIMPLE-CHARSET-TYPE-ERROR #x21676E1E>
<7/117> #<SYSTEM-FUNCTION SIGNAL> 1
[116] frame binding variables (~ = dynamically):
  | ~ *PRINT-READABLY* <--> NIL
- #<EXT:SIMPLE-CHARSET-TYPE-ERROR #x21676E1E>
- #<ENCODING CHARSET:UTF-8 :UNIX>
<8/111> #<SYSTEM-FUNCTION EXT:CONVERT-STRING-FROM-BYTES> 2
- #<COMPILED-FUNCTION STUMPWM::UTF8-TO-STRING>
<9/105> #<COMPILED-FUNCTION STUMPWM::UTF8-TO-STRING>
- (103 108 103 49 50 95 82 75 95 114 101 105 99 104 246 114 46 112 100 102)
- #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
<10/102> #<COMPILED-FUNCTION STUMPWM::XWIN-NET-WM-NAME>
- #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
<11/100> #<COMPILED-FUNCTION STUMPWM::XWIN-NAME>
- :WM_NAME
<12/98> #<COMPILED-FUNCTION STUMPWM::UPDATE-WINDOW-PROPERTIES>
- #S(TILE-WINDOW "Document Viewer" #x2400004)
- :NEW-VALUE
- #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
<13/94> #<COMPILED-FUNCTION #:G46274>
- #<COMPILED-FUNCTION #:G46274>
[86] catch frame for tag #:SIMPLE-RESTART-46736
<14/82> #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
- #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
- #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
[75] compiled tagbody frame for #(NIL)
-
#(#(#(NIL
      (:DISPLAY #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE> :EVENT-CODE 28 :SEND-EVENT-P NIL :SEQUENCE 56393 :EVENT-KEY :PROPERTY-NOTIFY :WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E> :EVENT-WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
       :ATOM :WM_NAME :STATE :NEW-VALUE :TIME 9046775))
    #<COMPILED-FUNCTION #:G46274>)
  NIL)
-
#(#(NIL
    (:DISPLAY #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE> :EVENT-CODE 28 :SEND-EVENT-P NIL :SEQUENCE 56393 :EVENT-KEY :PROPERTY-NOTIFY :WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E> :EVENT-WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
     :ATOM :WM_NAME :STATE :NEW-VALUE :TIME 9046775))
  #<COMPILED-FUNCTION #:G46274>)
- #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
- #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE>
<15/66> #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
- #<UNBOUND>
- #<UNBOUND>
- #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
<16/63> #<ADD-ON-SYSTEM-FUNCTION XLIB:PROCESS-EVENT> 2
- 9
- #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-5>
<17/54> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-5>
[53] handler frame for conditions XLIB:LOOKUP-ERROR WARNING (OR SERIOUS-CONDITION ERROR) T
- #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-4>
- #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-2>
- #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
<18/43> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
[40] unwind-protect frame
[35] catch frame for tag #:SIMPLE-RESTART-49939
- NIL
- ""
- ":0"
<19/27> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL>
- #<COMPILED-FUNCTION STUMPWM>
<20/22> #<COMPILED-FUNCTION STUMPWM>
- #<COMPILED-FUNCTION STUMPWM>
- ((EXT:QUIT))
[10] frame binding variables #<ADDRESS #x03CB0028> binds (~ = dynamically):
  Next environment: NIL
<21/4> #<FUNCTION :LAMBDA NIL (STUMPWM) (EXT:QUIT)> 0
- #<FUNCTION :LAMBDA NIL (STUMPWM) (EXT:QUIT)>
<22/2> #<COMPILED-FUNCTION EXT::SAVEINITMEM-1>
<23/3> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
<24/3> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
- #<ADDRESS #x00000000>
- #<ADDRESS #x00000000>
WARNING: (DEFCONSTANT +IPV4-ZERO+ "00000000") redefines the constant +IPV4-ZERO+. Its old value was visually similar though. Set CUSTOM:*SUPPRESS-SIMILAR-CONSTANT-REDEFINITION-WARNING* to avoid this warning.
WARNING: DEFUN/DEFMACRO: redefining function STUMPWM.CONTRIB.NET::KBMB in /home/srei/xsteve-local-config/.stumpwmrc, was defined in /home/srei/work/git/stumpwm/make-image.lisp
WARNING: DEFUN/DEFMACRO: redefining function STUMPWM.CONTRIB.NET::KBMB in /home/srei/work/git/stumpwm/make-image.lisp, was defined in /home/srei/xsteve-local-config/.stumpwmrc
*** - CONVERT-STRING-FROM-BYTES: Invalid byte sequence #xF6 #x72 #x2E #x70 in CHARSET:UTF-8 conversion

Bye.
xterm-vsim:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".
g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
Handling SIGTERM.
Successfully wrote to shutdown pipe, resetting signal handler.
g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
Terminated
xterm4:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0".
      after 132 requests (132 known processed) with 12 events remaining..
[2572:2572:9056760334:ERROR:browser_main_gtk.cc(54)] X IO Error detected
xterm1:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: UTF8 related bug

Vladimir Sedach
Which Unix are you using, and what kind of language settings do you
have? One way to find out is to 'echo $LANG' in the console.

It looks like the file name is in ISO 8859-1/Latin-1 (0xF6 is o with
the umlaut). So there are two solutions: set the default encoding to
latin-1 for stumpwm (I don't know off the top of my head how to do
that), or set your system to use UTF-8 encoding. The second way is
preferable because then you will not have any trouble transferring
your files to other machines using UTF-8, or trouble with other
languages. convmv (http://www.j3e.de/linux/convmv/man/) is a very
useful tool to help convert filenames to UTF-8.

Vladimir

On Tue, Feb 28, 2012 at 9:30 AM, Stefan Reichör <[hidden email]> wrote:

> Because I have learned today where to look up a crash in stumpwm, I have
> another crash that happens from time to time.
>
> When I open a file containing an umlaut (e.g. ö) in evince, the whole
> stumpwm session dies with the following backtrace:
>
>
> Caught '
> CONVERT-STRING-FROM-BYTES: Invalid byte sequence #xF6 #x72 #x2E #x70 in CHARSET:UTF-8 conversion
> ' at the top level. Please report this.
> <1/143> #<SYSTEM-FUNCTION EXT:SHOW-STACK> 3
> <2/139> #<COMPILED-FUNCTION STUMPWM::PRINT-BACKTRACE>
> [138] unwind-protect frame
> - #<COMPILED-FUNCTION STUMPWM::BACKTRACE-STRING>
> <3/132> #<COMPILED-FUNCTION STUMPWM::BACKTRACE-STRING>
> - :TOP-LEVEL
> - #<COMPILED-FUNCTION STUMPWM::PERFORM-TOP-LEVEL-ERROR-ACTION>
> <4/128> #<COMPILED-FUNCTION STUMPWM::PERFORM-TOP-LEVEL-ERROR-ACTION>
> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
> <5/126> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
> <6/122> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
> - #<EXT:SIMPLE-CHARSET-TYPE-ERROR #x21676E1E>
> <7/117> #<SYSTEM-FUNCTION SIGNAL> 1
> [116] frame binding variables (~ = dynamically):
>  | ~ *PRINT-READABLY* <--> NIL
> - #<EXT:SIMPLE-CHARSET-TYPE-ERROR #x21676E1E>
> - #<ENCODING CHARSET:UTF-8 :UNIX>
> <8/111> #<SYSTEM-FUNCTION EXT:CONVERT-STRING-FROM-BYTES> 2
> - #<COMPILED-FUNCTION STUMPWM::UTF8-TO-STRING>
> <9/105> #<COMPILED-FUNCTION STUMPWM::UTF8-TO-STRING>
> - (103 108 103 49 50 95 82 75 95 114 101 105 99 104 246 114 46 112 100 102)
> - #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
> <10/102> #<COMPILED-FUNCTION STUMPWM::XWIN-NET-WM-NAME>
> - #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
> <11/100> #<COMPILED-FUNCTION STUMPWM::XWIN-NAME>
> - :WM_NAME
> <12/98> #<COMPILED-FUNCTION STUMPWM::UPDATE-WINDOW-PROPERTIES>
> - #S(TILE-WINDOW "Document Viewer" #x2400004)
> - :NEW-VALUE
> - #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
> <13/94> #<COMPILED-FUNCTION #:G46274>
> - #<COMPILED-FUNCTION #:G46274>
> [86] catch frame for tag #:SIMPLE-RESTART-46736
> <14/82> #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
> - #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
> - #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
> [75] compiled tagbody frame for #(NIL)
> -
> #(#(#(NIL
>      (:DISPLAY #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE> :EVENT-CODE 28 :SEND-EVENT-P NIL :SEQUENCE 56393 :EVENT-KEY :PROPERTY-NOTIFY :WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E> :EVENT-WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
>       :ATOM :WM_NAME :STATE :NEW-VALUE :TIME 9046775))
>    #<COMPILED-FUNCTION #:G46274>)
>  NIL)
> -
> #(#(NIL
>    (:DISPLAY #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE> :EVENT-CODE 28 :SEND-EVENT-P NIL :SEQUENCE 56393 :EVENT-KEY :PROPERTY-NOTIFY :WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E> :EVENT-WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
>     :ATOM :WM_NAME :STATE :NEW-VALUE :TIME 9046775))
>  #<COMPILED-FUNCTION #:G46274>)
> - #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
> - #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE>
> <15/66> #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
> - #<UNBOUND>
> - #<UNBOUND>
> - #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
> <16/63> #<ADD-ON-SYSTEM-FUNCTION XLIB:PROCESS-EVENT> 2
> - 9
> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-5>
> <17/54> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-5>
> [53] handler frame for conditions XLIB:LOOKUP-ERROR WARNING (OR SERIOUS-CONDITION ERROR) T
> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-4>
> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-2>
> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
> <18/43> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
> [40] unwind-protect frame
> [35] catch frame for tag #:SIMPLE-RESTART-49939
> - NIL
> - ""
> - ":0"
> <19/27> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL>
> - #<COMPILED-FUNCTION STUMPWM>
> <20/22> #<COMPILED-FUNCTION STUMPWM>
> - #<COMPILED-FUNCTION STUMPWM>
> - ((EXT:QUIT))
> [10] frame binding variables #<ADDRESS #x03CB0028> binds (~ = dynamically):
>  Next environment: NIL
> <21/4> #<FUNCTION :LAMBDA NIL (STUMPWM) (EXT:QUIT)> 0
> - #<FUNCTION :LAMBDA NIL (STUMPWM) (EXT:QUIT)>
> <22/2> #<COMPILED-FUNCTION EXT::SAVEINITMEM-1>
> <23/3> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
> <24/3> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
> - #<ADDRESS #x00000000>
> - #<ADDRESS #x00000000>
> WARNING: (DEFCONSTANT +IPV4-ZERO+ "00000000") redefines the constant +IPV4-ZERO+. Its old value was visually similar though. Set CUSTOM:*SUPPRESS-SIMILAR-CONSTANT-REDEFINITION-WARNING* to avoid this warning.
> WARNING: DEFUN/DEFMACRO: redefining function STUMPWM.CONTRIB.NET::KBMB in /home/srei/xsteve-local-config/.stumpwmrc, was defined in /home/srei/work/git/stumpwm/make-image.lisp
> WARNING: DEFUN/DEFMACRO: redefining function STUMPWM.CONTRIB.NET::KBMB in /home/srei/work/git/stumpwm/make-image.lisp, was defined in /home/srei/xsteve-local-config/.stumpwmrc
> *** - CONVERT-STRING-FROM-BYTES: Invalid byte sequence #xF6 #x72 #x2E #x70 in CHARSET:UTF-8 conversion
>
> Bye.
> xterm-vsim:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".
> g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
> Handling SIGTERM.
> Successfully wrote to shutdown pipe, resetting signal handler.
> g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
> Terminated
> xterm4:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".
> XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0".
>      after 132 requests (132 known processed) with 12 events remaining..
> [2572:2572:9056760334:ERROR:browser_main_gtk.cc(54)] X IO Error detected
> xterm1:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".
>
> _______________________________________________
> Stumpwm-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: UTF8 related bug

Vladimir Sedach
Also, and important: signal handlers need to be added to stumpwm to
prevent encoding errors from crashing the whole window manager. This
means some thing will not work if stumpwm assumes UTF-8 encoding and
the filenames or X give back Latin-1 or similar, but it's better than
dying.

Vladimir

On Tue, Feb 28, 2012 at 1:22 PM, Vladimir Sedach <[hidden email]> wrote:

> Which Unix are you using, and what kind of language settings do you
> have? One way to find out is to 'echo $LANG' in the console.
>
> It looks like the file name is in ISO 8859-1/Latin-1 (0xF6 is o with
> the umlaut). So there are two solutions: set the default encoding to
> latin-1 for stumpwm (I don't know off the top of my head how to do
> that), or set your system to use UTF-8 encoding. The second way is
> preferable because then you will not have any trouble transferring
> your files to other machines using UTF-8, or trouble with other
> languages. convmv (http://www.j3e.de/linux/convmv/man/) is a very
> useful tool to help convert filenames to UTF-8.
>
> Vladimir
>
> On Tue, Feb 28, 2012 at 9:30 AM, Stefan Reichör <[hidden email]> wrote:
>> Because I have learned today where to look up a crash in stumpwm, I have
>> another crash that happens from time to time.
>>
>> When I open a file containing an umlaut (e.g. ö) in evince, the whole
>> stumpwm session dies with the following backtrace:
>>
>>
>> Caught '
>> CONVERT-STRING-FROM-BYTES: Invalid byte sequence #xF6 #x72 #x2E #x70 in CHARSET:UTF-8 conversion
>> ' at the top level. Please report this.
>> <1/143> #<SYSTEM-FUNCTION EXT:SHOW-STACK> 3
>> <2/139> #<COMPILED-FUNCTION STUMPWM::PRINT-BACKTRACE>
>> [138] unwind-protect frame
>> - #<COMPILED-FUNCTION STUMPWM::BACKTRACE-STRING>
>> <3/132> #<COMPILED-FUNCTION STUMPWM::BACKTRACE-STRING>
>> - :TOP-LEVEL
>> - #<COMPILED-FUNCTION STUMPWM::PERFORM-TOP-LEVEL-ERROR-ACTION>
>> <4/128> #<COMPILED-FUNCTION STUMPWM::PERFORM-TOP-LEVEL-ERROR-ACTION>
>> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
>> <5/126> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
>> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-3-1>
>> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
>> <6/122> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
>> - #<EXT:SIMPLE-CHARSET-TYPE-ERROR #x21676E1E>
>> <7/117> #<SYSTEM-FUNCTION SIGNAL> 1
>> [116] frame binding variables (~ = dynamically):
>>  | ~ *PRINT-READABLY* <--> NIL
>> - #<EXT:SIMPLE-CHARSET-TYPE-ERROR #x21676E1E>
>> - #<ENCODING CHARSET:UTF-8 :UNIX>
>> <8/111> #<SYSTEM-FUNCTION EXT:CONVERT-STRING-FROM-BYTES> 2
>> - #<COMPILED-FUNCTION STUMPWM::UTF8-TO-STRING>
>> <9/105> #<COMPILED-FUNCTION STUMPWM::UTF8-TO-STRING>
>> - (103 108 103 49 50 95 82 75 95 114 101 105 99 104 246 114 46 112 100 102)
>> - #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
>> <10/102> #<COMPILED-FUNCTION STUMPWM::XWIN-NET-WM-NAME>
>> - #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
>> <11/100> #<COMPILED-FUNCTION STUMPWM::XWIN-NAME>
>> - :WM_NAME
>> <12/98> #<COMPILED-FUNCTION STUMPWM::UPDATE-WINDOW-PROPERTIES>
>> - #S(TILE-WINDOW "Document Viewer" #x2400004)
>> - :NEW-VALUE
>> - #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
>> <13/94> #<COMPILED-FUNCTION #:G46274>
>> - #<COMPILED-FUNCTION #:G46274>
>> [86] catch frame for tag #:SIMPLE-RESTART-46736
>> <14/82> #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
>> - #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
>> - #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT-2>
>> [75] compiled tagbody frame for #(NIL)
>> -
>> #(#(#(NIL
>>      (:DISPLAY #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE> :EVENT-CODE 28 :SEND-EVENT-P NIL :SEQUENCE 56393 :EVENT-KEY :PROPERTY-NOTIFY :WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E> :EVENT-WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
>>       :ATOM :WM_NAME :STATE :NEW-VALUE :TIME 9046775))
>>    #<COMPILED-FUNCTION #:G46274>)
>>  NIL)
>> -
>> #(#(NIL
>>    (:DISPLAY #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE> :EVENT-CODE 28 :SEND-EVENT-P NIL :SEQUENCE 56393 :EVENT-KEY :PROPERTY-NOTIFY :WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E> :EVENT-WINDOW #<XLIB:WINDOW 1914x1175+0+0 localhost #x02400004 #x2163FA7E>
>>     :ATOM :WM_NAME :STATE :NEW-VALUE :TIME 9046775))
>>  #<COMPILED-FUNCTION #:G46274>)
>> - #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
>> - #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R11001000) X11.0 #x215F65CE>
>> <15/66> #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
>> - #<UNBOUND>
>> - #<UNBOUND>
>> - #<COMPILED-FUNCTION STUMPWM::HANDLE-EVENT>
>> <16/63> #<ADD-ON-SYSTEM-FUNCTION XLIB:PROCESS-EVENT> 2
>> - 9
>> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-5>
>> <17/54> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-5>
>> [53] handler frame for conditions XLIB:LOOKUP-ERROR WARNING (OR SERIOUS-CONDITION ERROR) T
>> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-4>
>> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP-2>
>> - #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
>> <18/43> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL-LOOP>
>> [40] unwind-protect frame
>> [35] catch frame for tag #:SIMPLE-RESTART-49939
>> - NIL
>> - ""
>> - ":0"
>> <19/27> #<COMPILED-FUNCTION STUMPWM::STUMPWM-INTERNAL>
>> - #<COMPILED-FUNCTION STUMPWM>
>> <20/22> #<COMPILED-FUNCTION STUMPWM>
>> - #<COMPILED-FUNCTION STUMPWM>
>> - ((EXT:QUIT))
>> [10] frame binding variables #<ADDRESS #x03CB0028> binds (~ = dynamically):
>>  Next environment: NIL
>> <21/4> #<FUNCTION :LAMBDA NIL (STUMPWM) (EXT:QUIT)> 0
>> - #<FUNCTION :LAMBDA NIL (STUMPWM) (EXT:QUIT)>
>> <22/2> #<COMPILED-FUNCTION EXT::SAVEINITMEM-1>
>> <23/3> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
>> <24/3> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
>> - #<ADDRESS #x00000000>
>> - #<ADDRESS #x00000000>
>> WARNING: (DEFCONSTANT +IPV4-ZERO+ "00000000") redefines the constant +IPV4-ZERO+. Its old value was visually similar though. Set CUSTOM:*SUPPRESS-SIMILAR-CONSTANT-REDEFINITION-WARNING* to avoid this warning.
>> WARNING: DEFUN/DEFMACRO: redefining function STUMPWM.CONTRIB.NET::KBMB in /home/srei/xsteve-local-config/.stumpwmrc, was defined in /home/srei/work/git/stumpwm/make-image.lisp
>> WARNING: DEFUN/DEFMACRO: redefining function STUMPWM.CONTRIB.NET::KBMB in /home/srei/work/git/stumpwm/make-image.lisp, was defined in /home/srei/xsteve-local-config/.stumpwmrc
>> *** - CONVERT-STRING-FROM-BYTES: Invalid byte sequence #xF6 #x72 #x2E #x70 in CHARSET:UTF-8 conversion
>>
>> Bye.
>> xterm-vsim:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".
>> g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
>> Handling SIGTERM.
>> Successfully wrote to shutdown pipe, resetting signal handler.
>> g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
>> Terminated
>> xterm4:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".
>> XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0".
>>      after 132 requests (132 known processed) with 12 events remaining..
>> [2572:2572:9056760334:ERROR:browser_main_gtk.cc(54)] X IO Error detected
>> xterm1:  fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0.0".
>>
>> _______________________________________________
>> Stumpwm-devel mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: UTF8 related bug

Daimrod
In reply to this post by Stefan Reichör
Stefan Reichör <[hidden email]> writes:

> Because I have learned today where to look up a crash in stumpwm, I have
> another crash that happens from time to time.
>
> When I open a file containing an umlaut (e.g. ö) in evince, the whole
> stumpwm session dies with the following backtrace:

I put the following snippet at the top of my .xsession to set the LANG

LANG="en_US.UTF-8"
export LANG

Though I've tried to reproduce this but I can't crash Stumpwm.

I've tried in utf-8 stumpwm with iso_8859-1 filenames and in iso_8859-1
with utf-8 filenames.

Can you provide more details on how you open the file?


_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: UTF8 related bug

Stefan Reichör
Daimrod <[hidden email]> writes:

> Stefan Reichör <[hidden email]> writes:
>
>> Because I have learned today where to look up a crash in stumpwm, I have
>> another crash that happens from time to time.
>>
>> When I open a file containing an umlaut (e.g. ö) in evince, the whole
>> stumpwm session dies with the following backtrace:
>
> I put the following snippet at the top of my .xsession to set the LANG
>
> LANG="en_US.UTF-8"
> export LANG
>
> Though I've tried to reproduce this but I can't crash Stumpwm.
>
> I've tried in utf-8 stumpwm with iso_8859-1 filenames and in iso_8859-1
> with utf-8 filenames.
>
> Can you provide more details on how you open the file?

# echo $LANG
en_AU.UTF-8


Here is the content of /usr/share/xsessions/stumpwm.desktop:

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/home/srei/prg/stumpwm
TryExec=stumpwm
Name=StumpWM
Comment=Stump window manager


The problem appears when I open a pdf file from a GNUS attachment that
contains an umlaut. So I guess it is rather specific to my setup.

I often have problems, launching files from emacs that contain umlauts.
It seems that emacs uses a different coding system for the file names
than the utf8 shell.

M-x getenv RET LANG RET also gives en_AU.UTF-8

When I look at a file in emacs that contains an umlaut it looks correct.
When I do ls in the shell, I see '?' instead.

The bad thing is, that opening such a wrong file kills my whole
X-Session. Before I thought it had something to do with a bad pdf
content. Now I know that the filename is the likely cause. So I can save
the file, rename it and then view it.

However, it would be nice to
a) prevent stumpwm from crashing
b) find a setup in emacs to handle filenames containing umlauts that works


Stefan.

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: UTF8 related bug

Vladimir Sedach
You can check which encoding system Emacs uses for a particular buffer
by doing C-h C Ret
(http://www.delorie.com/gnu/docs/emacs/emacs_220.html). It looks like
the shell is doing the "right" thing by displaying the '?'

Looking quickly at the backtrace, it looks like the place to fix the
crash in stumpwm is utf8-to-string in wrapper.lisp:212

The utf-8 encoding/decoding functions right now are pretty ugly and
have a bunch of implementation-dependent stuff in them. Replacing
those with either flexi-streams or babel is going to cut out a lot of
the code, provide more portability, and most important give a uniform
error interface. Now it's just a matter of doing it.

Vladimir

On Wed, Feb 29, 2012 at 2:44 AM, Stefan Reichör <[hidden email]> wrote:

> Daimrod <[hidden email]> writes:
>
>> Stefan Reichör <[hidden email]> writes:
>>
>>> Because I have learned today where to look up a crash in stumpwm, I have
>>> another crash that happens from time to time.
>>>
>>> When I open a file containing an umlaut (e.g. ö) in evince, the whole
>>> stumpwm session dies with the following backtrace:
>>
>> I put the following snippet at the top of my .xsession to set the LANG
>>
>> LANG="en_US.UTF-8"
>> export LANG
>>
>> Though I've tried to reproduce this but I can't crash Stumpwm.
>>
>> I've tried in utf-8 stumpwm with iso_8859-1 filenames and in iso_8859-1
>> with utf-8 filenames.
>>
>> Can you provide more details on how you open the file?
>
> # echo $LANG
> en_AU.UTF-8
>
>
> Here is the content of /usr/share/xsessions/stumpwm.desktop:
>
> [Desktop Entry]
> Encoding=UTF-8
> Type=XSession
> Exec=/home/srei/prg/stumpwm
> TryExec=stumpwm
> Name=StumpWM
> Comment=Stump window manager
>
>
> The problem appears when I open a pdf file from a GNUS attachment that
> contains an umlaut. So I guess it is rather specific to my setup.
>
> I often have problems, launching files from emacs that contain umlauts.
> It seems that emacs uses a different coding system for the file names
> than the utf8 shell.
>
> M-x getenv RET LANG RET also gives en_AU.UTF-8
>
> When I look at a file in emacs that contains an umlaut it looks correct.
> When I do ls in the shell, I see '?' instead.
>
> The bad thing is, that opening such a wrong file kills my whole
> X-Session. Before I thought it had something to do with a bad pdf
> content. Now I know that the filename is the likely cause. So I can save
> the file, rename it and then view it.
>
> However, it would be nice to
> a) prevent stumpwm from crashing
> b) find a setup in emacs to handle filenames containing umlauts that works
>
>
> Stefan.
>
> _______________________________________________
> Stumpwm-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: UTF8 related bug

Stefan Reichör
Vladimir Sedach <[hidden email]> writes:

> You can check which encoding system Emacs uses for a particular buffer
> by doing C-h C Ret
> (http://www.delorie.com/gnu/docs/emacs/emacs_220.html). It looks like
> the shell is doing the "right" thing by displaying the '?'

(My) Emacs uses iso-latin-1-unix as coding system for file names:
,----
| default-file-name-coding-system is a variable defined in `C source code'.
| Its value is iso-latin-1-unix
|
| Documentation:
| Default coding system for encoding file names.
| This variable is used only when `file-name-coding-system' is nil.
|
| This variable is set/changed by the command `set-language-environment'.
| User should not set this variable manually,
| instead use `file-name-coding-system' to get a constant encoding
| of file names regardless of the current language environment.
`----

I will experiment setting file-name-coding-system to 'utf-8.

However, I found a way to reproduce the stumpwm crash by just opening a
pdf file, using evince.

The attached tarball contains the same file, using two different names.
When using the one that contains the iso-latin-1-unix coded ö, stumpwm
crashes.

Stefan.


> Looking quickly at the backtrace, it looks like the place to fix the
> crash in stumpwm is utf8-to-string in wrapper.lisp:212
>
> The utf-8 encoding/decoding functions right now are pretty ugly and
> have a bunch of implementation-dependent stuff in them. Replacing
> those with either flexi-streams or babel is going to cut out a lot of
> the code, provide more portability, and most important give a uniform
> error interface. Now it's just a matter of doing it.
>
> Vladimir

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

stump-test.tar.gz (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: UTF8 related bug

Stefan Reichör
Stefan Reichör <[hidden email]> writes:

> Vladimir Sedach <[hidden email]> writes:
>
>> You can check which encoding system Emacs uses for a particular buffer
>> by doing C-h C Ret
>> (http://www.delorie.com/gnu/docs/emacs/emacs_220.html). It looks like
>> the shell is doing the "right" thing by displaying the '?'
>
> (My) Emacs uses iso-latin-1-unix as coding system for file names:
> ,----
> | default-file-name-coding-system is a variable defined in `C source code'.
> | Its value is iso-latin-1-unix
> |
> | Documentation:
> | Default coding system for encoding file names.
> | This variable is used only when `file-name-coding-system' is nil.
> |
> | This variable is set/changed by the command `set-language-environment'.
> | User should not set this variable manually,
> | instead use `file-name-coding-system' to get a constant encoding
> | of file names regardless of the current language environment.
> `----
>
> I will experiment setting file-name-coding-system to 'utf-8.

To follow up my own mail:

I have set up my emacs to use utf-8 for most things. But I still prefer
iso-latin-1 for my text files:

  (prefer-coding-system       'utf-8)
  (set-default-coding-systems 'utf-8)
  (setq-default buffer-file-coding-system 'iso-latin-1)

Using this setting the file names are encoded in utf-8 and displayed
correctly in dired. StumpWM also no longer crashes when I open a pdf
file which name contains an umlaut :-)

This solves the problem for me.

Thanks for the pointers I got on this mailing list!

Stefan.

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel