Problem importing photos from hp photosmart 850

Bug #18409 reported by crez
26
Affects Status Importance Assigned to Milestone
libgphoto2 (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Upon connecting the camera a warning dialog box appear asking if the photos
should be imported. after selecting "Import photos" an "Import photos" box
apears, with the a progres bar stuck near the end and an error message "Could
not append 'DEVICEID.XML' to folder '/store_00010042/MISC' because this file
already exists." above it ( http://clement.rezvoy.free.fr/screenshot.png ).
There is the same error in f-spot import ( "file exist" error) .
I tried mounting the camera as disk drive, removing the file and resetting the
camera in PTP-mode but it did not work, the file is recreated.
I tried to change the access rights in the /etc/hotplug/usb/libgphoto2 scripts
from 660 to 666 but it didn't work either.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. What version of Ubuntu do you use? I've just uploaded
libgphoto2 2.1.6, can you let me know if you try and still have the issue with it.

Revision history for this message
crez (clement-rezvoy) wrote :

(In reply to comment #1)
> Thanks for your bug. What version of Ubuntu do you use? I've just uploaded
> libgphoto2 2.1.6, can you let me know if you try and still have the issue with it.

I'm currently running hoary with libgphoto2 2.1.5-2ubuntu1.

I found the error message in libgphoto2 source code in
libgphoto2-2.1.5/libgphoto2/gphoto2-filesys.c @ line 632 in function
gp_filesystem_append I'll try to do some debug to find out how it arises.

where did you upload the 2.1.6 version, in breezy ?

Revision history for this message
crez (clement-rezvoy) wrote :

Created an attachment (id=3154)
patchto handle hp photosmart 850 bug

This patch adds additional checking into function file_list_func
(camlibs/ptp2/library.c) that will check if the camera is a HP Photosmart 850
and if so, ensure that the camera does not add duplicate names in the file
list.

Revision history for this message
Daniel Holbach (dholbach) wrote :

> where did you upload the 2.1.6 version, in breezy ?

Yes, seems so:
    * warty (libs): 2.1.4-6.1ubuntu0
      Binary packages: libgphoto2-2, libgphoto2-2-dev, libgphoto2-port0
    * hoary (libs): 2.1.5-2ubuntu1
      Binary packages: libgphoto2-2, libgphoto2-2-dev, libgphoto2-port0
    * breezy (libs): 2.1.6-1ubuntu3
      Binary packages: libgphoto2-2, libgphoto2-2-dev, libgphoto2-port0

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

This bug still exist in Breezy. Any change that patch to ge in to Breezy? Thanks

Revision history for this message
crez (clement-rezvoy) wrote :

The patch I submitted works for gphoto 2.1.5, I haven't tested it with 2.1.6
(i.e in breezy) yet but it might just work if the code hasn't changed much.

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

How do i install this patch?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Martin, seems that Debian used this patch ... any opinion on it?

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #8)
> Martin, seems that Debian used this patch ... any opinion on it?

It's not in the Debian changelog, but I didn't check the package.

Anyway, the current patch is a bit ugly since it is very specific. In general I
don't see a reason for having duplicate file names, so I'd just drop the camera
name detection.

Revision history for this message
Martin Pitt (pitti) wrote :

Created an attachment (id=4164)
generic patch to ignore file name duplicates

What do you think about this patch? It is not model specific, uses proper
functions to interface the list and is less intrusive.

Revision history for this message
Martin Pitt (pitti) wrote :

 libgphoto2 (2.1.6-1ubuntu6) breezy; urgency=low
 .
   * camlibs/ptp2/library.c: Check for duplicate filenames to circumvent bugs
     in cameras like the HP photosmart 850. (Ubuntu #12132)

I uploaded it to Ubuntu for easier testing. Please cry out loudly if you still
have problems, then I reopen this bug.

Revision history for this message
crez (clement-rezvoy) wrote :

(In reply to comment #10)
> Created an attachment (id=4164) [edit]
> generic patch to ignore file name duplicates
>
> What do you think about this patch? It is not model specific, uses proper
> functions to interface the list and is less intrusive.

This patch sure looks better than the first one I did. I didn't know of any
other camera that has the same problem, so I made it camera specific. It had the
advantage of avoiding testing every files for every cameras.

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

It isnt working, i still got same error with my HP 850

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

It isnt working, i still got same error with my HP 850(In reply to comment #13)
> It isnt working, i still got same error with my HP 850

Aah, tryed to change camera model, after that, hit automate regonize and it
started to working!! Thaankkkss!!!!!

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

> Aah, tryed to change camera model, after that, hit automate regonize and it
> started to working!! Thaankkkss!!!!!
>

Aah, i take that back. I statrted to load images, and again:

Could not append 'DEVICEID.XML' to folder '/store_00010042/MISC' because this
file already exists.

Please reopen this bug.

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

Have you tryed this patch
http://<email address hidden>/large/libgphoto2/

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #15)

> Aah, i take that back. I statrted to load images, and again:
>
> Could not append 'DEVICEID.XML' to folder '/store_00010042/MISC' because this
> file already exists.

Very odd... my patch is more generic, it should actually cover more cases, not
less. Will look into it again tomorrow.

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

Did you test that?

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #18)
> Did you test that?

Test what? The utnubu patch you referred to in comment #16 *is* the Ubuntu patch
I created, and you already tested it.

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

(In reply to comment #19)
>The utnubu patch you referred to in comment #16 *is* the Ubuntu patch
> I created, and you already tested it.

Your patch? I thought that is Frederic Peterses site? :)

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #20)
> (In reply to comment #19)
> >The utnubu patch you referred to in comment #16 *is* the Ubuntu patch
> > I created, and you already tested it.
>
> Your patch? I thought that is Frederic Peterses site? :)

Nope, utnubu (ubuntu backwards) is a Debian project to feed back Ubuntu patches
to Debian. Just look into it, it's exactly the patch I uploaded.

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

Oh, im sorry :) I just hope this issue will be fixed so i can dump my windows
for good.

Revision history for this message
Martin Pitt (pitti) wrote :

*** Bug 23829 has been marked as a duplicate of this bug. ***

Revision history for this message
Martin Pitt (pitti) wrote :

Created an attachment (id=4644)
breezy-updates debdiff

Proposed debdiff for breezy-updates to fix import and crash on powerpc.

Revision history for this message
Martin Pitt (pitti) wrote :

Guys, can you please verify that the proposed debdiff works? Please download the
"breezy-updates debdiff" and do:

  sudo apt-get build-dep libgphoto2
  sudo apt-get install fakeroot devscripts
  sudo apt-get source libgphoto2
  cd libgphoto2-2.1.6
  patch -p1 < /path/to/the/downloaded/patch
  debuild -us -uc -b
  cd ..

this should build updated libgphoto2 debs. Please install it with

  sudo dpkg -i libgphoto2-2_2.1.6-1ubuntu6.1*.deb
libgphoto2-port0_2.1.6-1ubuntu6.1*.deb

and try whether the import works then? Thanks!

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

root@Koti:/home/osku# sudo dpkg -i libgphoto2-2_2.1.6-1ubuntu6.1*.deb
(Reading database ... 97482 files and directories currently installed.)
Preparing to replace libgphoto2-2 2.1.6-1ubuntu6.1 (using
libgphoto2-2_2.1.6-1ubuntu6.1_i386.deb) ...
Unpacking replacement libgphoto2-2 ...
dpkg: dependency problems prevent configuration of libgphoto2-2:
 libgphoto2-2 depends on libgphoto2-port0 (>= 2.1.6-1ubuntu6.1); however:
  Version of libgphoto2-port0 on system is 2.1.6-1ubuntu6.
dpkg: error processing libgphoto2-2 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libgphoto2-2

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

Hey, but it works!!!!!!!! Those last packages didnt installed, but it works!
Thanks!!

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

Now Synaptic says libgphoto2-2 is broken.

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

Ah, that is fixed. HP850 works like a charm :D

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #26)

> dpkg: dependency problems prevent configuration of libgphoto2-2:
> libgphoto2-2 depends on libgphoto2-port0 (>= 2.1.6-1ubuntu6.1); however:

Right, as I wrote in comment #25, you also need to dpkg -i the -port0 package. :-)

Anyway, thank you for testing! I uploaded this to breezy-updates:

 libgphoto2 (2.1.6-1ubuntu6.1) breezy-updates; urgency=low
 .
   * Fix logic error in the check for duplicate file names that break the patch
     and causes crash on powerpc. (Ubuntu #12132)

It's waiting in the approval queue now and is (hopefully) available soon.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Upload approved for breezy-updates, enjoy

Revision history for this message
Allison Karlitskaya (desrt) wrote :

Verified: The package in breezy-updates fixes the crash. Thanks for your rapid
attention.

Cheers.

Revision history for this message
Jan-Olof Eriksson (owdy) wrote :

Thank you again!

Revision history for this message
Hubert Figuiere (hub) wrote :

What is awsome is that upstream has NEVER heard of the patch. I discovered it this morning in Debian experimental package....

Revision history for this message
Hubert Figuiere (hub) wrote :

Filed Debian bug 356084 for this issue of patch not sent to upstream.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.