GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Sep 30, 2014 9:58 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Segmentation fault with newer libs
PostPosted: Sat Oct 13, 2007 7:16 pm 
Offline

Joined: Sat Oct 13, 2007 7:07 pm
Posts: 2
Hi. I got a problem with a code i wrote some time ago.
I always compiled it and it always run with my old pc.
Now i'm trying to run it on a newer one with upgraded gtk libs.

The problem is: gcc compiling ok, but at run i get segmentation fault.

Thanks for helping.


Top
 Profile  
 
 Post subject: link to code
PostPosted: Sat Oct 13, 2007 7:17 pm 
Offline

Joined: Sat Oct 13, 2007 7:07 pm
Posts: 2
here's a link to my code:
http://www.cs.unibo.it/~marottad/lista.c


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 13, 2007 9:33 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
I'm not looking at it very closely, however, a quick compile and run and I see it segfaults for me right here:

Code:
fd=fopen("/home/jack/monpref","r");
while(fread(&chunk, 1,1,fd)) {


Which makes sense. There no check to make sure fd is not null.

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot], newguy and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group