After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 127870 - terminal garbled and needs 'reset' after cat'ing file
terminal garbled and needs 'reset' after cat'ing file
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.10.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
: 350487 500695 525013 538181 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-11-25 06:34 UTC by Alex Graveley
Modified: 2008-11-29 21:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
the file (3.60 KB, application/octet-stream)
2003-11-25 06:35 UTC, Alex Graveley
Details

Description Alex Graveley 2003-11-25 06:34:19 UTC
(This bug report was generated by Bug Buddy 2.2.104)
tried to cat some file that somehow got named to
/usr/local/share/pixmaps, and gnome-terminal crashed


Debugging Information:

Backtrace was generated from '/usr/bin/gnome-terminal'

(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...[New
Thread 16384 (LWP 1029)]

0x408db7f7 in waitpid () from /lib/i686/libpthread.so.0

Thread 1 (Thread 16384 (LWP 1029))

  • #0 waitpid
    from /lib/i686/libpthread.so.0
  • #1 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #2 __pthread_sighandler
    from /lib/i686/libpthread.so.0
  • #3 <signal handler called>
  • #4 XftFontCheckGlyph
    from /usr/lib/libXft.so.2
  • #5 XftRectCore
    from /usr/lib/libXft.so.2
  • #6 XftGlyphSpecCore
    from /usr/lib/libXft.so.2
  • #7 XftDrawGlyphSpec
    from /usr/lib/libXft.so.2
  • #8 XftDrawCharSpec
    from /usr/lib/libXft.so.2
  • #9 vte_terminal_get_emulation
    from /usr/lib/libvte.so.4
  • #10 vte_terminal_get_emulation
    from /usr/lib/libvte.so.4
  • #11 vte_terminal_get_emulation
    from /usr/lib/libvte.so.4
  • #12 vte_terminal_get_emulation
    from /usr/lib/libvte.so.4
  • #13 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #14 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #19 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #20 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #21 gdk_window_clear_area_e
    from /usr/lib/libgdk-x11-2.0.so.0
  • #22 gdk_window_process_all_updates
    from /usr/lib/libgdk-x11-2.0.so.0
  • #23 gdk_window_process_all_updates
    from /usr/lib/libgdk-x11-2.0.so.0
  • #24 g_timeout_add
    from /usr/lib/libglib-2.0.so.0
  • #25 unblock_source
    from /usr/lib/libglib-2.0.so.0
  • #26 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #27 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #28 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #29 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #30 main
  • #31 __libc_start_main
    from /lib/i686/libc.so.6
  • #0 waitpid
    from /lib/i686/libpthread.so.0

Comment 1 Alex Graveley 2003-11-25 06:35:26 UTC
Created attachment 21788 [details]
the file
Comment 2 Mariano Suárez-Alvarez 2003-12-01 09:25:51 UTC
catting random bits to a terminal is not a good idea in general ;)
gnome-terminal should not segfault, though.

I do not get a crash in 2.5.* by catting the file.
Also, the stack trace attached seems to be corrupted, as
vte_terminal_get_emulation does not call itself.

Reporter: do you see this crash every time you cat the file? Anc can
you tell us what version you are using (you should find the full
version number in the /Help/About menu
Comment 3 Alex Graveley 2003-12-01 21:48:59 UTC
I am running version 2.2.1.  And catting or lessing this file only
seems to crash the terminal every so often.
Comment 4 Kjartan Maraas 2004-09-02 19:41:55 UTC
No crash here, but it does make the terminal garbled beyond repair. Still
crashing on your end?
Comment 5 Alex Graveley 2004-09-03 19:10:36 UTC
I'm getting the same results as Kjartan.  No crash after a few cats but
unrecoverable garbage each time.
Comment 6 Mariano Suárez-Alvarez 2004-10-31 09:01:49 UTC
I cannot get g-t to crash by catting the file. It does garble the terminal, but
that is sort of inevitable; running reset fixes it for me, though.
The stacktrace is pretty broken by the time vte_terminal_get_emulation is run.
Comment 7 Kjartan Maraas 2005-09-19 09:11:16 UTC
xterm seems to be handling this just fine so it's clear gnome-terminal could do
better here. It's not crashing though.
Comment 8 Wouter Bolsterlee (uws) 2006-03-09 08:56:13 UTC
No crash here either (2.13). xterm displays rectangles instead of trying to convert each byte sequence (interpreting the strings using the current locale setting I thinkg) to a real glyph.
Comment 9 Behdad Esfahbod 2006-03-09 09:20:05 UTC
I hit this every other day and it's damn annoying.

I used to believe that this is ISO 2202 in action.  Which is, you can change charset using escape sequences.  Xterm doesn't suffer, simply because xterm does not implement this and let it be done in an application called 'luit', which is like screen, but it does charset conversion.

I trimmed the test case down, and apparently it's a single character that garbles!  U+000E SHIFT OUT.  You can garble your screen using:

  echo -e '\016'

and fix it by:

  reset

A quick inspection suggests that indeed that's ISO 2022.

One solution of course is to make distributions add charset-reset sequence in their prompt.  Other than that not much can be done.  I'm with turning ISO 2022 by default.  It doesn't make much sense in the UTF-8 era afterall.  What do people think?
Comment 10 Behdad Esfahbod 2006-04-12 10:47:04 UTC
Apparently the effect of '\016' is reversed by '\017'.

Another bug is with some Asian spam I get, that change the terminal encoding such that I'll see all Asian characters.  Again reset comes to the rescue.  I think we should disable all charset switchings by default.  Transfering to vte to add required support first.
Comment 11 Behdad Esfahbod 2006-08-08 21:24:07 UTC
*** Bug 350487 has been marked as a duplicate of this bug. ***
Comment 12 Stephen Crosby 2007-11-30 18:12:53 UTC
*** Bug 500695 has been marked as a duplicate of this bug. ***
Comment 13 Behdad Esfahbod 2008-03-31 06:06:48 UTC
*** Bug 525013 has been marked as a duplicate of this bug. ***
Comment 14 Christian Persch 2008-06-13 18:57:15 UTC
*** Bug 538181 has been marked as a duplicate of this bug. ***
Comment 15 Behdad Esfahbod 2008-11-29 19:45:17 UTC
*** Bug 121894 has been marked as a duplicate of this bug. ***
Comment 16 Behdad Esfahbod 2008-11-29 21:57:02 UTC
2008-11-29  Behdad Esfahbod  <behdad@gnome.org>

        Bug 127870 – terminal garbled and needs 'reset' after cat'ing file

        * src/iso2022.c (_vte_iso2022_state_new): Initialize all four maps 
        (G0, G1, G2, G3) in USASCII mode, like xterm does.