0

This is a weird problem I have here. I am using SmbFile from jcifs suite in with my android app. I have done this plenty of times. I currently debug most of my apps with a Droid X but just recently got a new Droid Razr HD. I built a few new apps which connect to PC shares with SmbFile using the code below:

    SmbFile dir = null;
    try {
        dir = new SmbFile(smbFile, auth);
    } catch (MalformedURLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    try {
            Log.i("Debug", "Authenticated...");
            if(dir.list() != null){
                shares2 = dir.list();
                fa2 = dir.listFiles();
            }
    } catch (MalformedURLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

I use this EXACT same code in one of my apps that work great with Droid X and Droid RAZR HD as well as many others due to it being on the market. But int he current one I am working on, its not working. Permissions are set just fine and it authenticates but it force closes each time at:

  shares2 = dir.list();

It doesn't force close on other devices. I don't understand. The same code is in my other app that works on the Droid RAZR HD but not this app. I have tested and checked the credentials and input. Everything is good. I tried to catch the error but it don't print out what error, just forcefully closes and tells me this is where the problem is. Any one have an idea of what the problem could be? Again, I thought its my code, but the code works on another device. Then I thought it was the device but the exact same code is in another app of mine and that works on this device.

Edit This is my log from the Droid razorbacks HD

V/RecentsPanelView( 838): Starting activity Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10304000 cmp=com.getmyitunes.project/. GetMyiTunes } I/ActivityManager( 535): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10304000 cmp=com.getmyitunes.project/. GetMyiTunes} from pid 838 I/ActivityManager( 535): Start proc com.getmyitunes.project for activity com.getmyitunes.project/.GetMyiTunes: pid=1365 uid=10149 gids={3003, 1015} I/ActivityManager( 535): Displayed com.getmyitunes.project/.GetMyiTunes: +382ms I/GetMyiTunes( 1365): Updated credentials I/ActivityManager( 535): START {cmp=com.getmyitunes.project/.ListFiles (has extras)} from pid 1365 I/GetMyiTunes( 1365): Users/Virginia/Music/iTunes/iTunes Media/Music/I/GetMyiTunes( 1365): 192.168.1.136 I/GetMyiTunes( 1365): Virginia I/GetMyiTunes( 1365): corneta I/GetMyiTunes( 1365): Authenticated... E/AndroidRuntime( 1365): at com.getmyitunes.project. ListFiles.getiTunes(ListFiles.java:131) E/AndroidRuntime( 1365): at com.getmyitunes.project. ListFiles.onCreate(ListFiles.java:82) W/ActivityManager( 535): Force finishing activity com.getmyitunes.project/.ListFiles W/ActivityManager( 535): Force finishing activity com.getmyitunes.project/.GetMyiTunes W/ActivityManager( 535): Activity pause timeout for ActivityRecord{42653f68 com.getmyitunes.project/.ListFiles} I/WindowManager( 535): WIN DEATH: Window{41f45e78 com.getmyitunes.project/com. getmyitunes.project.GetMyiTunes paused=true} I/ActivityManager( 535): Process com.getmyitunes.project (pid 1365) has died. W/ActivityManager( 535): Activity destroy timeout for ActivityRecord{425f5a70 com.getmyitunes.project/.GetMyiTunes} W/ActivityManager( 535): Activity destroy timeout for ActivityRecord{42653f68 com.getmyitunes.project/.ListFiles}

itgeek25
  • 203
  • 2
  • 7
  • 18

0 Answers0