segmentation violation in ncurses

segmentation violation in ncurses

Post by Eric Kleinber » Wed, 24 Nov 1999 04:00:00



I am porting a C application to COL 2.2 which has run successfully under AIX
and SCO OpenServer. When the app exits it calls "reset_shell_mode" and then
it gets a segmentation violation at putc(). Run "bt" (backtrace) in the gdb
de* shows these functions on the stack:

   putc
   tputs
   putp
   _nc_keypad
   reset_shell_mode
   etc. etc.

Is there anyway to debug ncurses to see why it is generating a segmentation
violation; or perhaps my app is corrupting ncurses memory?? Any suggestions
would be appreciated!

Thanks

 
 
 

segmentation violation in ncurses

Post by Eric Kleinber » Thu, 25 Nov 1999 04:00:00


As an update, I compiled with libncurses_g.a which is the debug version
of libncurses but no more information than before was forthcoming.


Quote:> I am porting a C application to COL 2.2 which has run successfully under
AIX
> and SCO OpenServer. When the app exits it calls "reset_shell_mode" and
then
> it gets a segmentation violation at putc(). Run "bt" (backtrace) in the
gdb
> de* shows these functions on the stack:

>    putc
>    tputs
>    putp
>    _nc_keypad
>    reset_shell_mode
>    etc. etc.

> Is there anyway to debug ncurses to see why it is generating a
segmentation
> violation; or perhaps my app is corrupting ncurses memory?? Any
suggestions
> would be appreciated!

> Thanks


 
 
 

segmentation violation in ncurses

Post by Eric Kleinber » Sat, 27 Nov 1999 04:00:00


This is an update to my previous email, trying to figure out the
segmentation violation in ncurses.

I was finally able to get ncurses-4.2 compiled. I re-linked my C app to the
libncurses-g.a debug version. Now I find that the
segmentation violation occurs in reset_shell_mode at the function
"_nc_outch(int ch)" at the line "putc(ch,OUTPUT)".
OUTPUT is defined as a MACRO using SP which is supposed to be defined as
SCREEN * SP. One problem I have with
gdb is my C application defines SP as a global "char *SP" so I cannot
display the ncurses "SP" properly.

Is there a way to distinguish my SP from ncurses' SP in gdb?

 
 
 

segmentation violation in ncurses

Post by T.E.Dicke » Sun, 28 Nov 1999 04:00:00



> I was finally able to get ncurses-4.2 compiled. I re-linked my C app to the
> libncurses-g.a debug version. Now I find that the
> segmentation violation occurs in reset_shell_mode at the function
> "_nc_outch(int ch)" at the line "putc(ch,OUTPUT)".
> OUTPUT is defined as a MACRO using SP which is supposed to be defined as
> SCREEN * SP. One problem I have with
> gdb is my C application defines SP as a global "char *SP" so I cannot
> display the ncurses "SP" properly.
> Is there a way to distinguish my SP from ncurses' SP in gdb?

not exactly - but you can look for conflicting symbols by asking the linker
to tell you:

        export LDFLAGS="-Xlinker -warn-common"

--
Thomas E.*ey

http://www.veryComputer.com/

 
 
 

1. Ins key in ncurses applications?

I have compiled MouseLess Commander for Linux.
It should mark (tag) the selected file when I press Ins key but it doesnt.
C-t works ok

It uses ncurses' KEY_IC but when I press Ins key the only thing
I get is something like  ]]2~  in the command line

I dont know if its a problem of my terminfo database or my
ncurses package (1.8.5)

I have also tested KEY_IL, KEY_EIC and many others
KEY_DC has no problem but ncurses doesnt seem to know I have an Ins key

BTW, emacs recognizes Ins key as insertkey

Has anybody been successful using Ins key in ncurses applications?

thanks in advance

Jose Manuel

2. Dynamic DNS server IP

3. INIT: PANIC: segmentation violation! giving up..

4. installing w/o CD

5. Debuging Segmentation Violation Fault

6. Modem? Do I have any chance? (rockwell,PCI,etc)

7. PANIC: INIT: segmentation violation ...

8. Dual Motherboards

9. segmentation violation

10. JDK 1.1.1 - segmentation violation

11. lpsfilt - Segmentation Violation

12. BUG: segmentation violation?

13. WordPerfect6/7 and libc (segmentation violations)