Subject: 2.4.3 core dump on solaris

From: "Nils Lohner" <[email-masked]>
Date: Thu, 11 Oct 2001 00:37:14 +0200

Hi guys...

I got a surprise today when running 2.4.3... it core dumped on me!!
THis happens repeatably when running an application here at work.  The
app is not necessarily well behaved, and uses openwindows libs etc.
Still, a coredump shouldn't happen.  It appears to be on teh startup
copyright splash window.

I've enclosed all the relevant info, and I can trace this if someone
tells me what to look for.

Note that I'm not 100% sure that gcc 3.0.1 generates good code yet on
solaris... I've got problems with mozilla and gimp so far.  Compilations
are OK, core dumps on startup.

Apologies for the long mail...

Thanks,
Nils.

~ > uname -a
SunOS topaze 5.7 Generic_106541-02 sun4u sparc
~ > gcc --version
3.0.1
~ > cat session.fvwm2-2001-10-11 
-- Session log created Wed Oct 10 19:31:55 MET DST 2001
OpenWindows Desktop Login
using xinitrc file: /u/lohner/.xinitrc
/u/lohner/.xinitrc[52]: 2137 Segmentation Fault(coredump)
~ > grep -v '#' .xinitrc
/sup/bin/rxvt -C -title console -geometry -0-0 &
/sup/bin/fvwm2
~ > cd /sup/build/fvwm-2.4.3/fvwm/
/sup/build/fvwm-2.4.3/fvwm > gdb fvwm2 ~/core-fvwm2-2001-10-11 
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.7"...
Core was generated by `/sup/bin/fvwm2'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /sup/lib/libXpm.so.4.11...done.
Loaded symbols for /sup/lib/libXpm.so.4.11
Reading symbols from /usr/openwin/lib/libSM.so.6...done.
Loaded symbols for /usr/openwin/lib/libSM.so.6
Reading symbols from /usr/openwin/lib/libICE.so.6...done.
Loaded symbols for /usr/openwin/lib/libICE.so.6
Reading symbols from /usr/openwin/lib/libXext.so.0...done.
Loaded symbols for /usr/openwin/lib/libXext.so.0
Reading symbols from /usr/openwin/lib/libX11.so.4...done.
Loaded symbols for /usr/openwin/lib/libX11.so.4
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
#0  0x4ffb0 in setup_window_placement (tmp_win=0xae6a0, pstyle=0xffbeebb0)
    at add_window.c:578
578         MergeCmdLineResources(
(gdb) where
#0  0x4ffb0 in setup_window_placement (tmp_win=0xae6a0, pstyle=0xffbeebb0)
    at add_window.c:578
#1  0x519ec in AddWindow (w=1, ReuseWin=0xae6a0) at add_window.c:1426
#2  0x33b5c in HandleMapRequestKeepRaised (KeepRaised=0, ReuseWin=0x0)
    at events.c:1040
#3  0x36514 in DispatchEvent (preserve_Tmp_win=0) at events.c:2785
#4  0x365f0 in HandleEvents () at events.c:2838
#5  0x579b0 in main (argc=2, argv=0x7ec00) at fvwm.c:718
(gdb) 

(gdb) l
573       {
574         /* Get global X resources */
575         MergeXResources(dpy, &db, False);
576     
577         /* command line takes precedence over all */
578         MergeCmdLineResources(
579           &db, table, 4, client_argv[0], &client_argc, client_argv, True);
580     
581         /* Now parse the database values: */
582         if (GetResourceString(db, "desk", client_argv[0], &rm_value) &&
(gdb) p &db
$5 = (XrmDatabase *) 0xffbeead4
(gdb) p table
$6 = {{option = 0x6af98 "-workspacf", specifier = 0x6afa8 "*junk", 
    argKind = XrmoptionSepArg, value = 0x0}, {option = 0x6afb0 "-workspace", 
    specifier = 0x6afc0 "*desk", argKind = XrmoptionSepArg, value = 0x0}, {
    option = 0x6afc8 "-xrn", specifier = 0x0, argKind = XrmoptionResArg, 
    value = 0x0}, {option = 0x6afd0 "-xrm", specifier = 0x0, 
    argKind = XrmoptionResArg, value = 0x0}}
(gdb) p client_argv[0]
Cannot access memory at address 0x0
(gdb) p &client_argc
$7 = (int *) 0xffbeead8
(gdb) p client_argv
$8 = (char **) 0x0

(gdb) p *tmp_win
$2 = {name = 0x9fcc8 "System & Copyright Information", icon_name = 0x0, 
  next = 0x0, prev = 0xa3580, stack_next = 0xa3580, stack_prev = 0x819e8, 
  w = 67108962, old_bw = 0, frame = 0, decor_w = 0, Parent = 0, title_w = 0, 
  sides = {0, 0, 0, 0}, corners = {0, 0, 0, 0}, flags = {common = {is_sticky = 0, 
      has_icon_font = 1, has_window_font = 1, s = {do_circulate_skip = 0, 
        do_circulate_skip_icon = 0, do_circulate_skip_shaded = 0, 
        do_grab_focus_when_created = 0, do_grab_focus_when_transient_created = 1, 
        do_iconify_window_groups = 0, do_ignore_gnome_hints = 0, 
        do_ignore_icon_boxes = 0, do_ignore_restack = 0, 
        do_use_window_group_hint = 0, do_lower_transient = 1, 
        do_not_show_on_map = 0, do_not_pass_click_focus_click = 0, 
        do_not_raise_click_focus_click = 1, do_raise_mouse_focus_click = 0, 
        do_raise_transient = 1, do_resize_opaque = 0, do_shrink_windowshade = 0, 
        do_stack_transient_parent = 1, do_start_iconic = 0, 
        do_window_list_skip = 0, focus_mode = 2, has_bottom_title = 0, 
        has_depressable_border = 0, has_mwm_border = 1, has_mwm_buttons = 0, 
        has_mwm_override = 0, has_no_icon_title = 0, has_override_size = 0, 
        has_stippled_title = 0, icon_override = 0, is_fixed = 0, 
        is_icon_sticky = 0, is_icon_suppressed = 0, is_lenient = 1, 
        use_icon_position_hint = 1}}, does_wm_delete_window = 1, 
    does_wm_take_focus = 1, do_delete_icon_moved = 0, do_iconify_after_map = 0, 
    do_reuse_destroyed = 0, has_border = 0, has_icon_changed = 0, has_title = 1, 
    is_decor_changed = 0, is_deiconify_pending = 0, is_focused_on_other_desk = 0, 
    is_focus_change_broadcast_pending = 0, is_fully_visible = 0, is_iconified = 0, 
    is_iconified_by_parent = 0, is_icon_entered = 0, is_icon_font_loaded = 1, 
    is_icon_moved = 0, is_icon_ours = 0, is_icon_shaped = 0, is_icon_unmapped = 0, 
    is_in_transient_subtree = 0, is_mapped = 0, is_map_pending = 0, 
    is_maximized = 0, is_name_changed = 0, is_partially_visible = 0, 
    is_pixmap_ours = 0, is_placed_wb3 = 0, is_placed_by_fvwm = 0, 
    is_scheduled_for_destroy = 0, is_scheduled_for_raise = 0, is_size_inc_set = 0, 
    is_style_deleted = 0, is_transient = 1, is_window_drawn_once = 0, 
    is_viewport_moved = 0, is_window_being_moved_opaque = 0, 
    is_window_border_drawn = 0, is_window_font_loaded = 1, is_window_shaded = 0, 
    using_default_icon_font = 0, using_default_window_font = 0, 
    was_icon_hint_provided = 0, was_icon_name_provided = 0}, nr_left_buttons = 3, 
  nr_right_buttons = 0, button_w = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
  decor = 0x8ab10, icon_w = 0, icon_pixmap_w = 0, wShaped = 0, 
  title_background_pixmap = 0, button_background_pixmap = {0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0}, boundary_width = 5, corner_width = 22, visual_corner_width = 0, 
  title_g = {x = 0, y = 0, width = 0, height = 17}, title_top_height = 17, 
  icon_g = {x = 0, y = 0, width = 0, height = 0}, icon_xl_loc = 0, 
  icon_t_width = 0, icon_p_width = 0, icon_p_height = 0, iconPixmap = 0, 
  iconDepth = 0, icon_maskPixmap = 0, title_font = {font = 0xa2d30, height = 14, 
    y = 11}, icon_font = {font = 0xa2e50, height = 14, y = 11}, attr = {x = 406, 
    y = 198, width = 340, height = 504, border_width = 0, depth = 24, 
    visual = 0x83e70, root = 37, class = 1, bit_gravity = 1, win_gravity = 1, 
    backing_store = 0, backing_planes = 4294967295, backing_pixel = 0, 
    save_under = 0, colormap = 33, map_installed = 1, map_state = 0, 
    all_event_masks = 4325376, your_event_mask = 0, do_not_propagate_mask = 0, 
    override_redirect = 0, screen = 0x86340}, hints = {flags = 12, x = 0, y = 0, 
    width = 331, height = 272, min_width = 1, min_height = 1, max_width = 32767, 
    max_height = 32767, width_inc = 1, height_inc = 1, min_aspect = {x = 0, 
      y = 0}, max_aspect = {x = 0, y = 0}, base_width = 0, base_height = 0, 
    win_gravity = 1}, wmhints = 0xa2d00, class = {
    res_name = 0xa3328 "imagecontrol", res_class = 0xa3310 "Imagecontrol"}, 
  Desk = 0, FocusDesk = 0, DeIconifyDesk = 0, transientfor = 37, 
  mini_pixmap_file = 0x0, mini_icon = 0x0, icon_bitmap_file = 0x0, frame_g = {
    x = 0, y = 0, width = 350, height = 531}, normal_g = {x = 0, y = 0, width = 0, 
    height = 0}, max_g = {x = 0, y = 0, width = 0, height = 0}, max_g_defect = {
    width = 0, height = 0}, max_offset = {x = 0, y = 0}, mwm_hints = 0xa0658, 
  ol_hints = 132, functions = 36, cmap_windows = 0x0, number_cmap_windows = 0, 
  colors = {fore = 0, back = 4620980, hilight = 8303841, shadow = 3161932}, 
  hicolors = {fore = 16776960, back = 9118290, hilight = 14684784, 
    shadow = 3677738}, border_colors = {fore = 0, back = 4620980, 
    hilight = 8303841, shadow = 3161932}, border_hicolors = {fore = 0, 
    back = 9118290, hilight = 14684784, shadow = 3677738}, buttons = 0, 
  IconBoxes = 0x92a58, default_layer = 4, layer = 4, max_window_width = 32767, 
  max_window_height = 32767, shade_anim_steps = 0, grabbed_buttons = 0 '\000', 
  pscratch = 0x0}

(gdb) p *pstyle
$4 = {next = 0x0, prev = 0x0, name = 0x0, icon_name = 0x0, 
  mini_icon_name = 0x95e00 "mini-bx2.xpm", decor_name = 0x83c60 "default-decor", 
  icon_font = 0xa9ce8 "-adobe-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*", 
  window_font = 0x912d0 "-adobe-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*", 
  fore_color_name = 0x9a9d8 "Black", back_color_name = 0xa9620 "SteelBlue", 
  fore_color_name_hi = 0x9a968 "Yellow", 
  back_color_name_hi = 0x914f0 "VioletRed4", colorset = 0, colorset_hi = 0, 
  border_colorset = 0, border_colorset_hi = 0, border_width = 5, handle_width = 5, 
  layer = 0, start_desk = 0, start_page_x = 0, start_page_y = 0, start_screen = 0, 
  max_window_width = 0, max_window_height = 0, shade_anim_steps = 0, 
  icon_boxes = 0x92a58, flags = {common = {is_sticky = 0, has_icon_font = 1, 
      has_window_font = 1, s = {do_circulate_skip = 0, do_circulate_skip_icon = 0, 
        do_circulate_skip_shaded = 0, do_grab_focus_when_created = 0, 
        do_grab_focus_when_transient_created = 1, do_iconify_window_groups = 0, 
        do_ignore_gnome_hints = 0, do_ignore_icon_boxes = 0, 
        do_ignore_restack = 0, do_use_window_group_hint = 0, 
        do_lower_transient = 1, do_not_show_on_map = 0, 
        do_not_pass_click_focus_click = 0, do_not_raise_click_focus_click = 1, 
        do_raise_mouse_focus_click = 0, do_raise_transient = 1, 
        do_resize_opaque = 0, do_shrink_windowshade = 0, 
        do_stack_transient_parent = 1, do_start_iconic = 0, 
        do_window_list_skip = 0, focus_mode = 2, has_bottom_title = 0, 
        has_depressable_border = 0, has_mwm_border = 1, has_mwm_buttons = 0, 
        has_mwm_override = 0, has_no_icon_title = 0, has_override_size = 0, 
        has_stippled_title = 0, icon_override = 0, is_fixed = 0, 
        is_icon_sticky = 0, is_icon_suppressed = 0, is_lenient = 1, 
        use_icon_position_hint = 1}}, do_decorate_transient = 1, 
    placement_mode = 0, do_save_under = 0, do_start_lowered = 0, 
    has_border_width = 1, has_color_back = 1, has_color_fore = 1, 
    has_color_back_hi = 1, has_color_fore_hi = 1, has_decor = 1, 
    has_handle_width = 1, has_icon = 0, has_icon_boxes = 1, 
    has_max_window_size = 0, has_window_shade_steps = 0, has_mini_icon = 1, 
    has_mwm_decor = 1, has_mwm_functions = 1, has_no_border = 0, has_no_title = 0, 
    has_ol_decor = 0, is_button_disabled = 0, use_backing_store = 0, 
    use_parent_relative = 0, use_colorset = 0, use_colorset_hi = 0, 
    use_border_colorset = 0, use_border_colorset_hi = 0, use_layer = 0, 
    use_no_pposition = 1, use_no_usposition = 0, use_no_transient_pposition = 0, 
    use_no_transient_usposition = 0, use_start_on_desk = 0, 
    use_start_on_page_for_transient = 0, use_start_on_screen = 0, 
    manual_placement_honors_starts_on_page = 0, capture_honors_starts_on_page = 0, 
    recapture_honors_starts_on_page = 0}, flag_mask = {common = {is_sticky = 0, 
      has_icon_font = 1, has_window_font = 1, s = {do_circulate_skip = 0, 
        do_circulate_skip_icon = 0, do_circulate_skip_shaded = 0, 
        do_grab_focus_when_created = 1, do_grab_focus_when_transient_created = 1, 
        do_iconify_window_groups = 0, do_ignore_gnome_hints = 0, 
        do_ignore_icon_boxes = 1, do_ignore_restack = 0, 
        do_use_window_group_hint = 0, do_lower_transient = 1, 
        do_not_show_on_map = 0, do_not_pass_click_focus_click = 0, 
        do_not_raise_click_focus_click = 1, do_raise_mouse_focus_click = 0, 
        do_raise_transient = 1, do_resize_opaque = 0, do_shrink_windowshade = 0, 
        do_stack_transient_parent = 1, do_start_iconic = 0, 
        do_window_list_skip = 0, focus_mode = 3, has_bottom_title = 0, 
        has_depressable_border = 0, has_mwm_border = 1, has_mwm_buttons = 0, 
        has_mwm_override = 0, has_no_icon_title = 0, has_override_size = 0, 
        has_stippled_title = 0, icon_override = 0, is_fixed = 0, 
        is_icon_sticky = 0, is_icon_suppressed = 1, is_lenient = 1, 
        use_icon_position_hint = 1}}, do_decorate_transient = 1, 
    placement_mode = 7, do_save_under = 0, do_start_lowered = 0, 
    has_border_width = 1, has_color_back = 1, has_color_fore = 1, 
    has_color_back_hi = 1, has_color_fore_hi = 1, has_decor = 1, 
    has_handle_width = 1, has_icon = 0, has_icon_boxes = 1, 
    has_max_window_size = 0, has_window_shade_steps = 0, has_mini_icon = 1, 
    has_mwm_decor = 1, has_mwm_functions = 1, has_no_border = 1, has_no_title = 1, 
    has_ol_decor = 0, is_button_disabled = 0, use_backing_store = 0, 
    use_parent_relative = 0, use_colorset = 1, use_colorset_hi = 1, 
    use_border_colorset = 0, use_border_colorset_hi = 0, use_layer = 0, 
    use_no_pposition = 1, use_no_usposition = 0, use_no_transient_pposition = 0, 
    use_no_transient_usposition = 0, use_start_on_desk = 0, 
    use_start_on_page_for_transient = 0, use_start_on_screen = 0, 
    manual_placement_honors_starts_on_page = 0, capture_honors_starts_on_page = 0, 
    recapture_honors_starts_on_page = 0}, change_mask = {common = {is_sticky = 0, 
      has_icon_font = 0, has_window_font = 0, s = {do_circulate_skip = 0, 
        do_circulate_skip_icon = 0, do_circulate_skip_shaded = 0, 
        do_grab_focus_when_created = 0, do_grab_focus_when_transient_created = 0, 
        do_iconify_window_groups = 0, do_ignore_gnome_hints = 0, 
        do_ignore_icon_boxes = 0, do_ignore_restack = 0, 
        do_use_window_group_hint = 0, do_lower_transient = 0, 
        do_not_show_on_map = 0, do_not_pass_click_focus_click = 0, 
        do_not_raise_click_focus_click = 0, do_raise_mouse_focus_click = 0, 
        do_raise_transient = 0, do_resize_opaque = 0, do_shrink_windowshade = 0, 
        do_stack_transient_parent = 0, do_start_iconic = 0, 
        do_window_list_skip = 0, focus_mode = 0, has_bottom_title = 0, 
        has_depressable_border = 0, has_mwm_border = 0, has_mwm_buttons = 0, 
        has_mwm_override = 0, has_no_icon_title = 0, has_override_size = 0, 
        has_stippled_title = 0, icon_override = 0, is_fixed = 0, 
        is_icon_sticky = 0, is_icon_suppressed = 0, is_lenient = 0, 
        use_icon_position_hint = 0}}, do_decorate_transient = 0, 
    placement_mode = 0, do_save_under = 0, do_start_lowered = 0, 
    has_border_width = 0, has_color_back = 0, has_color_fore = 0, 
    has_color_back_hi = 0, has_color_fore_hi = 0, has_decor = 0, 
    has_handle_width = 0, has_icon = 0, has_icon_boxes = 0, 
    has_max_window_size = 0, has_window_shade_steps = 0, has_mini_icon = 0, 
    has_mwm_decor = 0, has_mwm_functions = 0, has_no_border = 0, has_no_title = 0, 
    has_ol_decor = 0, is_button_disabled = 0, use_backing_store = 0, 
    use_parent_relative = 0, use_colorset = 0, use_colorset_hi = 0, 
    use_border_colorset = 0, use_border_colorset_hi = 0, use_layer = 0, 
    use_no_pposition = 0, use_no_usposition = 0, use_no_transient_pposition = 0, 
    use_no_transient_usposition = 0, use_start_on_desk = 0, 
    use_start_on_page_for_transient = 0, use_start_on_screen = 0, 
    manual_placement_honors_starts_on_page = 0, capture_honors_starts_on_page = 0, 
    recapture_honors_starts_on_page = 0}, has_style_changed = 0}

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 14 Oct 2001 22:40:24 +0200

> Apologies for the long mail...

Rather long and complete than short and without the important
information :-)

> #0  0x4ffb0 in setup_window_placement (tmp_win=0xae6a0, pstyle=0xffbeebb0)
...
> 579           &db, table, 4, client_argv[0], &client_argc, client_argv, True);
...
> Cannot access memory at address 0x0

So, the client_argv array returned by XGetCommand was empty.  This
can easily be caught althogh I don't understand how this can
happen.  I'll commit a fix soon.  Please try it out and tell me
it it helps.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]