tags:

views:

80

answers:

3

I have some legacy C code that I recently compiled on Linux. On the original HPUX the application opens and closes multiple curses windows. On the Linux box it can handle one window, but if I close that window, it crashes the program with an error message of "Aborted". Any ideas?

+3  A: 

Yes. Change your options with ulimit(1) so when it aborts you save a core dump. Then look at the core dump with gdb(1) to find out where it's aborting and get back to us.

Charlie Martin
Welcome to... Program Name Version 1.0Program received signal SIGSEGV, Segmentation fault.[Switching to Thread 4131518144 (LWP 15705)]0x0804dc0c in wclose ()(gdb) where#0 0x0804dc0c in wclose ()#1 0x0804d5a7 in WelcomeSplash ()#2 0x0804cf96 in main ()
Jeff
how do I interpret the 0x0804dc0c to translate to a specific code line? (wclose is a function call in custom code)
Jeff
Recompile the program with debugging turned on so the symbol table is still there (look at the flags for gcc) and it will give you the actual function name that is dying. but Jonathan has it.
Charlie Martin
+2  A: 

Given the comments to Charlie Martin's response, it would appear that you are failing to open your window and are then closing a non-open window, with dramatic results. Look to check the return codes of the Curses initialization function(s) and the window open call.

Jonathan Leffler
A: 

Discovered that it was the touchwin command that was causing it to fail. Removing that line of code seems to have no negative consequences. :-) Thanks all for the help. Up-votes all around.

Jeff