comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to debug seg fault.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to debug seg fault. [message #48063] Tue, 21 March 2006 08:44
Jonathan Joseph is currently offline  Jonathan Joseph
Messages: 69
Registered: September 1998
Member
I spent much of yesterday making slight tweaks and trying to pinpoint
the problem. It was actually not until I quit my GUI application that
IDL would crash with a segmentation fault (or sometimes a bus error).

I also upgraded to 6.2, but surprisingly, that didn't help.

One other strange thing was that I run software on two slightly
different machines (a sun blade1000 and a sun blade2000 both running the
same OS and sharing disks so that they were using exactly the same IDL
executable and code paths), and I would get the crash on the blade1000
but not on the blade2000.

In the end, I found that I could reproduce the crash only when I had
left some text selected (usually it had to be down past the first 50
lines) in a large scrollable text widget in a window that was used to
display a PDS image label.

I eventually "solved" the problem by putting a line of code in the
widget cleanup routine that deselected any text that might be selected
in the text widget.

I can no longer reproduce the crash at any rate.

I'm wondering if there might be some memory issue buried in the IDL code
for selections in text widgets that has the ability to cause such a
problem under just the right conditions.

At any rate, the problem is gone for now, but if this scenerio rings a
bell for anyone, I'd like to hear about it.

Thanks.

-Jonathan
Re: How to debug seg fault. [message #48067 is a reply to message #48063] Tue, 21 March 2006 00:52 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
This may or may not be related... but we had IDL hanging (not
seg-faulting, though) on LINUX with GUI widgets because of some
kind of X synch problem with errors like:

%Xlib: unexpected async reply

Similarly, adding print statements solved the problem (probably
because causing some delays in the timings?).

Ciao,
Paolo

Jonathan Joseph wrote:
>
> I'm running IDL 6.0 on a sun workstation under solaris 8.
>
> I have a pretty elaborite GUI program, that with the same set of
> actions, I can reproducibly cause IDL to terminate with a segmentation
> fault.
>
> I'm trying to debug this problem, but it's almost impossible because if
> I add a print statement to the code, I no longer get the crash.
> Likewise, if I step through in IDLDE, I don't get the crash.
>
> This seems like a classic memory access problem, but I can't figure out
> how to pinpoint the problem - which may be having other unseen
> ramifications.
>
> Any advice appreciated.
>
> Thanks.
>
> -Jonathan
Re: How to debug seg fault. [message #48075 is a reply to message #48067] Mon, 20 March 2006 12:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jonathan Joseph writes:

> I'm running IDL 6.0 on a sun workstation under solaris 8.
>
> I have a pretty elaborite GUI program, that with the same set of
> actions, I can reproducibly cause IDL to terminate with a segmentation
> fault.
>
> I'm trying to debug this problem, but it's almost impossible because if
> I add a print statement to the code, I no longer get the crash.
> Likewise, if I step through in IDLDE, I don't get the crash.
>
> This seems like a classic memory access problem, but I can't figure out
> how to pinpoint the problem - which may be having other unseen
> ramifications.

I've seen this problem before! I just can't remember
anything about it. :-(

Is it possible it has to do with temporary variables?

I'm laying brick today. This will give me something to
think about other than how much my back hurts. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to exchange variable between modal dialog and the main window?
Next Topic: Re: Database vs. File Parsing

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:05:04 PDT 2025

Total time taken to generate the page: 0.00587 seconds