[sane-devel] [patch] scanimage leaks memory in batch mode

2011-06-30 Thread Julien BLACHE
Olaf Meeuwissen  wrote:

Hi Olaf,

> Just noticed that scanimage leaks buffer_size bytes per scan when used
> in batch mode.  By default, that's 32 kb.  When using the buffer-size
> option it's 1Mb or whatever size you passed.

Applied, thanks. Good catch :)

JB.

-- 
Julien BLACHE    
  GPG KeyID 0xF5D65169



[sane-devel] xscanimage crashes with my Epson Stylus Office BX525WD

2011-06-30 Thread Torfinn Ingolfsen
No interest?

On Sat, Jun 25, 2011 at 8:44 PM, Torfinn Ingolfsen  wrote:
> Hi,
> xscanimage always crashes when I try to scan from my Epson Stylus
> Office BX525WD.
> How can I help fixing this?
>
> It is detected:
> tingo at kg-u35jc:~$ scanimage -L
> device `epson2:net:10.1.161.8' is a Epson PID 085E flatbed scanner
> but xscanimage crashes:
> tingo at kg-u35jc:~$ SANE_DEBUG_XSCANIMAGE=4 xscanimage epson2:net:10.1.161.8
> [sanei_debug] Setting debug level of xscanimage to 4.
> [xscanimage] main
> [xscanimage] xscanimage (version: 1.0.14, package: sane-frontends) starting
> [xscanimage] interface
> [sanei_debug] Setting debug level of xscanimage to 4.
> [xscanimage] init
> [xscanimage] init: finished
> [xscanimage] device_dialog
> [xscanimage] pref_xscanimage_restore
> [xscanimage] pref_xscanimage_restore: finished
> [xscanimage] files_build_menu
> [xscanimage] files_build_menu: finished
> [xscanimage] pref_build_menu
> [xscanimage] pref_build_menu: finished
> [xscanimage] update_param
> [xscanimage] update_param: finished
> [xscanimage] pref_device_restore
> [xscanimage] device_dialog: finished
> [xscanimage] interface: now running gtk_main ()
> [xscanimage] browse_filename_callback
> [xscanimage] browse_filename_callback: finished
> [xscanimage] scan_dialog
> Segmentation fault
>
> I'm running Xubuntu 10.10:
> tingo at kg-u35jc:~$ uname -a
> Linux kg-u35jc 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 18:42:20
> UTC 2011 x86_64 GNU/Linux
> tingo at kg-u35jc:~$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: ? ?Ubuntu 10.10
> Release: ? ? ? ?10.10
> Codename: ? ? ? maverick
>
>
> Simple scan works, but I want to use xscanimage because it is the GIMP plugin.
>
> --
> Regards,
> Torfinn Ingolfsen
>



-- 
mvh
Torfinn



[sane-devel] [patch] scanimage leaks memory in batch mode

2011-06-30 Thread Olaf Meeuwissen
Hi all,

Just noticed that scanimage leaks buffer_size bytes per scan when used
in batch mode.  By default, that's 32 kb.  When using the buffer-size
option it's 1Mb or whatever size you passed.

Patch is attached.  It moves the memory allocation out of scan_it() and
into main(), just before where the non-test-mode branch starts the batch
loop.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962
-- next part --
A non-text attachment was scrubbed...
Name: scanimage-batch-mode-memory-leak.patch
Type: text/x-diff
Size: 500 bytes
Desc: Fix memory leak in scanimage's batch mode
URL: 
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20110630/4637dd69/attachment.patch>