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 314452 - Latest GTK+ locks up gnome-terminal
Latest GTK+ locks up gnome-terminal
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.8.x
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
: 314597 314677 315167 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-25 06:56 UTC by Joe Marcus Clarke
Modified: 2011-02-04 16:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
correctly initiatialize gdkscreen (1.79 KB, patch)
2005-08-25 15:58 UTC, Frederic Crozat
none Details | Review

Description Joe Marcus Clarke 2005-08-25 06:56:35 UTC
Please describe the problem:
The patch to gdkscreen.c that initializes the screen resolution to -1 is causing
gnome-terminal to lock up when it starts if the locale is not set or set to "C".
 If I change gdk_screen_init() to set the resolution to 0, the problem goes away:

static void
gdk_screen_init (GdkScreen *screen)
{
    screen->resolution = 0;
}

I'm fairly certain this isn't the correct fix, and I think something is
confusing either pango or cairo when the resolution is -1, but I haven't been
able to figure out what that is yet.

Steps to reproduce:
1. Install GTK+ 2.8.1 or 2.8.2
2. Start gnome-terminal without setting LANG
3. The terminal window appears but no toolbars, scrollbars, or terminal text is
drawn.


Actual results:
See above.

Expected results:
The terminal should function normally.

Does this happen every time?
Yes.

Other information:
I also captured a stack trace while it's hung.  I don't think it's very useful.
 I have done numerous tests, and that resolution initialization seems to be the
problem.

Here is the stack trace:

(gdb) bt
  • #0 pthread_testcancel
    from /usr/lib/libpthread.so.2
  • #1 pthread_mutexattr_init
    from /usr/lib/libpthread.so.2
  • #2 pthread_setconcurrency
    from /usr/lib/libpthread.so.2
  • #3 pthread_mutexattr_init
    from /usr/lib/libpthread.so.2
  • #4 __error
    from /usr/lib/libpthread.so.2
  • #5 _pthread_mutex_trylock
    from /usr/lib/libpthread.so.2
  • #6 _pthread_mutex_lock
    from /usr/lib/libpthread.so.2
  • #7 _spinlock
    from /usr/lib/libpthread.so.2
  • #8 _UTF8_init
    from /lib/libc.so.6
  • #9 malloc
    from /lib/libc.so.6
  • #10 pthread_attr_init
    from /usr/lib/libpthread.so.2
  • #11 sigaction
    from /usr/lib/libpthread.so.2
  • #12 pthread_mutexattr_init
    from /usr/lib/libpthread.so.2
  • #13 pthread_create
    from /usr/lib/libpthread.so.2
  • #14 g_thread_create_posix_impl
    at gthread-posix.c line 342
  • #15 IA__g_thread_create_full
    at gthread.c line 576
  • #16 g_child_watch_source_init_multi_threaded
    at gmain.c line 3628
  • #17 g_child_watch_source_init
    at gmain.c line 3650
  • #18 IA__g_child_watch_source_new
    at gmain.c line 3700
  • #19 IA__g_child_watch_add_full
    at gmain.c line 3743
  • #20 vte_reaper_add_child
    at reaper.c line 132
  • #21 _vte_terminal_fork_basic
    at vte.c line 7285
  • #22 vte_terminal_fork_command
    at vte.c line 7359
  • #23 terminal_widget_fork_command
    at terminal-widget-vte.c line 565
  • #24 terminal_screen_launch_child
    at terminal-screen.c line 1111
  • #25 terminal_app_new_terminal
  • #26 new_terminal_with_options
    at terminal.c line 1432
  • #27 main
    at terminal.c line 1758

Comment 1 Frederic Crozat 2005-08-25 15:58:42 UTC
Created attachment 51324 [details] [review]
correctly initiatialize gdkscreen

The attached patch fixes the crash by correctly initializing gdk screen
instance. I've also used double value for initialising resolution.
Comment 2 Sven Neumann 2005-08-25 16:04:34 UTC
There's really nothing wrong about using gdk_screen_init (GdkScreen *screen).
Passing GTypeInstance and the class pointer is of course more correct, but a
rather uncommon thing to do.
Comment 3 Frederic Crozat 2005-08-25 16:22:33 UTC
sorry, I'm not a gobject expert, so I wrote my patch by the book..

My first version was usin gdk_screen_init (GdkScreen *screen) :)
Comment 4 Joe Marcus Clarke 2005-08-25 16:30:25 UTC
The looks like one more instance where you need to use a double in
gdk_screen_get_resolution_libgtk_only().
Comment 5 Matthias Clasen 2005-08-25 18:14:49 UTC
Fixed by 

2005-08-25  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init
	as instance_init, not base_init! (#314452, Fix from Frederic
	Crozat,	reported by Joe Marcus Clarke). Trivial cleanup: use -1.
	rather than 1 for a negative flag value.
Comment 6 Owen Taylor 2005-08-26 17:21:58 UTC
*** Bug 314597 has been marked as a duplicate of this bug. ***
Comment 7 James "Doc" Livingston 2005-08-28 03:19:40 UTC
*** Bug 314677 has been marked as a duplicate of this bug. ***
Comment 8 Sven Neumann 2005-09-03 06:27:00 UTC
*** Bug 315167 has been marked as a duplicate of this bug. ***