Hi,
I'm stuck with a strange problem.
I'm writing a gtk+-2.0 code as a user interface
for a (VME based) data acquisition system.
After starting my program, it reads an image like this:
my_image = gtk_image_new_from_file ("image.jpg");
This works fine in itself, I see the image after the gtk_widget_show command.
Later on, in another (rather unrelated) part of the code I do:
#define dev "/dev/btp32"
...many lines...
/* open VME device*/
if ((fd = open(dev,O_RDWR)) < 0){
perror("Error opening VME device");
exit(0);
}
/* map BIT3 dual port memory */
bufp=(int
*)mmap((caddr_t)0,len,PROT_READ|PROT_WRITE|PROT_EXEC,MAP_SHARED,fd,offset);
if(errno) {
perror("mmap: failed");
exit(0);
}
The error I get is:
mmap: failed: No such file or directory
After some testing, I found that the mmap call works fine, but only if
I remove the 'my_image...' line in the code. It also works
if I remove (or rename) the image, so that it cannot be read.
How can gtk_image_new_from_file and mmap be 'colliding'?
The image is only 11k and I have 512Mb RAM.
I run debian linux (woody), kernel 2.2.20.
I don't know if this is GTK+ related, but I hope someone
here could help me.
Regards,
TB
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list