receive various SIGSEGV`s with OpenMotif

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
receive various SIGSEGV`s with OpenMotif

Submitted by Anonymous on Tue, 11/07/2000 - 01:59. General Questions

This is a GUI application that works in other flavors of UNIX (Sun, HP, IBM, SGI, Compaq, ....) but I receive various SIGSEV`s with OpenMotif when some windows are closed down...

An example stacktrace from gdb is

Program received signal SIGSEGV, Segmentation fault.
chunk_free (ar_ptr=0xef4c85c7, p=0x403bfd48) at malloc.c3049
3049 malloc.c No such file or directory.
(gdb) where
#0 chunk_free (ar_ptr=0xef4c85c7, p=0x403bfd48) at malloc.c3049
#1 0x4032af9a in __libc_free (mem=0x403bfd50) at malloc.c3023
#2 0x401e22bd in XtFree () from /usr/X11R6/lib/libXt.so.6
#3 0x4013355f in Sort (list=0xbffff510, n_mem=10, horizontal=1 `01`,
layout=206 `?`) at TraversalI.c1718
#4 0x40133f28 in SortTabGraph (graph=0x83d8750, exclusive=0 `00`,
layout=206 `?`) at TraversalI.c2050
#5 0x40134337 in SortNodeList (trav_list=0x83262ac) at TraversalI.c2203
#6 0x40132941 in _XmNewTravGraph (trav_list=0x83262ac, top_wid=0x0,
init_current=0x8327120) at TraversalI.c1143
#7 0x401321e3 in _XmTraverseAway (list=0x83262ac, wid=0x8327120,
wid_is_control=1 `01`) at TraversalI.c635
#8 0x4012f5bd in XmeNavigChangeManaged (wid=0x8325bd0) at Traversal.c374
#9 0x400742b3 in ChangeManaged (wid=0x8325bd0) at DialogS.c674
#10 0x401f6ed9 in UnmanageChildren () from /usr/X11R6/lib/libXt.so.6
#11 0x401f6f96 in XtUnmanageChildren () from /usr/X11R6/lib/libXt.so.6
#12 0x401f706b in XtUnmanageChild () from /usr/X11R6/lib/libXt.so.6
#13 0x8087d5e in archiver_db_e_cancel_cb (w=0x8327120, client_data=0x0,
call_data=0xbffff8dc) at archiver-cb.c626
#14 0x401e3474 in XtCallCallbackList () from /usr/X11R6/lib/libXt.so.6
#15 0x400b9d17 in ActivateCommon (wid=0x8327120, event=0xbffffa9c, params=0x0,
num_params=0x82f0ed0) at PushB.c2223
#16 0x400b9b89 in Activate (wid=0x8327120, buttonEvent=0xbffffa9c, params=0x0,
---Type to continue, or q to quit---
num_params=0x82f0ed0) at PushB.c2150
#17 0x40210dd4 in HandleActions () from /usr/X11R6/lib/libXt.so.6
#18 0x4021174d in HandleComplexState () from /usr/X11R6/lib/libXt.so.6
#19 0x402117fe in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6
#20 0x401ee1ac in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6
#21 0x401eeaed in _XtDefaultDispatcher () from /usr/X11R6/lib/libXt.so.6
#22 0x401eed2d in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
#23 0x401ef10d in XtAppMainLoop () from /usr/X11R6/lib/libXt.so.6
#24 0x8084b57 in main (argc=1, argv=0xbffffb54) at xd_code.c9547

The only point in the stack trace in my code is #13

(gdb) up 13
#13 0x8087d5e in archiver_db_e_cancel_cb (w=0x8327120, client_data=0x0,
call_data=0xbffff8dc) at archiver-cb.c626
626 XtUnmanageChild(archiver_editor_form);

where

(gdb) print archiver_editor_form[0]
$2 = {core = {self = 0x83267f0, widget_class = 0x401be198, parent = 0x8325bd0,
xrm_name = 1739, being_destroyed = 0 `00`,
destroy_callbacks = 0x83d82a0, constraints = 0x0, x = 0, y = 0,
width = 400, height = 400, border_width = 0, managed = 0 `00`,
sensitive = 1 `01`, ancestor_sensitive = 1 `01`, event_table = 0x0,
tm = {translations = 0x82f6180, proc_table = 0x8326d08,
current_state = 0x0, lastEventTime = 0}, accelerators = 0x0,
border_pixel = 0, border_pixmap = 2, popup_list = 0x0, num_popups = 0,
name = 0x831ad48 "archiver_editor_form", screen = 0x82d70e8,
colormap = 34, window = 92274927, depth = 8, background_pixel = 29,
background_pixmap = 2, visible = 1 `01`, mapped_when_managed = 1 `01`}}

Has anyone seen this problem before?
BTW, how do I get an updated version of openmotif?
I am running version 2.1.30.

Thanks

Anonymous

I have no idea if this is in any way related, but it`s something that I learned from researching. If you use signal handlers in your code, and in those signal handlers you make X calls, it can cause your program to core dump. This is because if you were in the middle of an X call and you received a signal, and your code jumped into the signal handler and performed another X call, it gets confused. The suggestion is to use work procedures, but for X11 Release 6 (which is what I am using) they do not work. I have not found a solution that works yet. I do know at certain times though, you will see core dumps. It`s possible this could be your problem.