From: <pa...@rc...> - 2001-04-30 11:01:44
|
Hi, I just checked in some more changes to enable grayscale and color PML scanning on the OfficeJets. These new modes save the image as a JPEG file rather than a PNM file (which turned out to be quite non-trivial!). I made some other bug fixes and enhancements to "ptal-hp -scan" as well. So far I have tested this new functionality on an OfficeJet 700, LaserJet 1100A, and LaserJet 3200m. It should also work on the OfficeJet 600 and PSC 300 series, and it may or may not work on the OfficeJet 500 and T series. I will test with these other models later this week, but of course I will always happily accept success or failure reports from others. :-) There are several issues with ptal-hp documented at "http://hpoj.sourceforge.net/todo.shtml", including: - "ptal-hp -scan" doesn't properly set the number of raster lines in a JPEG image, so your image viewer/editor may report a "corrupt JPEG data" error. "ptal-hp -scan" may hang on OfficeJets when scanning in "-bw" or "-bwht" modes unless you give the "-res 300" switch. - If you get ptal-mlcd error messages about lookupChannel failures while scanning with ptal-hp (probably on the OfficeJet 500/600/700/PSC300), try invoking ptal-mlcd with the "-porttype spp" option. This may be an ECP signalling bug, possibly due to waiting to long to go back to forward. As always, use "cvs update" to pick up the new changes. Enjoy! :-) David |
From: Joe P. <joe...@sn...> - 2001-04-30 20:16:42
|
On Monday 30 April 2001 07:01 am, David Paschal wrote: > Hi, > > I just checked in some more changes to enable grayscale and color PML > scanning on the OfficeJets. These new modes save the image as a JPEG > file rather than a PNM file (which turned out to be quite non-trivial!). > I made some other bug fixes and enhancements to "ptal-hp -scan" as well. > > So far I have tested this new functionality on an OfficeJet 700, LaserJet > 1100A, and LaserJet 3200m. It should also work on the OfficeJet 600 and > PSC 300 series, and it may or may not work on the OfficeJet 500 and T > series. I will test with these other models later this week, but of course > I will always happily accept success or failure reports from others. :-) Scanning in color worked on the 600, but with some problems: The document printed at a smaller size than the original ( at about 60% of the scanned doc). Printed at the bottom of the page was a large gray rectangular area that was not part of the original document. When I opened the scanned page in gimp, the gray area gave the impression that the scan had continued past the end of the paper. > > There are several issues with ptal-hp documented at > "http://hpoj.sourceforge.net/todo.shtml", including: > > - "ptal-hp -scan" doesn't properly set the number of raster lines in a > JPEG image, so your image viewer/editor may report a "corrupt JPEG data" > error. The pixie image tool complained about a "premature end of data segment" in the out.jpg file, then crashed. gimp 1.2.1 also complained. It did open the file, but didn't handle it well. > > "ptal-hp -scan" may hang on OfficeJets when scanning in "-bw" or "-bwht" > modes unless you give the "-res 300" switch. > > - If you get ptal-mlcd error messages about lookupChannel failures while > scanning with ptal-hp (probably on the OfficeJet 500/600/700/PSC300), try > invoking ptal-mlcd with the "-porttype spp" option. This may be an ECP > signalling bug, possibly due to waiting to long to go back to forward. I don't think I've seen the 'lookupChannel' error yet. -- Joe |
From: Alexander Z. <Ale...@fm...> - 2001-05-02 08:09:13
|
Hi, I just (May 2) updated my CVS sandbox of hpoj and had to recognize that xojpanel crashes. The missing extension "RENDER" doesn't harm in the previous CVS version. Gdb output follows: (gdb) run mlc:par:0 Starting program: xojpanel mlc:par:0 Qt: gdb: -nograb added to command-line options. Use the -dograb option to enforce grabbing. Xlib: extension "RENDER" missing on display "host:10.0". Program received signal SIGSEGV, Segmentation fault. 0x4020260a in QPixmap::operator= () at eval.c:41 41 eval.c: No such file or directory. in eval.c (gdb) where #0 0x4020260a in QPixmap::operator= () at eval.c:41 #1 0x0804e245 in XojPanel::createLCD (this=0x80a8a40) at ojstatus.cpp:256 #2 0x0804dfd3 in XojPanel::createInterface (this=0x80a8a40, deviceName=0xbfffee64) at ojstatus.cpp:239 #3 0x0804db54 in XojPanel::XojPanel (this=0x80a8a40, argc=2, argv=0xbfffef5c, parent=0x0, name=0x0) at ojstatus.cpp:180 #4 0x0804f494 in main (argc=2, argv=0xbfffef5c) at ojmanager.cpp:48 #5 0x40544177 in __libc_start_main (main=0x804f450 <main>, argc=2, ubp_av=0xbfffef5c, init=0x804cca4 <_init>, fini=0x8053554 <_fini>, rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbfffef4c) at ../sysdeps/generic/libc-start.c:129 (gdb) up #1 0x0804e245 in XojPanel::createLCD (this=0x80a8a40) at ojstatus.cpp:256 256 *lcdPixmap = (QPixmap)hpojlcd_xpm; Current language: auto; currently c++ (gdb) print hpojlcd_xpm $1 = {0x8053717 "254 40 79 1", 0x80535aa " \tc None", 0x8053723 ".\tc #000000", 0x805372f "+\tc #B89E2B", ... (deleted) I'm using gcc 2.95.2 with glibc 2.2.2 on a RedHat 7.1 system. Any hints? -- Ale...@fm... / You cannot have a science http://www.fmi.uni-passau.de/~zimmerma/ without measurement. -- R. W. for PGP public key finger / Hamming zim...@yo... / |
From: Joe P. <joe...@sn...> - 2001-05-02 18:52:36
|
On Wednesday 02 May 2001 04:09 am, Alexander Zimmermann wrote: > Hi, > > I just (May 2) updated my CVS sandbox of hpoj and had to recognize that > xojpanel crashes. The missing extension "RENDER" doesn't harm in the > previous CVS version. > > Gdb output follows: > (gdb) run mlc:par:0 > Starting program: xojpanel mlc:par:0 > Qt: gdb: -nograb added to command-line options. > Use the -dograb option to enforce grabbing. > Xlib: extension "RENDER" missing on display "host:10.0". > > Program received signal SIGSEGV, Segmentation fault. > 0x4020260a in QPixmap::operator= () at eval.c:41 > 41 eval.c: No such file or directory. > in eval.c > (gdb) where > #0 0x4020260a in QPixmap::operator= () at eval.c:41 > #1 0x0804e245 in XojPanel::createLCD (this=0x80a8a40) at ojstatus.cpp:256 > #2 0x0804dfd3 in XojPanel::createInterface (this=0x80a8a40, > deviceName=0xbfffee64) at ojstatus.cpp:239 > #3 0x0804db54 in XojPanel::XojPanel (this=0x80a8a40, argc=2, > argv=0xbfffef5c, parent=0x0, name=0x0) at ojstatus.cpp:180 > #4 0x0804f494 in main (argc=2, argv=0xbfffef5c) at ojmanager.cpp:48 > #5 0x40544177 in __libc_start_main (main=0x804f450 <main>, argc=2, > ubp_av=0xbfffef5c, init=0x804cca4 <_init>, fini=0x8053554 <_fini>, > rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbfffef4c) > at ../sysdeps/generic/libc-start.c:129 > (gdb) up > #1 0x0804e245 in XojPanel::createLCD (this=0x80a8a40) at ojstatus.cpp:256 > 256 *lcdPixmap = (QPixmap)hpojlcd_xpm; > Current language: auto; currently c++ > (gdb) print hpojlcd_xpm > $1 = {0x8053717 "254 40 79 1", 0x80535aa " \tc None", > 0x8053723 ".\tc #000000", 0x805372f "+\tc #B89E2B", > ... (deleted) > > I'm using gcc 2.95.2 with glibc 2.2.2 on a RedHat 7.1 system. > > Any hints? Unfortunately, I don't know enough about using gdb to make much sense of the output. If the previous CVS xojpanel ran for you, then the most recent changes are probably to blame. They would be changes I made to apps/xojpanel/ojstatus.cpp that specify a particular font that would be used in the "LCD". You could try changing the font specified by #define DEFAULT_FONT "Courier" to one that your system has installed. Any fixed-width font probably would be a good choice. You could also try commenting the line out, which would likely cause your system to choose a font. If none of the above works, could you post a little more information, such as which was the latest CVS you tried where xojpanel did not crash, and the version numbers of your XFree86 and Qt? If you decide to try changing the code, please post back with the results. -- Joe |
From: Alexander Z. <Ale...@fm...> - 2001-05-03 08:11:17
|
Hello Joe, thanks for your reply. Im afraid that my xojpanel problems have nothing todo with my CVS update, but with the upgrade from RedHat 7.0 to 7.1. On 2 May, Joe Piolunek wrote: > If none of the above works, could you post a little more information, such as > which was the latest CVS you tried where xojpanel did not crash, and the > version numbers of your XFree86 and Qt? RH 7.1 includes qt-2.3.0 and XFree86-4.0.3 . The crash happens in the call to XojPanel::createLCD . lcdPixmap and pm are both NULL pointers after new QPixmap . Therefore the program core dumpes in the line *lcdPixmap = (QPixmap)hpojlcd_xpm; hpojlcd_xpm is defined, but lcdPixmap is NULL. Don't ask me why. Unfortunately I'm not familiar with qt, but if you want me to test some things I'm willing to help. -- Ale...@fm... / In the Halls of Justice the http://www.fmi.uni-passau.de/~zimmerma/ only justice is in the halls. for PGP public key finger / -- Lenny Bruce zim...@yo... / |
From: Joe P. <joe...@sn...> - 2001-05-04 02:51:57
Attachments:
ojstatus.cpp.patch.gz
|
On Thursday 03 May 2001 04:11 am, Alexander Zimmermann wrote: <...> > RH 7.1 includes qt-2.3.0 and XFree86-4.0.3 . > The crash happens in the call to XojPanel::createLCD . lcdPixmap and > pm are both NULL pointers after new QPixmap . Therefore the program > core dumpes in the line > > *lcdPixmap = (QPixmap)hpojlcd_xpm; > > hpojlcd_xpm is defined, but lcdPixmap is NULL. Don't ask me why. > > Unfortunately I'm not familiar with qt, but if you want me to test some > things I'm willing to help. Thanks, Alexander. I attached a patch that I hope will fix the trouble. The patch also has some other changes in it. It's meant to be applied against the latest ojstatus.cpp from CVS. I don't know exactly what is causing the problem, but it seems likely that the method I was using to initialize the QPixmap objects does not work on your system. Maybe the new way will work better. We both have installed the same gcc and qt versions, so the error may be appearing due to differences in versions of XFree86 or maybe glibc. If you become interested in learning Qt programming, the qt docs are a big help. Qt is actually easy to learn and use, if you have a good understanding of pointers and classes. -- Joe |
From: Alexander Z. <Ale...@fm...> - 2001-05-04 15:26:29
|
Hello all, On 3 May, Joe Piolunek wrote: > I don't know exactly what is causing the problem, but it seems likely that > the method I was using to initialize the QPixmap objects does not work on > your system. Maybe the new way will work better. Joe, thanks for your patch, but it didn't solve the problem. The problem was the compiler. It didn't work with gcc-2.95.2 (compiled myself). But it worked with the (inofficial) gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) shiped with RedHat 7.1. As we know from the gcc developers this version may generate c++ code which may not be compatible with code from earlier or future versions. This seems to be the case here. Therefore I'm trying not to use it, but probably it was used to compile the qt or X11 libraries. O.K. It works again but I'm not really glad. Thanks again. -- Ale...@fm... / A wise person makes his own http://www.fmi.uni-passau.de/~zimmerma/ decisions, a weak one obeys for PGP public key finger / public opinion. -- Chinese zim...@yo... / proverb |
From: Joe P. <joe...@sn...> - 2001-05-04 17:37:47
|
On Friday 04 May 2001 11:26 am, Alexander Zimmermann wrote: <...> > Joe, thanks for your patch, but it didn't solve the problem. > > The problem was the compiler. It didn't work with gcc-2.95.2 (compiled > myself). But it worked with the (inofficial) > gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) > shiped with RedHat 7.1. As we know from the gcc developers this version > may generate c++ code which may not be compatible with code from earlier > or future versions. This seems to be the case here. Therefore I'm trying > not to use it, but probably it was used to compile the qt or X11 > libraries. > > O.K. It works again but I'm not really glad. > > Thanks again. Thanks for clearing it up. Apparently there are many people who don't like Redhat's recent choice of compilers. I plan to keep my (modified) RH 6.1 until redhat creates a reliable distribution, or consider changing to Debian. BTW, did you try compiling the patched version with gcc-2.96? It would be helpful to know the results. -- Joe |