printf("reading input image ... \n"); /*unidata.image = (image_ptr*)read_pnm(argv, &(unidata.rows), &(unidata.cols), &type); */ printf("hello.jpg"); printf("image read successfully \n"); printf("rows=%d, cols=%d, type=%d \n", unidata.rows, unidata.cols, type); /* error here*/ printf("well");
the errors are coming between the two final printf statements. when the read_pnm() is left uncommented it is a segmentation fault, when commented it is a floating point exception. there is nothing in the code that i am aware of that would cause either.
the best i can think of is that i have somehow overrun the memory allowed to my user in the system i am on, or else the memory i have allotted to this process? either one seems very unlikely there has been very little memory used up until this point (200kb maybe?). the lack of any apparent connection makes me think i'm initiating something else (one of the libraries or something from the OS) that has a run-time error. but then again by the time it reaches the point where it should have been having this error afaik everything should have been concluded.
any help or insight anyone can give is much appreciated.