cloudbearings / jusbpmp

Automatically exported from code.google.com/p/jusbpmp
0 stars 0 forks source link

possible device problem #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,
 I'm trying to use 0.1.4 and a Java program to get a simple list of files
from a Samsung YP-U3 MP3 player. I can get the device ok, but when I try to
get the files it fails.

One important bit of info, I'm running this on Fedora 10 and using libmtp
v0.3.7-1

My Code:
        PlayMgr mgr=new PlayMgr();
        UsbDevice device=mgr.getDevice();
        if ( device == null ){
            throw new Exception("Unable to locate device.");
        }
        System.out.println("\nDEVICE:\n"+device.dump()+"\n\n");
        String[] files=mgr.getFiles(device);

    public String[] getFiles(UsbDevice dev) throws Exception {
        final Map flist=new HashMap();
        long res;
        res=dev.parseFolder(dev.getAudioFolder(), new IParseTreeNotifier(){ 
                                public long addFile(String fileName, String mtpItemIid){
                                    System.out.println("File:"+fileName);
                                    flist.put(fileName, mtpItemIid);
                                    return 0;
                                }
                                public long addFolder(String name, String id){
                                    System.out.println("FOLDER:"+name);
                                    return 0;
                                }
                            });
        if ( res != 0 ) {
            throw new Exception("error reading device #" + res);
        }
        System.out.println("Got #"+flist.size());
        return (String[])flist.keySet().toArray(new String[0]);
    }

The output is:
   java -classpath bin:jusbpmp-0.1.4.jar com.lrs.PlayMgr
Hi. Version 0.0.1
[serial = C5A5FDFF8FF00000; pid = 0x507D; vid = 0x04E8; name = ?????;
manufacturer = Samsung Electronics; mount point = FKFMPPNPAPPI; video
folder = ; audio folder = ; picture folder = ; index = 0; capacity =
1986576384; canonical = ?????_C5A5FDFF8FF00000_04e8_507d_0]

DEVICE:
[serial = C5A5FDFF8FF00000; pid = 0x507D; vid = 0x04E8; name = ?????;
manufacturer = Samsung Electronics; mount point = FKFMPPNPAPPI; video
folder = ; audio folder = ; picture folder = ; index = 0; capacity =
1986576384; canonical = ?????_C5A5FDFF8FF00000_04e8_507d_0]

getting subfolder for /
getting subfolder , depth 1
current item checked = 
item  existing with ID: 0
Check files in /
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00c7138b, pid=21543, tid=8731536
#
# Java VM: OpenJDK Server VM (14.0-b08 mixed mode linux-x86 )
# Distribution: Custom build (Tue Mar 24 14:54:59 EDT 2009)
# Problematic frame:
# C  [libc.so.6+0x7738b]  strlen+0xb
#
# An error report file with more information is saved as:
# /home/lrs/workspace/jusbpmp-0.1.3/hs_err_pid21543.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted

Error log is attached

Original issue reported on code.google.com by larry...@gmail.com on 31 Mar 2009 at 3:52

Attachments:

GoogleCodeExporter commented 8 years ago
Is there any way we can get the source to the native code library? That would 
help me
to debug this. Thanks!

Original comment by larry...@gmail.com on 2 Apr 2009 at 1:35

GoogleCodeExporter commented 8 years ago
Check 'downloads' tab for native code source

Original comment by netcm...@gmail.com on 3 Apr 2009 at 6:17