Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Is _XmStringIsCurrentCharset () causing Segmentation fault

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> Is _XmStringIsCurrentCharset () causing Segmentation fault Page: [1]
Login
Message << Older Topic   Newer Topic >>
Is _XmStringIsCurrentCharset () causing Segmentation fault - May 24, '06, 3:08:04 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
SFU-Interix-Motif issues. The program's older version works. But it crashes when it is compiled with new motif library and SFU-Interix, gcc.
This is continuation of other thread I started. The problem took a different direction from initially listed. I thought it would be more usefull to others who has the same problem.

Seems to me the problem is internal with the Motif library's being compatible with older versions.

I run gdb, then enter the comment run, and then picked the option on main gui, where the program was crashing.
It showed me popup, not fully filled up. Now I know how far that popup going.
"Program received signal SIGSEGV segmentation fault
0x77da7816 in strcmp,. from /usr/lib/libc.so.3.5 "

Then I enter <gdb> s. It crashed with this message:

"Program terminated with signal SIGSEGV segmentation fault.
The program no longer exists.
Cannot acces memory at address 0x0"

if I entered: <gdb> n,
I get this message:
"Single stepping until exit from function strcmp, which has no line number information"
Then I get
"Program terminated with signal SIGSEGV segmentation fault.
The program no longer exists.
Cannot acces memory at address 0x0"

Here is the stack.
I used <gdb. bt command to get this.
#0 0X77da7816 in strcmp() from /usr/lib/libc.so.3.5
#1 0x004e3076 in _XmStringIsCurrentCharset()
#2 0x00579acd in _XmRenderTableFindFallback ()
#3 0x00579960 in _XmRenditionMerge ()
#4 0x004d97a7 in OptLineMetrics ()
#5 0x004dfa3d in _render ()
#6 0x004df8d4 in _draw ()
#7 0x004e397f in XmStringDraw ()
#8 0x004bec45 in _XmRedisplayLabG ()
#9 0x004be326 in Redisplay ()
#10 0x00549283 in XmeRedisplayGadgets ()
#11 0x004b35a8 in Redisplay ()
#12 0x0060b03c in SendExposureEvent ()
#13 0x0060ae70 in ComplexExposure ()
#14 0x0060ab72 in XtDispatchEventToWidget ()
#15 0x0060b301 in _XtDefaultDispatcher ()
#16 0x0060b533 in XtDispatchEvent ()
#17 0x0060b76f in XtAppMainLoop ()
#18 0x0040222b in main (argc=1, argv=0x10730) at sheets.c:985
Post #: 1
RE: Is _XmStringIsCurrentCharset () causing Segmentatio... - May 25, '06, 10:20:15 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
> I run gdb, then enter the comment run, and then picked the option on main gui, ...

Just to clear this up, you must be running ddd on gdb, because gdb
has no GUI itself -- it's purely command line.

XmStringIsCurrentCharset() is called to compare a given character set with the current default.
One or the other strings is garbage. The default is from an env var "XmFALLBACK_CHARSET"
and/or with a combination of env var LANG. The given char set will come from somewhere in
your program. The stack won't clearly show where that comes from since it's largely a callback.

Are you trying to set or change the character set anywhere in your code?
Do you set the env vars XmFALLBBACK_CHARSET or LANG ? If so, as what?

(in reply to cerenaksu)
Post #: 2
RE: Is _XmStringIsCurrentCharset () causing Segmentatio... - May 30, '06, 10:54:15 AM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
Hello Rodney,
You misunderstood me. The GUI has nothing to do with gdb. It is my program creating gui. When I am running this program, I start it from command line and it runs in X-windows (terminal). Only one option in the gui is giving me this problem. I don't know if I wrote It before, the last time when i run the gdb, I put many break points and I got better idea. I will go back and do it again and document it. I will let you know how it goes.
Thanks

(in reply to Rodney)
Post #: 3
RE: Is _XmStringIsCurrentCharset () causing Segmentatio... - May 30, '06, 12:02:38 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
> You misunderstood me. The GUI has nothing to do with gdb. It is my program creating gui.

Okay, I was confused.
Good luck.

(in reply to cerenaksu)
Post #: 4
RE: Is _XmStringIsCurrentCharset () causing Segmentatio... - May 30, '06, 5:21:42 PM   
cerenaksu

 

Posts: 49
Joined: May 3, '06,
Status: offline
Dear Rodney,

I gdb my program again. This time I didn’t put to many break points and didn’t step into. Instead I entered ‘n’.
Here is the list I got:

update_lays ( ) ………….. This is one of my functions.
cur_space = model.space This is one of the statement in the program
mod-CB ( ) ………….. This is one of my functions.

None of the fallowing functions are mine:
XtCallCallbackList ( )
BtnUp ( )
ActivateCommonG ( )
InputDispatch ( )
_XmDispatchGadgetInput ( )
_XmMenuBtnUp ( )
HandleAction ( )
HandleSimpleStake ( )
_XtTranslateEvent ( )
XtDispatchEventToWidget ( )
_XtDefaultDispatcher ( )
_XtDispatchEvent ( )
XtAppMainLoop ( )

I did one more ‘n’ and I got this message:

Single stepping until exit from function XtAppMainLoop, program received signal SIGSEGV,
0x77da7816 in strcmp() from /usr/lib/libc.so.3.5.

I have another program which is a lot more complicated than this one. I needed to make a small change in that and recompile it. And I did. When I run the new program, I got a lot of the same warning:

“Warning Cannot find Callback list in XtAddCallBack ( ) “

I think I got this warning when I compiled the first program too, before I turned the warnings off.
Must this warning have something to do with my program’s crashing?

(in reply to Rodney)
Post #: 5
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> Is _XmStringIsCurrentCharset () causing Segmentation fault Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047