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 348814 - crash on Terminal
crash on Terminal
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
2.15.x
Other All
: High critical
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 349409 399635 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-26 17:05 UTC by Ben Aultowski
Modified: 2007-01-27 18:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
fix (613 bytes, patch)
2006-07-27 05:32 UTC, Aivars Kalvans
committed Details | Review
fix to fix (637 bytes, patch)
2006-08-22 18:36 UTC, Aivars Kalvans
none Details | Review

Description Ben Aultowski 2006-07-26 17:05:22 UTC
What were you doing when the application crashed?
1. File/New Tab
2. Tab/Detach Tab
3. Close new terminal window
4. Crash


Distribution: Ubuntu 6.10 (edgy)
Gnome Release: 2.15.90 2006-07-24 (Ubuntu)
BugBuddy Version: 2.15.90

Memory status: size: 72491008 vsize: 0 resident: 72491008 share: 0 rss: 15634432 rss_rlim: 0
CPU usage: start_time: 1153929200 rtime: 0 utime: 180 stime: 0 cutime:160 cstime: 0 timeout: 20 it_real_value: 0 frequency: 0

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

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1225959760 (LWP 5413)]
[New Thread -1267778640 (LWP 5417)]
(no debugging symbols found)
0xb77843c1 in __waitpid_nocancel () from /lib/libpthread.so.0

Thread 2 (Thread -1267778640 (LWP 5417))

  • #0 __read_nocancel
    from /lib/libpthread.so.0
  • #1 g_main_context_wakeup
    from /usr/lib/libglib-2.0.so.0
  • #2 g_thread_create_full
    from /usr/lib/libglib-2.0.so.0
  • #3 start_thread
    from /lib/libpthread.so.0
  • #4 clone
    from /lib/libc.so.6

Comment 1 Behdad Esfahbod 2006-07-26 17:22:17 UTC
This is caused by the recent font setting changes.  Aivars, can you cook a patch please?  Here is the correct stacktrace:

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 10508)

  • #0 _vte_xft_font_for_char
    at vtexft.c line 177
  • #1 _vte_xft_draw_text
    at vtexft.c line 683
  • #2 _vte_draw_text
    at vtedraw.c line 267
  • #3 vte_terminal_draw_cells
    at vte.c line 8521
  • #4 vte_terminal_draw_row
    at vte.c line 9019
  • #5 vte_terminal_expose
    at vte.c line 9125
  • #6 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 83
  • #7 g_type_class_meta_marshal
    at gclosure.c line 567
  • #8 g_closure_invoke
    at gclosure.c line 490
  • #9 signal_emit_unlocked_R


Apparently by not doing the set_font_full in realize, a NULL font is reaching the drawing functions if you detach a tab.
Comment 2 Aivars Kalvans 2006-07-27 05:32:54 UTC
Created attachment 69709 [details] [review]
fix

This patch seems to fix the bug. Draw structure is deleted later in vte_terminal_finalize().
Comment 3 Behdad Esfahbod 2006-07-27 19:46:05 UTC
Thanks.

2006-07-27  Behdad Esfahbod  <behdad@gnome.org>

        Bug 348814 – crash on Terminal
        Patch from Aivars Kalvans

        * src/vte.c (vte_terminal_unrealize): Do not dispose draw in
        unrealize.

Comment 4 Behdad Esfahbod 2006-07-27 23:01:57 UTC
*** Bug 348979 has been marked as a duplicate of this bug. ***
Comment 5 Behdad Esfahbod 2006-07-31 15:06:57 UTC
*** Bug 349409 has been marked as a duplicate of this bug. ***
Comment 6 Behdad Esfahbod 2006-08-22 07:18:02 UTC
Aivars,

The fix here causes a reference cycle between the vte widget and the draw object, causing that neither is ever freed, causing Bug 351494.

I was going to use weak refs in draw to not keep the widget frome being finalized, but then I figured that I think we really should dispose and recreate draw in unrealize/realize, because the display may change in between.  That's the entire point of unrealize/realize.

Can you rework your font stuff to fix this?  We are almost in code freeze now, so I have to take the safes route to an stable release for GNOME 2.16 as soon as possible.  Thanks.
Comment 7 Behdad Esfahbod 2006-08-22 07:18:40 UTC
Please follow up in bug 351494.
Comment 8 Aivars Kalvans 2006-08-22 18:36:21 UTC
Created attachment 71392 [details] [review]
fix to fix

Hope this fixes the bug and does not introduce any new bugs.
Comment 9 Behdad Esfahbod 2006-08-22 18:45:10 UTC
Thanks.  Looks good.  I'll test and commit later.
Comment 10 Behdad Esfahbod 2006-08-23 04:02:07 UTC
2006-08-22  Behdad Esfahbod  <behdad@gnome.org>

        Bug 351494 – Gnome-terminal doesn't kills bash on tab close
        Patch from Aivars Kalvans

        * src/vte.c (vte_terminal_unrealize): Undo the change from bug 348814.
        Dispose draw in unrealize again, but also set has_fonts to FALSE.

Comment 11 Karsten Bräckelmann 2006-09-17 19:34:38 UTC
*** Bug 356434 has been marked as a duplicate of this bug. ***
Comment 12 Karsten Bräckelmann 2006-09-17 19:34:42 UTC
*** Bug 354993 has been marked as a duplicate of this bug. ***
Comment 13 Karsten Bräckelmann 2006-09-17 19:34:50 UTC
*** Bug 353599 has been marked as a duplicate of this bug. ***
Comment 14 Karsten Bräckelmann 2006-09-17 19:39:55 UTC
Just like bug 348979 (see comment 4) I believe the above 3 bugs to be duplicates as well.
Comment 15 Karsten Bräckelmann 2006-09-17 19:57:19 UTC
Shuffling dupes around...

Behdad, the patch in comment 10 has been committed before the Hard Code Freeze. Thus, this fix should be in g-t 2.16.0.

However, bug 354993 got the exact same stacktrace as bug 348979 -- using g-t 2.16.0. Something is fishy here...

Is bug 348979 really a duplicate of this one?


See bug 348979 comment 5.
Comment 16 André Klapper 2006-10-25 10:52:38 UTC
*** Bug 364882 has been marked as a duplicate of this bug. ***
Comment 17 André Klapper 2006-10-26 10:09:39 UTC
*** Bug 365152 has been marked as a duplicate of this bug. ***
Comment 18 André Klapper 2006-10-26 10:10:23 UTC
*** Bug 365178 has been marked as a duplicate of this bug. ***
Comment 19 Fabio Bonelli 2006-10-26 13:06:10 UTC
*** Bug 365260 has been marked as a duplicate of this bug. ***
Comment 20 André Klapper 2006-10-26 13:42:50 UTC
*** Bug 365251 has been marked as a duplicate of this bug. ***
Comment 21 Karsten Bräckelmann 2006-10-28 18:31:12 UTC
*** Bug 366162 has been marked as a duplicate of this bug. ***
Comment 22 Karsten Bräckelmann 2006-10-28 18:31:22 UTC
*** Bug 366138 has been marked as a duplicate of this bug. ***
Comment 23 Karsten Bräckelmann 2006-10-28 22:09:09 UTC
*** Bug 366518 has been marked as a duplicate of this bug. ***
Comment 24 Karsten Bräckelmann 2006-10-29 01:07:28 UTC
*** Bug 366585 has been marked as a duplicate of this bug. ***
Comment 25 Pedro de Medeiros 2007-01-23 02:44:55 UTC
*** Bug 399635 has been marked as a duplicate of this bug. ***
Comment 26 Bruno Boaventura 2007-01-27 12:09:20 UTC
*** Bug 401268 has been marked as a duplicate of this bug. ***
Comment 27 Gilles Dartiguelongue 2007-01-27 14:42:33 UTC
I believe bug #399635 and bug #401268 are not duplicates of this one. Looking at the backtrace of those bugs and say the 4 preceding duplicates, they look differente. 

I'm using gnome-terminal-2.17.90 with vte-0.15.2 (which is supposed to be new, shiny and possibly broken from what said the dev on planet.gnome.org)
Comment 28 Chris Wilson 2007-01-27 18:13:17 UTC
(In reply to comment #27)
> I believe bug #399635 and bug #401268 are not duplicates of this one. Looking
> at the backtrace of those bugs and say the 4 preceding duplicates, they look
> differente. 
> 
> I'm using gnome-terminal-2.17.90 with vte-0.15.2 (which is supposed to be new,
> shiny and possibly broken from what said the dev on planet.gnome.org)
> 

The effect and cause is identical - I reintroduced an old bug by not updating the invalidate in unrealize. This is fixed in SVN, see bug 400671 for the recent reoccurence.