Menu

#1808 "Could not get object handles" dealing with 128*i-4 files [i=1,2,3, ...]

1.1.14
open
None
1
2020-06-21
2018-10-31
angus73
No

When accessing to a directory in a Samsung device, libmtp fails saying "Could not get object handles", if the number N of files in the directory makes the relation

N * 4 + 16 = i * 512

true (this has been tested for i=1, 2, 3 (124, 252, 380 files), but reasonably every next value for i would trigger the bug (?)).

The mailing list discussion leading to this is here:

https://sourceforge.net/p/libmtp/mailman/libmtp-discuss/thread/1525949259.3609.37.camel%40unipv.it/#msg36314380

, a downstream bug is here:

https://bugzilla.redhat.com/show_bug.cgi?id=1401826

, and a similar problem has been reported here:

https://sourceforge.net/p/libmtp/mailman/message/35954558/ .

The same device works in Windows 7.
Using libmtp 1.1.14 on Fedora 28.

Discussion

  • angus73

    angus73 - 2018-10-31
     
  • Marcus Meissner

    Marcus Meissner - 2018-12-01
    • assigned_to: Marcus Meissner
     
  • Marcus Meissner

    Marcus Meissner - 2019-01-02

    I have tried some more things, like replacing the getobjecthandles by getobjproplist, but it seems samsung does not do directory based getobjproplists :/ (or i am doing something wrong)

     
  • Anonymous

    Anonymous - 2019-02-27

    If it helps you to decide which issues to work on I waisted more time figuring this one out than you might expect getting some valuable photos off of a phone with a cracked screen... 380 of them.

     
  • angus73

    angus73 - 2019-03-03
     
  • Marcus Meissner

    Marcus Meissner - 2019-03-03

    can you check current libmtp git?

    I had for speed reasons enabled the proplist reader, but this seems to cause these breakage :/

     
  • angus73

    angus73 - 2019-03-03

    I can try but need some help on how to do it. Can I do it on Ubuntu without uninstalling libmtp packages? How can I be sure to run the version (git) I want? Thx

     
  • Marcus Meissner

    Marcus Meissner - 2019-03-03

    I uploaded a temp snapshot of current git to: https://www.lst.de/~mm/libmtp-1.1.16.tar.gz
    ./configure --prefix=/usr ; make ; sudo make install will likely do the trick

     
  • angus73

    angus73 - 2019-03-03

    I managed to install it but not sure how to do the test... should it be somewhere a mtp-file executable nested in the libmtp directory where I performed the above steps from?

     
  • Anonymous

    Anonymous - 2019-03-03

    I'm having the same problem here. Just bought a new android phone, put my old SD card on the new one and it doesn't work. Same computer, same SD card, diferent phone with diferent android version: the old one is Android 5, the new Android 8.

    I have installer the snapshot that Marcus gave (thanks!) and it doesn't work either.

    Two ways to see the problem (in my case):

    • Try to access a folder with more than 123 files (it gives de "could not get bject handles" error)
    • Try to copy the 124th file on the folder: it takes some time and then it fails. The phone also fails until you disconnect and connect again. The folder remains "unbrowsable" until I delete the 124th folder in the phone file manager.

    Thanks!

     
  • Anonymous

    Anonymous - 2019-04-29

    is there any fix soon?

     
  • Anonymous

    Anonymous - 2019-12-30

    I was having this problem on release 1.1.16-1, but it seems to work on the latest git release (1.1.16.r95.g54e0507-1, as it's labelled in Arch's libmtp-git package).

     
  • Anonymous

    Anonymous - 2020-01-08

    Any news ??

     
  • Marcus Meissner

    Marcus Meissner - 2020-02-27

    can you check with 1.1.17 again?

     
  • Anonymous

    Anonymous - 2020-02-27

    I just tried the 1.1.17 (downloaded as .tar.gz by "download latest version"), and about the feedback some comments above:

    Two ways to see the problem (in my case):
    
    Try to access a folder with more than 123 files (it gives de "could not get bject handles" error)
    

    this problem seems to be fixed!

    Try to copy the 124th file on the folder: it takes some time and then it fails. The phone also fails until you disconnect and connect again. The folder remains "unbrowsable" until I delete the 124th folder in the phone file manager.

    this one seems to still exist :-(
    But please note that, if I add the 124th file on the phone, the folder shows all the files correctly, and afterwards I can also add other files without any problem.

     
  • angus73

    angus73 - 2020-02-27

    (note to the moderators: I am the author of the last comment)

     
  • angus73

    angus73 - 2020-02-27

    I have tested also current git (f5ea96b1879dba9952c1c3ad12ada5aff1334352), and found that 123 files are ok, 125 files are ok, but 124 files generate "input/output error" (although it does not make the system freeze as it did before)

     
  • Anonymous

    Anonymous - 2020-06-21

    I got this libmtp "could not get object handles" message directly after my Samsung S2 Android phone did an automatic update. It was working perfectly prior to that, whenever I connected to my Lubuntu laptop via USB. AFTER the phone update, I could browse any folder EXCEPT the internal storage DCIM / Camera folder. It has 508 pics. I wanted to copy some pics to my Ubuntu laptop. As a workaround, I was able to use the phone MyFiles app to "move" some pics from the internal storage over to the SD Card DCIM / Camera folder (I have a 16GB SD card in the phone I use for music). I was then able to browse the SD card/DCIM/Camera folder normally after plugging in the USB to my laptop (only like 15 or so pics that I transferred). I could then copy those pics from the Phone SD card to the laptop. Still frustrating having that error on Phone/DCIM/Camera but at least I could see and transfer after moving the photo's I wanted to the camera's SD card/DCIM/Camera.

     

Anonymous
Anonymous

Add attachments
Cancel