The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Clearing screen in Python using curses? sadistik_exec High Level Programming 4 08-19-2008 09:18 AM
Why not a segmentation fault?? lagigliaivan High Level Programming 22 05-21-2008 12:07 PM
Segmentation fault big123456 Linux 0 07-20-2007 06:01 AM
segmentation fault rockgal High Level Programming 8 12-05-2006 12:16 PM
Segmentation Fault compbug UNIX for Dummies Questions & Answers 3 04-21-2006 11:43 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-09-2009
openfly openfly is offline
Banned
  
 

Join Date: Oct 2009
Posts: 4
python curses , segmentation fault on screen.addstr()

I have an application that's running curses on a weird linux environment... a lot of the base paths of stuff are non standard. But other screen applications run fine.

I've set TERMINFO_DIRS and gotten the ncurses application to run. Using a nonstandard terminfo path.

I see windows draw up fine, and when I remove addstr() function calls it runs properly... even keyboard interaction.

It goes to segmentation fault whenever I attempt to print string text to a window. ( screen.addstr() )

I thought it was a LOCALE issue, but I've been unable to make it work toggling environment vars. Also in strace I see the locale info loading just fine.

I compared my strace to an strace from top to see if I could spot any inconsistences and I saw nothing.

Here's a tail end of the strace output...


Code:
open("/usr/lib/locale/en_US/LC_TIME", O_RDONLY) = 3
fstat(3, {st_dev=makedev(104, 1), st_ino=42649592, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=2456, st_atime=2009/10/09-20:18:08, st_mtime=2007/09/12-17:11:21, st_ctime=2009/02/19-22:20:38}) = 0
mmap(NULL, 2456, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a96417000
close(3)                                = 0
open("/usr/lib/locale/en_US/LC_NUMERIC", O_RDONLY) = 3
fstat(3, {st_dev=makedev(104, 1), st_ino=42649589, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=59, st_atime=2009/10/09-20:18:08, st_mtime=2007/09/12-17:11:09, st_ctime=2009/02/19-22:20:38}) = 0
mmap(NULL, 59, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a96418000
close(3)                                = 0
futex(0x603b30, FUTEX_WAKE, 1)          = 0
futex(0x603b30, FUTEX_WAKE, 1)          = 0
futex(0x603b30, FUTEX_WAKE, 1)          = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2506, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
access("/home/user/.terminfo/v/vt100", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/opsware/ogfsutils/share/terminfo/v/vt100", R_OK) = 0
open("/opt/opsware/ogfsutils/share/terminfo/v/vt100", O_RDONLY) = 3
read(3, "\32\1,\0&\0\7\0\16\1\"\2", 12) = 12
read(3, "vt100|vt100-am|dec vt100 (w/adva"..., 44) = 44
read(3, "\0\1\0\0\1\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\1\0\1\0\0\0\0\0\0\0\0\0"..., 38) = 38
read(3, "P\0\10\0\30\0\377\377\377\377\377\377\3\0", 14) = 14
read(3, "\377\377\0\0\2\0\4\0\25\0\32\0&\0.\0\377\377\377\3777\0L\0N\0\377\377R\0\377\377"..., 540) = 540
read(3, "\7\0\r\0\33[%i%p1%d;%p2%dr\0\33[3g\0\33[H\33[J"..., 546) = 546
read(3, "", 10)                         = 0
close(3)                                = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2506, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2506, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2506, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=69, ws_col=153, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2506, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2506, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2506, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {c_iflags=0x2406, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a39, c_line=0, c_cc[VMIN]=1, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {c_iflags=0x2406, c_oflags=0x1, c_cflags=0xbf, c_lflags=0x8a31, c_line=0, c_cc[VMIN]=1, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
rt_sigaction(SIGTSTP, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTSTP, {0x2a95e35f30, [], SA_RESTORER|SA_RESTART, 0x2a9577b5b0}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_IGN}, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_IGN}, 8) = 0
rt_sigaction(SIGWINCH, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGWINCH, {0x2a95e361d0, [], SA_RESTORER, 0x2a9577b5b0}, NULL, 8) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2406, c_oflags=0x1, c_cflags=0xbf, c_lflags=0x8a31, c_line=0, c_cc[VMIN]=1, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {c_iflags=0x2406, c_oflags=0x1, c_cflags=0xbf, c_lflags=0x8a31, c_line=0, c_cc[VMIN]=1, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
write(1, "\33(B\33)0\33[1;69r\33[m\17\33[?7h\33[?1h\33=", 29) = 29
rt_sigaction(SIGTSTP, {SIG_IGN}, {0x2a95e35f30, [], SA_RESTORER|SA_RESTART, 0x2a9577b5b0}, 8) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x2406, c_oflags=0x1, c_cflags=0xbf, c_lflags=0x8a31, c_line=0, c_cc[VMIN]=1, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=69, ws_col=153, ws_xpixel=0, ws_ypixel=0}) = 0
write(1, "\33[H\33[J\33[0m\16lqqqqqqqqqqqqqqqqqqqq"..., 754) = 754
rt_sigaction(SIGTSTP, {0x2a95e35f30, [], SA_RESTORER|SA_RESTART, 0x2a9577b5b0}, NULL, 8) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ KILLED BY sigsegv +++

As you can see near the top you can catch the tail end of locale data loading fine. Any ideas would be nice.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0