[MacPorts] #26194: Segmentation violation in scanimage
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ The command output speaks for itself: {{{ ; scanimage -L device `genesys:libusb:038:003' is a Pentax DSmobile 600 flatbed scanner ; scanimage -d genesys:libusb:038:003 --mode Lineart -x 57 -y 100 > foo segmentation violation }}} Again, under the debugger: {{{ ; gdb scanimage (gdb) run -d genesys:libusb:038:003 --mode Lineart -x 57 -y 100 Starting program: /opt/local/bin/scanimage -d genesys:libusb:038:003 --mode Lineart -x 57 -y 100 Reading symbols for shared libraries .+++++++++...... done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000000000025d274 0x000000010014438f in sane_genesys_open () (gdb) back #0 0x000000010014438f in sane_genesys_open () #1 0x0000000100018491 in sane_dll_open () #2 0x00000001000043c6 in main () (gdb) }}} So the problem appears to be in the genesys module. FWIW, I am on 10.6.4 (MacBook Pro 13 inch). I installed macports, ran port selfupdate and built all my ports from the bottom within the past week. -- Ticket URL: <http://trac.macports.org/ticket/26194> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Changes (by jmr@…): * owner: macports-tickets@… => aguynamedryan+sane@… Comment: Please remember to cc the maintainer. -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by aguynamedryan+macports@…): First off, thanks for the great problem description. Lots of good detail in there. Unfortunately I don't have access to your particular scanner so I'm going to have to ask you to run a few commands for me. We'll start with the most basic. Just to make certain that we're both looking at the same version of SANE, will you please tell me the output of: {{{ scanimage -V }}} Also, please run the following command and attach the resulting debug.log file to this ticket: {{{ export SANE_DEBUG_DLL=127 Thanks! export SANE_DEBUG_GENESYS=127 scanimage -d genesys:libusb:038:003 --mode Lineart -x 57 -y 100 2> debug.log }}} This might help me figure out how far {{{sane_genesys_open}}} gets before the problem occurs. As a final shot in the dark, assuming you have only the one scanner attached to your computer, will you please tell me what happens when you run: {{{ scanimage --mode Lineart -x 57 -y 100 }}} -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by aguynamedryan+macports@…): Replying to [comment:2 aguynamedryan+macports@…]: My history embarrassing formatting issues continues. That second command should be: {{{ export SANE_DEBUG_DLL=127 export SANE_DEBUG_GENESYS=127 scanimage -d genesys:libusb:038:003 --mode Lineart -x 57 -y 100 2> debug.log }}} And the thanks should be at the bottom, like so: Thanks! -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by hanche@…): {{{ ; scanimage -V scanimage (sane-backends) 1.0.21; backend version 1.0.21 }}} I ran scanimage the way you requested and attached debug.log. Running scanimage without specifying the device leads to a segmentation violation as well. I will attach the resulting log as debug2.log. -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by hanche@…): I just realized that one more bit of information may be relevant. In debug.log, it appears that genesys tries attaching the device twice, succeeding the first time and then failing the second time. I have noticed something odd: I run Hardware Growler, and it notifies me that the built- in card reader is detached, then reattached whenever I try scanimage. I can see this in kernel.log as well: {{{ Aug 24 01:13:06 mach kernel[0]: com_apple_driver_AppleUSBCardReaderUMC:: Stop::Controller Reset Aug 24 01:13:06 mach kernel[0]: USBMSC Identifier (non-unique): 000000009833 0x5ac 0x8403 0x9833 }}} This may be totally beside the point, but I thought it odd enough it might bear mentioning. -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by aguynamedryan+macports@…): Replying to [comment:5 hanche@…]: When I run {{{scanimage -L}}} on my Mac I get a similar message regarding AppleUSBCardReaderUMC. I am pretty sure this is not our culprit. I'll do more thorough investigation about this tomorrow just to be sure. Based on the output in debug2.log, it looks like the genesys' init_options function is where the segmentation violation occurs. I've poked around in the code and init_options has undergone a fair bit of change over the last few years. There also seems to be very little overall discussion of using Pentax DSMobile 600 scanners with SANE. I'm wondering if there was a bug introduced recently and no one has run into it until now since so few appear to use the DSMobile. Is this the first time you've used the DSMobile with SANE? If you ''have'' used the scanner with SANE before, what was the last working version you used with this scanner? Knowing the version number will help me narrow down which changes might be causing the problem. -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by hanche@…): Replying to [comment:6 aguynamedryan+macports@…]:
Is this the first time you've used the DSMobile with SANE?
Yes, it is. -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by aguynamedryan+macports@…): Replying to [comment:7 hanche@…]: I double-checked and the AppleUSBCardReaderUMC message appears even if the scanner successfully scanned in some images. Bottom line is I can't debug this issue because I don't have the right scanner. From what I'm seeing my gut tells me that this is an upstream problem. Here is how I would go about tracking down the cause of this problem: * Hit the SANE mailing lists and forums and see if anyone else has a DSMobile * If they do, see if they are having the same issue * If you have access to a Linux box, throw SANE on it and try your scanner there * If it works then we'll have to figure out what causes the failure on Mac and not Linux * If it doesn't work, it might be easier to try patching/recompiling the source under Linux * As I mentioned above, the init_options function in genesys.c is where the problem occurs. Start your debugging journey in that function. If you'd like you're welcome to email me for some offline guidance on debugging SANE. I've done a bit of contribution to SANE before so I know a bit about how it works. That said, I'm not nearly the expert some of the upstream developers are. If/when you do have a patch, send it my way and I'll throw it into the port ASAP so you don't have to wait for the next release from the SANE developers. I'll also keep my eye out and release an update to the port as soon as sane-backends 1.0.22 is out in the hopes that there's a fix in there somewhere. -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by hanche@…): Replying to [comment:8 aguynamedryan+macports@…]:
* If you have access to a Linux box, throw SANE on it and try your scanner there
scanimage -L doesn't even see the scanner on Linux. I'll try your other suggestions. -- Ticket URL: <http://trac.macports.org/ticket/26194#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ---------------------------------+------------------------------------------ Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: sane-backends ---------------------------------+------------------------------------------ Comment(by jmr@…): Do you still see this with 1.0.22? -- Ticket URL: <https://trac.macports.org/ticket/26194#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26194: Segmentation violation in scanimage ----------------------------+---------------------------------- Reporter: hanche@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Resolution: | Keywords: Port: sane-backends | ----------------------------+---------------------------------- Comment (by wf@…): with the latest MacPorts scanimage (sane-backends) 1.0.22; backend version 1.0.22 there is still a segmentation fault {{{ export SANE_DEBUG_DLL=127 /opt/local/bin/scanimage --help -d epson2:net:2.0.0.72 > /tmp/result.txt 2>&1 Segmentation fault: 11 }}} result.txt is attached above -- Ticket URL: <https://trac.macports.org/ticket/26194#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts