Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2613] framework accessing /mnt/sdcard and fails on devices without sd card.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-11T22:24:52.000+0000
Affected Version/sRelease 1.5.0, Release 1.8.0.1
Fix Version/sSprint 2012-01, Release 2.0.0, Release 1.8.1
ComponentsAndroid
Labelsmodule_filesystem, qe-testadded
ReporterMatt Schmulen
AssigneeAllen Yeung
Created2011-04-15T03:24:47.000+0000
Updated2012-03-11T22:24:52.000+0000

Description

When accessing the remote portrait url, the low level framework is not using /data on the local disk but rather always using /mnt/sdcard (even though there is no SD card mounted) when caching the image data.

http://developer.appcelerator.com/helpdesk/view/59711">http://developer.appcelerator.com/helpdesk/view/59711

Comments

  1. Dawson Toth 2011-04-15

    Sample Code

       var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
       
       win.add(Ti.UI.createImageView({
           top: 0, left: 0, width: 100, height: 50,
           image: 'http://www.appcelerator.com/wp-content/themes/appcelerator/img/APPC_logo.png'
       }));
       
       win.open();
       

    Steps to Reproduce with Sample

    1. Run the app. You'll see the Appcelerator logo.
    2. Close the app.
    3. Unmount the SDCard on the simulator / phone.
    4. Run the app. You'll see a white screen.

    Log

    No exceptions were shown in the trace level log.

       [TRACE] I/TiRootActivity( 304): (Thread-17) [2,2] eval app.js
       [TRACE] D/KrollContext( 304): (kroll$3) [4,6] Running evaluated script: app://app.js
       [TRACE] I/ActivityManager( 60): Displayed activity com.dawson.playground2/.Playground2Activity: 1541 ms (total 1541 ms)
       

    Tested On

    Titanium Mobile 1.6.0 (02/01/11 17:45 a632082...)
    BROKEN on Android Simulator 2.2

  2. Rob Gabbard 2011-09-01

    Is there any update on a fix for this? This is pretty major and I can't release!
  3. Ruben Fonseca 2011-09-28

    I'm suffering hard from exactly this problem, this is pretty huge, please fix this!
  4. Allen Yeung 2011-10-05

       Titanium.UI.setBackgroundColor('#000');
       
       var tabGroup = Titanium.UI.createTabGroup();
       
       var webview = Ti.UI.createImageView({
           top: 0, left: 0, width: 100, height: 50,
           image: 'http://www.appcelerator.com/wp-content/themes/appcelerator/img/APPC_logo.png'
       });
       
       var win1 = Titanium.UI.createWindow({  
           title:'Tab 1',
           backgroundColor:'#fff'
       });
       
       win1.add(webview);
       
       var tab1 = Titanium.UI.createTab({  
           icon:'KS_nav_views.png',
           title:'Tab 1',
           window:win1
       });
       
       var win2 = Titanium.UI.createWindow({  
           title:'Tab 2',
           backgroundColor:'#fff'
       });
       var tab2 = Titanium.UI.createTab({  
           icon:'KS_nav_ui.png',
           title:'Tab 2',
           window:win2
       });
       
       var label2 = Ti.UI.createImageView({
           top: 0, left: 0, width: 100, height: 50,
           image: 'http://www.appcelerator.com/wp-content/themes/appcelerator/img/APPC_logo.png'
       });
       
       win2.add(label2);
       
       tabGroup.addTab(tab1);
       tabGroup.addTab(tab2);  
       
       tabGroup.open();
       
    There are three scenarios that need to be tested for Timob-2613 With SD card mounted 1. Verify that sd card is mounted 2. Launch app and verify the icon appears 3. Confirm that the images are stored in the correct location: /mnt/sdcard/Android/data//cache/_tmp/remote-cache Without SD card 1. Verify that sd card is unmounted 2. Launch app and verify the icon appears 3. Confirm that the images are stored in the correct location (should be internal storage): /data/data//cache/_tmp/remote-cache Remove SD card while app is running 1. Verify that sd card is mounted 2. Launch app and verify the icon appears 3. Go to settings and unmount sd card 4. Hold home button and go back to your app 5. Click on the second tab, and verify that the image appears
  5. Michael Pettiford 2011-12-10

    When testing this with 1.8.0.1RC1 I am not getting the remote-image-cache directory.
  6. Marshall Culpepper 2011-12-27

    @Michael can you provide more details? Which test specifically did the remote-image-cache directory fail to show in? Can you test this again against the GA? I'm targetting this as tbs-1.8.1 until we can verify if this was fixed or not.
  7. Opie Cyrus 2011-12-30

    updating sprint till issue can be confirmed or not.
  8. Allen Yeung 2012-01-04

    Just tested this in the master branch, and confirmed that it is working. Note that I had to test the "without sd card" and "remove sd card while app is running" scenarios with an emulator since I didn't have read permissions for the data directory on my test phone.
  9. Marshall Culpepper 2012-01-10

    This was confirmed again by Allen, resolving
  10. Natalie Huynh 2012-01-19

    Tested with 1.9.0.v20120119110134 with Droid 3 (2.3.4) for Step 2 from Allen, need to ran on Emulator to confirm the files in /data/data/...

JSON Source