Subject: SP1 (This message is being sent to all CPSC 102 Sec 1 students ) ------------------------------------------------------------------- Some students still can't seem to recall how to create a tar file: Go to directory that has your source code (hopefully NOT home directory) tar cvf ../sp1.tar * Find sp1.tar file in parent of your source code directory Send as attachment to me. -------------------------------------- One student asked how to figure out which assert failed; Before each assert insert a message: fprintf(stderr, "About to assert I read 2 pixeldim values\n"); or whatever you are about to assert. The last message you see in your camera.log file will be the one that failed. A more efficient and effective way is to use gdb (the interactive debugger) gdb camtest GNU gdb Red Hat Linux (6.5-37.el5_2.2rh) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run < camera.txt < camera.txt 1> mycam.ppm Starting program: /home2/westall/wc/camtest < camera.txt camtest: camera.c:27: camera_load_attributes: Assertion `attrib_name[0] == '{'' failed. Program received signal SIGABRT, Aborted. 0xb7f06410 in __kernel_vsyscall () (gdb) In this case it tells you that it failed on line 27 in camera.c The commands YOU enter are: gdb camtest run < camera.txt 1> mycam.ppm The rest is output from gdb. --------------------------------------- Unfortunately SEVERAL students asked yesterday. "I have no idea how to do camera_store_pixel(). " In class last time, I showed EXACTLY which lines to copy out of camtest.c and then wrote on the board how to store the pixel, Try to avoid doing stuff like that if you also want to avoid: (1) receiving less that friendly responses from me and (2) moving yourself to the TAIL of the help queue!!