[solved]A problem with fgets?

Hi,

I hope that some consciencious guys are still playing with root on these rest days… :smiley:

I have a problem with the following lines (I’m working with root 04.04/02g under Ubuntu 5.10) :

void skipHeader(FILE *inputFile){ char line[80], blabla[80] ; do { fgets(&line[0],80,inputFile) ; ...
The program crashes saying :

*** Break *** segmentation violation Generating stack trace... /usr/bin/addr2line: './MuonDisplay.exe': pas de fichier comme tel /usr/bin/addr2line: './MuonDisplay.exe': pas de fichier comme tel /usr/bin/addr2line: './MuonDisplay.exe': pas de fichier comme tel /usr/bin/addr2line: './MuonDisplay.exe': pas de fichier comme tel 0xb6aa5d4a in fgets + 0x2a from /lib/tls/i686/cmov/libc.so.6 0x0804b6ee in skipHeader(_IO_FILE*) + 0x28 from ./MuonDisplay.exe 0x0804baec in BaF2_2ch_directory(char*, int) + 0x2b6 from ./MuonDisplay.exe 0x0804ac90 in main + 0x1b8 from ./MuonDisplay.exe 0xb6a66ea2 in __libc_start_main + 0xd2 from /lib/tls/i686/cmov/libc.so.6 0x0804a251 in TApplicationImp::ShowMembers(TMemberInspector&, char*) + 0x41 from ./MuonDisplay.exe Abandon
The same program ran successfully under something like RedHat unknown version with the same root version (maybe not the “g” one, but I think it was 4.04/02 too).

What could the problem be ? Is there something wrong with my libc.so.6 ?

Thanks, and Merry Xmas ! :wink:

:blush: Forget it, that was my fault…

Merry Xmas aniway ! :smiley: