[sane-devel] HP G2410c with Ubuntu 12.04

2013-02-28 Thread Stef
On 28/02/2013 04:58, Uday Gaitonde wrote:
 Thanks, Stef.

 I am not very savvy with such things, although I have been using Linux 
 for ages (over 15 years).

 Will it be OK if I follow the instructions at
 http://www.linuxfromscratch.org/blfs/view/svn/pst/sane.html ?

 I can then try the scanner again!

 Sincerely,
 U N Gaitonde



 Hello,

 the first document to compile SANE is the README.linux file in the 
source top directory. Then you could have a look at
  https://help.ubuntu.com/community/CompileSaneFromSource for additional 
details to get the needed compile time dependencies (build-dep).

Regards,
 Stef



[sane-devel] Trouble with sanei_usb change (commit ef5820ce6238469b9946b37e21ec5355edfa520a)

2013-02-28 Thread Stef
On 27/02/2013 22:10, Stef wrote:
 On 27/02/2013 21:59, Stef wrote:
 Hello,

 the ef5820ce6238469b9946b37e21ec5355edfa520a commit is causing me 
 troubles.
 Should we free devname on close ? We can open/close several times the 
 same device, so I think freeing in sanei_usb_close is problematic. 
 Reverting this change restored functionality to my backend.

 Regards,
 Stef

 After further looking at this issue, I think we should add a 
 sanei_usb_exit() function to take care of allocated resources ins 
 sanei_usb_init(). Another case we can free memory is when the device 
 is marked missing (missing field reaching 0).

 Regards,
 Stef



 Hello,

 regarding the memory leak, the following patch takes care of the 
case where memory is leaked on device that get unplugged or powered off.
  About the few bytes left when a backend exits, what is really 
needed is a sanei_usb_exit function. This function would free allocated 
resources when the last user of sanei_usb_init() calls it.

diff --git a/sanei/sanei_usb.c b/sanei/sanei_usb.c
index cdcca3f..a9696c4 100644
--- a/sanei/sanei_usb.c
+++ b/sanei/sanei_usb.c
@@ -364,8 +364,15 @@ store_device (device_list_type device)
  pos = i;
  }

+  /* reuse slot of a device now missing */
if(pos  -1){
  DBG (3, store_device: overwrite dn %d with %s\n, pos, 
device.devname);
+/* we reuse the slot used by a now missing device
+ * so we free the allocated memory for the missing one */
+if (devices[pos].devname) {
+  free(devices[pos].devname);
+  devices[pos].devname = NULL;
+}
}
else{
  if(device_number = MAX_DEVICES){
@@ -2039,10 +2046,6 @@ sanei_usb_close (SANE_Int dn)
  DBG (1, sanei_usb_close: libusb support missing\n);
  #endif
devices[dn].open = SANE_FALSE;
-  if (devices[dn].devname) {
-free(devices[dn].devname);
-devices[dn].devname = NULL;
-  }
return;
  }





[sane-devel] Trouble with sanei_usb change (commit ef5820ce6238469b9946b37e21ec5355edfa520a)

2013-02-28 Thread Gerhard Jäger
Hi Stef,

On Thursday 28 February 2013 07:28:55 Stef wrote:
 On 27/02/2013 22:10, Stef wrote:
  On 27/02/2013 21:59, Stef wrote:
  Hello,
 
  the ef5820ce6238469b9946b37e21ec5355edfa520a commit is causing me 
  troubles.
  Should we free devname on close ? We can open/close several times the 
  same device, so I think freeing in sanei_usb_close is problematic. 
  Reverting this change restored functionality to my backend.


sorry for that - I think I was too fast and remember that ages ago this
was the reason, why we didn't free devname...
[...]
  regarding the memory leak, the following patch takes care of the 
 case where memory is leaked on device that get unplugged or powered off.
   About the few bytes left when a backend exits, what is really 
 needed is a sanei_usb_exit function. This function would free allocated 
 resources when the last user of sanei_usb_init() calls it.
[...]

okay - I'd say, apply the patch and if possible make a proposal for
sanei_usb_exit() or _cleanup().

TIA
 Gerhard




[sane-devel] Problems with xsane

2013-02-28 Thread Beate Silbermann
Hello,

I have any problems with xsane and scan.
I have a Canon PIXMA MP490 multi-function peripheral. I installed the 
print driver from canon. Printing allready works fine. But I can't scan 
with ist. Allways when I open xsane and hit scan, I lose my network 
connection and the scan doesn't work.

About the Forum Help ubuntuusers I tried this:

~$ scanimage -L
device `pixma:04A9173C_107BD3' is a CANON Canon PIXMA MP490 multi-function 
peripheral

and than

~$ scanimage -d pixma:04A9173C_107BD3 --format tiff  rawr.tiff

But he doesn't work an he describe: scanimage: open of device 
pixma:04A9173C_107BD3 failed: Invalid argument


Now I don't know what can I do and I hope you can help me. I'm a beginner and I 
have installed Xubuntu 12.04 with xfce Desktop only been a half year.

I'm looking forward to get some help from you. Let  me know, if you need some 
information.

Kind regards
Beate Silbermann

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130228/841d2e0f/attachment-0001.html


[sane-devel] Problems with xsane

2013-02-28 Thread Gernot Hassenpflug
On Thu, Feb 28, 2013 at 4:33 PM, Beate Silbermann
beate.silbermann at t-online.de wrote:
 Hello,

 I have any problems with xsane and scan.
 I have a Canon PIXMA MP490 multi-function peripheral. I installed the print
 driver from canon. Printing allready works fine. But I can't scan with ist.
 Allways when I open xsane and hit scan, I lose my network connection and the
 scan doesn't work.

Hello,
If you installed the Canon driver, you can't use Xsane to access,
since the SANE driver is completely different program from the Canon
scanner program. To use the Canon scanner driver you need to start the
Canon program for scanning.

Anyhow, for SANE, the the MP490 is supported but it depends on your
version of SANE. Also, I am not sure if it has been confirmed to work.
I suspect you may have permission problems, or else the argument you
need to give scanimage must be different. Can you try as root? And
also running xsane as root?

Regards,
Gernot Hassenpflug

 About the Forum Help ubuntuusers I tried this:


 ~$ scanimage -L
 device `pixma:04A9173C_107BD3' is a CANON Canon PIXMA MP490 multi-function
 peripheral

 and than

 ~$ scanimage -d pixma:04A9173C_107BD3 --format tiff  rawr.tiff

 But he doesn't work an he describe: scanimage: open of device
 pixma:04A9173C_107BD3 failed: Invalid argument


 Now I don't know what can I do and I hope you can help me. I'm a beginner
 and I have installed Xubuntu 12.04 with xfce Desktop only been a half year.

 I'm looking forward to get some help from you. Let  me know, if you need
 some information.

 Kind regards
 Beate Silbermann


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
  to sane-devel-request at lists.alioth.debian.org



[sane-devel] Canon pixma mp280, not sane supported.

2013-02-28 Thread Rolf Bensch
Hi Erik,

Many thanks for your hint.

After some testing I'm changing the installation description from
symbolic links to ldconfig.

You can fetch the new version of README.linux shortly from git and
hopefully from the Sane website.

Cheers,
Rolf


Am 18.02.2013 19:04, schrieb erik:
 Hello Rolf
 
 Long time ago, just one remark.
 
 I do have to perform the command
 [code]
 sudo ln -sf /usr/local/lib/libsane.so.1.0.24 libsane.so.1
 [/code]
 with every kernel upgrade of ubuntu 12.04, to get the backend version
 1.0.24 working again.
 
 because for some unknown reason the link gets lost and scanimage -L
 reverses to the old backend version
 
 scanimage --version
 scanimage (sane-backends) 1.0.24git; backend version 1.0.22
 
 
 No problem for me, but maybe for others. Maybe a fault in my system.
 Anyway, I can life with it, but strange it is
 
 Thanks for all your efforts!
 
 Erik.
 
 
 



[sane-devel] Error message from website

2013-02-28 Thread Rolf Bensch
Hi,

after my last commit to the website I saw this error:

remote: hooks/post-receive: line 7:
/org/alioth.debian.org/chroot/home/groups/sane/bin/update-htdocs.sh: No
such file or directory

I eased the installation description in README.linux.

Cheers,
Rolf



[sane-devel] SANE installation description

2013-02-28 Thread Rolf Bensch
Hi List,

I just eased the SANE installation description in README.linux.

There was a problem with the created symbolic links. A distribution
upgrade could reset them to the original values.

Now I described how to use ldconfig to set /usr/local/lib as preferred
libs folder.

Cheers,
Rolf



[sane-devel] Trouble with sanei_usb change (commit ef5820ce6238469b9946b37e21ec5355edfa520a)

2013-02-28 Thread Stef
On 28/02/2013 08:14, Gerhard J?ger wrote:
 Hi Stef,

 On Thursday 28 February 2013 07:28:55 Stef wrote:
 On 27/02/2013 22:10, Stef wrote:
 On 27/02/2013 21:59, Stef wrote:
 Hello,

  the ef5820ce6238469b9946b37e21ec5355edfa520a commit is causing me
 troubles.
 Should we free devname on close ? We can open/close several times the
 same device, so I think freeing in sanei_usb_close is problematic.
 Reverting this change restored functionality to my backend.

 sorry for that - I think I was too fast and remember that ages ago this
 was the reason, why we didn't free devname...
 [...]
   regarding the memory leak, the following patch takes care of the
 case where memory is leaked on device that get unplugged or powered off.
About the few bytes left when a backend exits, what is really
 needed is a sanei_usb_exit function. This function would free allocated
 resources when the last user of sanei_usb_init() calls it.
 [...]

 okay - I'd say, apply the patch and if possible make a proposal for
 sanei_usb_exit() or _cleanup().

 TIA
   Gerhard

 Hello,

 I have applied the patch to sanei_usb.c .
 Since actual device scanning takes place in sanei_usb_init, some 
backends call it each time sane_get_device is called. So counting the 
number of user of the resources can't currently be done, and we cannot 
free resources until last user leave. When backends are loaded by the 
same frontend (such as saned) we cannot currently find if it safe to 
free resources.
 So be able to free the few lost bytes we have to:
 - move the usb device scanning logic out of sanei_usb_init() and 
publish it as sanei_usb_rescan()
 - make sure all backends use sanei_usb_init() only once
 - make sure backends use sanei_usb_rescan()
 - create a sanei_usb_exit() that free allocated resources
 - make sure all backends use sanei_usb_exit()

 This is quite some work for an handful of leaked bytes and need 
serious testing (even a test suite with mock device).

Regards,
 Stef