Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24244

Android: Large file uploads fail with java.lang.OutOfMemoryError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 6.0.0
    • Fix Version/s: Release 6.1.0
    • Component/s: Android
    • Labels:
    • Environment:

      Titanium SDK 6.0.0.GA and 5.5.1.GA

    • Story Points:
      5
    • Sprint:
      2017 Sprint 01 SDK

      Description

      Problem

      Summary: Uploading files larger than appx. 10 MB on older Android devices results in java.lang.OutOfMemoryError either called within httpclient.onerror, or as an uncaught exception viewable in LogCat before upload even starts.

      Expected behavior: Being able to upload the attached 50 MB file with no errors. Perhaps it doesn't upload in chunks?

      Actual behavior: httpclient.onerror is called with e.error: java.lang.OutOfMemoryError, or uncaught exception, depending on how much RAM device has.

      Test findings

      I've done a lot of testing to narrow this down.
      For simulators I exclusively used intel x86 images.
      I've tested exclusively with no apps running in the background.

      Here's my findings:

      OK: No error - the file is uploaded OK.
      Error 1: Out of memory error in httpclient.onerror
      Error 2: Uncaught exception, error in LogCat (generel output at bottom of this post)

      Android 4.1.2
      - Simulator, RAM: 200 MB RAM, Error 2
      - Simulator, RAM: 768 MB RAM, Error 1
      - Samsung Galaxy S3, RAM: 2GB, Error 1

      Android 4.2.2
      - Simulator, RAM: 768 MB RAM, OK
      - Simulator, RAM: 600 MB RAM, Error 1
      - Simulator, RAM: 200/400 MB RAM, Error 2

      Android 4.3.1 or 4.3
      - Galaxy Nexus, Android 4.3, RAM: 1GB, Error 2
      - Samsung Galaxy S3, Android 4.3, RAM: 2GB, Error 1
      - Simulator, RAM: 600 MB, Error 1
      - Simulator, RAM: 400 MB, Error 2

      Android 4.4.2
      - Simulator, RAM: 400 MB, Error 1
      - Simulator, RAM: 200 MB, emulator hangs completely on splash screen of app when launched

      - Simulator, RAM: 768 MB, OK

      Android 5.0.1
      - Simulator, RAM: 400 MB, OK
      - Simulator, RAM: 200 MB, OK

      Android 6.0
      - Simulator, Android 6.0, RAM: 200 MB, OK

      Android 7
      - OnePlus 3, Android 7, RAM: 6 GB RAM, OK
      - Simulator, Android 7, RAM: 768 MB RAM, OK
      - Simulator, Android 7, RAM: 200 MB RAM, OK

      Test conclusion

      On Android SDK versions below 5, for devices with little RAM, all uploads will fail with out of memory errors.

      Possible fix suggestion

      Perhaps detect Android versions below 5 when sending large files via httpclient, and upload those files in chunks instead of reading it all to memory.
      If httpclient is already using chunked uploads, maybe decrease chunk sizes.

      Test case

      Compiled APK here: https://bitfabrikken.dk/testapp.apk
      Test file for downloading here: https://bitfabrikken.dk/50mb_file.mp4 (just a linux dd-generated file with lots of dots)

      app.js

      var win = Ti.UI.createWindow({
          backgroundColor: "black",
      });
      win.addEventListener('open',function listener(){
          win.removeEventListener('open', listener);
          testupload();
      });
       
       
      var progressLabel = Ti.UI.createLabel({
          text: "0%",
          color: "white",
          font: { fontSize: 50},
          bottom: 10,
          left: 10,
      });
      win.add(progressLabel);
       
       
      win.open();
       
       
      function testupload(){
       
          //any resolvable hostname will do for this test, but I setup a simple php file that simply prints "OK" on any request
          var url = "https://bitfabrikken.dk/testupload.php"; 
          var xhr = Ti.Network.createHTTPClient({
      		//various parameters below I've tried that don't work 
              //enableKeepAlive: false,
              //keepAlive:  false,
              //autoEncodeUrl: false,
              //validatesSecureCertificate: true,
              //timeout: 10000000,
          });     
          xhr.onsendstream = function(e){
              progressLabel.text = parseInt(e.progress * 100)+"%";
          };
          xhr.onerror = function(e){
              console.log("xhr.onerror:");
              console.log(e);
              alert(JSON.stringify(e));
          }; 
          xhr.onload = function(e){
              //this.responseText should be "OK"
              alert("SUCCESS!");
              console.log("SUCCESS!");
          };   
             
          xhr.open("POST", url); 
          
          var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "50mb_file.mp4");
          if (!file.exists()){
              alert("file not found");
              return; 
          }    
       
          //various different headers I've tried, same error
              //xhr.setRequestHeader("Connection","Close");
              //xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
              //xhr.setRequestHeader("enctype", "multipart/form-data");
          
          console.log("SENDING FILE, size: "+(file.size/1024/1024)+" MB");
          
          xhr.send({
              file: file
          });
          
          
      }    
      

      Logs

      httpclient.onerror is called with the following:

      console

      {
          "code": -1,
          "source": {
              "responseText": "",
              "location": "http://website.com/",
              "status": 0,
              "domain": null,
              "readyState": 1,
              "tlsVersion": 3,
              "connectionType": "POST",
              "validatesSecureCertificate": true,
              "statusText": null,
              "username": null,
              "password": null,
              "allResponseHeaders": "",
              "responseXML": null,
              "responseData": null,
              "autoRedirect": true,
              "apiName": "Ti.Network.HTTPClient",
              "autoEncodeUrl": true,
              "connected": false,
              "bubbleParent": true,
              "_events": {
                  "disposehandle": {}
              }
          },
          "error": "java.lang.OutOfMemoryError",
          "success": false
      }
      

      Build log

      build_log

      2016-12-20T09:36:55.012Z | TRACE  | set environment to {"registry":"https://software.appcelerator.com","security":"https://security.appcelerator.com","baseurl":"https://platform.appcelerator.com"}
      2016-12-20T09:36:55.013Z | TRACE  | checking credentials for existing session
      2016-12-20T09:36:55.236Z | TRACE  | Attempting to load session info from config file
      2016-12-20T09:36:55.240Z | TRACE  | check if session is invalidated
      2016-12-20T09:36:56.102Z | TRACE  | registry result 200 application/json undefined undefined false undefined
      2016-12-20T09:36:56.130Z | TRACE  | registry returned { expiry: 1482831414645 }
      2016-12-20T09:36:56.130Z | TRACE  | refresh session expiry to:  1482831414645
      2016-12-20T09:36:56.133Z | TRACE  | session expiry 1482831414645 false
      2016-12-20T09:36:56.134Z | TRACE  | Arrow Cloud config file: C:\Users\kronholm\.acs
      2016-12-20T09:36:56.135Z | TRACE  | found Arrow Cloud login { mid: 'CENSORED',
        publishPort: 443,
        publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
        username: 'CENSORED',
        cookie: [ 'connect.sid=CENSORED; Path=/; Expires=Tue, 03 Jan 2017 07:45:16 GMT; HttpOnly' ],
        defaultEP: 
         { publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
           publishPort: 443 } } , checking nodeACSEndpoint= https://admin.cloudapp-enterprise.appcelerator.com
      2016-12-20T09:36:56.137Z | TRACE  | Arrow Cloud cookie expiry [ 1483429516000 ]
      2016-12-20T09:36:56.137Z | TRACE  | session already loaded in opts.session
      2016-12-20T09:36:56.139Z | TRACE  | getCredentials() session:
      {
        "ipaddress": "10.0.0.6",
        "username": "CENSORED",
        "password": "<OMITTED>",
        "session": "<OMITTED>",
        "nonce": "<OMITTED>",
        "environment": {
          "name": "production",
          "isProduction": true,
          "acsBaseUrl": "https://api.cloud.appcelerator.com",
          "acsAuthBaseUrl": "https://secure-identity.cloud.appcelerator.com",
          "nodeACSEndpoint": "https://admin.cloudapp-enterprise.appcelerator.com"
        },
        "token": "<OMITTED>",
        "fingerprint": "CENSORED",
        "fingerprint_description": "Windows Machine ID: CENSORED",
        "org_id": 100008383,
        "expiry": 1482831414645
      }
      2016-12-20T09:36:56.140Z | TRACE  | loading plugins for command "run"
      2016-12-20T09:36:56.181Z | TRACE  | run search paths:
      [
        "C:\\Users\\kronholm\\.appcelerator\\install\\6.1.0\\package",
        "C:\\Users\\kronholm\\.appcelerator\\install\\6.1.0\\package\\node_modules",
        "C:\\Windows\\system32\\node_modules",
        "C:\\Windows\\node_modules",
        "C:\\node_modules",
        "C:\\Users\\kronholm\\.appcelerator\\.npm\\lib\\node_modules"
      ]
      2016-12-20T09:36:56.182Z | DEBUG  | [PLUGIN-LOAD] 0ms C:\Users\kronholm\.appcelerator\install\6.1.0\package\appc.js
      2016-12-20T09:36:56.407Z | DEBUG  | [PLUGIN-LOAD] 224ms C:\Users\kronholm\.appcelerator\install\6.1.0\package\node_modules\appc-cli-titanium\appc.js
      2016-12-20T09:36:56.407Z | DEBUG  | run plugin: C:\Users\kronholm\.appcelerator\install\6.1.0\package\node_modules\appc-cli-titanium
      2016-12-20T09:36:56.408Z | DEBUG  | [PLUGIN-LOAD] 0ms C:\Users\kronholm\.appcelerator\install\6.1.0\package\node_modules\arrow\appc.js
      2016-12-20T09:36:56.410Z | DEBUG  | run plugin: C:\Users\kronholm\.appcelerator\install\6.1.0\package\node_modules\arrow
      2016-12-20T09:36:56.413Z | TRACE  | plugin "arrow" failed its "when" function check, skipping...
      2016-12-20T09:36:56.414Z | TRACE  | loading plugin "titanium" for command "run" CLI options via function
      2016-12-20T09:36:56.414Z | TRACE  | loading plugin "titanium" for command "run" CLI options via array
      2016-12-20T09:36:56.415Z | TRACE  | executing command "run" with the following plugins:
      ["titanium"]
      2016-12-20T09:36:56.416Z | TRACE  | Attempting to load session info from config file
      2016-12-20T09:36:56.418Z | TRACE  | check if session is invalidated
      2016-12-20T09:36:57.077Z | TRACE  | registry result 200 application/json undefined undefined false undefined
      2016-12-20T09:36:57.078Z | TRACE  | registry returned { expiry: 1482831415635 }
      2016-12-20T09:36:57.078Z | TRACE  | refresh session expiry to:  1482831415635
      2016-12-20T09:36:57.080Z | TRACE  | session expiry 1482831415635 false
      2016-12-20T09:36:57.080Z | TRACE  | session already loaded in opts.session
      2016-12-20T09:36:57.105Z | DEBUG  | Titanium Downloads Last Checked: 1482225107758
      2016-12-20T09:36:57.128Z | TRACE  | No project alloy hook; skipping update to 1.0.0
      2016-12-20 10:37:00
      Operating System
        Name                        = Microsoft Windows 10 Pro
        Version                     = 10.0.14393
        Architecture                = 32bit
        # CPUs                      = 8
        Memory                      = 34270777344
      Node.js
        Node.js Version             = 4.5.0
        npm Version                 = 2.15.9
      Titanium CLI
        CLI Version                 = 5.0.11
      Titanium SDK
        SDK Version                 = 6.0.0.GA
        SDK Path                    = C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA
        Target Platform             = android
      Command
        C:\Program Files (x86)\nodejs\node.exe C:\Users\kronholm\.appcelerator\install\6.1.0\package\node_modules\titanium\lib\titanium.js build run --platform android --sdk 6.0.0.GA --log-level trace --project-dir C:\Dropbox\apps\testapp --deploy-type production --target dist-playstore --android-sdk C:\android --output-dir C:\Dropbox\apps\testapp --api-level 13 --alias tidev --keystore C:\Dropbox\apps\testapp\dev_keystore --store-password tirocks --key-password tirocks --no-colors --no-progress-bars --no-prompt --no-banner --prompt-type socket-bundle --prompt-port 60573 --username dan@bitfabrikken.dk --password khpcvnwr --config-file C:\Users\kronholm\AppData\Local\Temp\build-1482226617081.json --no-banner --project-dir C:\Dropbox\apps\testapp
      [INFO] :   Deploy type: production
      [INFO] :   Building for target: dist-playstore
      [INFO] :   Targeting Android SDK API: 23
      [INFO] :   Building for the following architectures: armeabi-v7a, x86
      [INFO] :   Signing with keystore: C:\Dropbox\apps\testapp\dev_keystore (tidev)
      [INFO] :   Debugging disabled
      [INFO] :   Profiler disabled
      [INFO] :   Forcing rebuild: JavaScript files need to be re-encrypted
      [INFO] :   JavaScript files need to be encrypted
      [INFO] :   Processing JavaScript files
      [INFO] :   Encrypting JavaScript files: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\titanium_prep.win32.exe "dk.bitfabrikken.testapp" "C:\Dropbox\apps\testapp\build\android\assets" "app.js" "_app_props_.json"
      [INFO] :   Writing C:\Dropbox\apps\testapp\build\android\bin\assets\app.json
      [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-analytics.res.zip
      [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-android.res.zip
      [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-filesystem.res.zip
      [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-app.res.zip
      [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-media.res.zip
      [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-locale.res.zip
      [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-network.res.zip
      [INFO] :   Extracting module resources: C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-xml.res.zip
      [INFO] :   No aidl files to compile, continuing
      [INFO] :   Generating i18n files
      [INFO] :   Generating C:\Dropbox\apps\testapp\build\android\res\values\theme.xml
      [INFO] :   Packaging application: C:\android\build-tools\23.0.3\aapt.exe "package" "-f" "-m" "-J" "C:\Dropbox\apps\testapp\build\android\gen" "-M" "C:\Dropbox\apps\testapp\build\android\AndroidManifest.xml" "-A" "C:\Dropbox\apps\testapp\build\android\bin\assets" "-S" "C:\Dropbox\apps\testapp\build\android\res" "-I" "C:\android\platforms\android-23\android.jar" "-F" "C:\Dropbox\apps\testapp\build\android\bin\app.ap_" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview" "-S" "C:\Users\kronholm\AppData\Local\Temp\1161120-5884-1wr5l8w/res" "-S" "C:\Users\kronholm\AppData\Local\Temp\1161120-5884-62j53h/res" "-S" "C:\Users\kronholm\AppData\Local\Temp\1161120-5884-1t1lh48/res"
      [INFO] :   Building Java source files: c:\Program Files (x86)\Java\jdk1.8.0_111\bin\javac.exe "-J-Xmx1024M" "-encoding" "utf8" "-bootclasspath" "C:\android\platforms\android-23\android.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\kroll-v8.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-analytics.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\aps-analytics.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-android.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\jaxen-1.1.1.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\ti-commons-codec-1.3.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\kroll-common.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\titanium.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\android-support-multidex.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-filesystem.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-app.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-ui.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\nineoldandroids-appc-2.4.0.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-media.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-appcompat.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\android-support-v4.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\android-support-v7-appcompat.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-cardview.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\cardview-v7-23.0.1.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-locale.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-network.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-xml.jar;C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\lib\titanium-verify.jar;R.class;AssetCryptImpl.class;TestappActivity.class;TestappAppInfo.class;TestappApplication.class" "-d" "C:\Dropbox\apps\testapp\build\android\bin\classes" "-proc:none" "-target" "1.6" "-source" "1.6" "@C:\Dropbox\apps\testapp\build\android\java-sources.txt"
      [INFO] :   Running dexer: c:\Program Files (x86)\Java\jdk1.8.0_111\bin\java.exe "-Xmx1024M" "-XX:-UseGCOverheadLimit" "-Djava.ext.dirs=C:\android\platform-tools" "-jar" "C:\android\build-tools\23.0.3\lib\dx.jar" "--dex" "--multi-dex" "--output=C:\Dropbox\apps\testapp\build\android\bin\dexfiles" "C:\Dropbox\apps\testapp\build\android\bin\classes" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\lib\titanium-verify.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\kroll-v8.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-analytics.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\aps-analytics.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-android.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\jaxen-1.1.1.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\ti-commons-codec-1.3.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\kroll-common.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\titanium.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\android-support-multidex.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-filesystem.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-app.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-ui.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\nineoldandroids-appc-2.4.0.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-media.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-appcompat.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\android-support-v4.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\android-support-v7-appcompat.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-cardview.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\cardview-v7-23.0.1.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-locale.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-network.jar" "C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.GA\android\modules\titanium-xml.jar"
      [INFO] :   Creating unsigned apk
      [INFO] :   Processing C:\Dropbox\apps\testapp\build\android\bin\dexfiles
      [INFO] :   Processing C:\Dropbox\apps\testapp\build\android\src
      [INFO] :   Writing unsigned apk: C:\Dropbox\apps\testapp\build\android\bin\app-unsigned.apk
      [INFO] :   Using MD5withRSA signature algorithm
      [INFO] :   Signing apk: c:\Program Files (x86)\Java\jdk1.8.0_111\bin\jarsigner.exe "-sigalg" "MD5withRSA" "-digestalg" "SHA1" "-keystore" "C:\Dropbox\apps\testapp\dev_keystore" "-storepass" "*******" "-keypass" "tirocks" "-signedjar" "C:\Dropbox\apps\testapp\build\android\bin\testapp.apk" "C:\Dropbox\apps\testapp\build\android\bin\app-unsigned.apk" "tidev"
      [INFO] :   Aligning zip file: C:\android\build-tools\23.0.3\zipalign.exe "-v" "4" "C:\Dropbox\apps\testapp\build\android\bin\testapp.apk" "C:\Dropbox\apps\testapp\build\android\bin\testapp.apkz"
      [INFO] :   Writing build manifest: C:\Dropbox\apps\testapp\build\android\build-manifest.json
      [INFO] :   Packaging complete
      [INFO] :   Package location: C:\Dropbox\apps\testapp\testapp.apk
      [INFO] :   Project built successfully in 18s 889ms
      

      Logcat error when httpclient.error is not triggered - this usually happens before upload can get going

      logcat_error

      12-20 11:39:41.244: E/dalvikvm-heap(4508): Out of memory on a 52428816-byte allocation.
      12-20 11:39:41.244: I/dalvikvm(4508): "main" prio=5 tid=1 RUNNABLE
      12-20 11:39:41.244: I/dalvikvm(4508):   | group="main" sCount=0 dsCount=0 obj=0x4187b578 self=0x417e61c0
      12-20 11:39:41.244: I/dalvikvm(4508):   | sysTid=4508 nice=0 sched=0/0 cgrp=apps handle=1075089404
      12-20 11:39:41.244: I/dalvikvm(4508):   | state=R schedstat=( 0 0 0 ) utm=450 stm=226 core=1
      12-20 11:39:41.244: I/dalvikvm(4508):   at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:~122)
      12-20 11:39:41.252: I/dalvikvm(4508):   at org.appcelerator.kroll.util.KrollStreamHelper.toByteArray(KrollStreamHelper.java:81)
      12-20 11:39:41.252: I/dalvikvm(4508):   at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:327)
      12-20 11:39:41.252: I/dalvikvm(4508):   at ti.modules.titanium.network.TiHTTPClient.addTitaniumFileAsPostData(TiHTTPClient.java:866)
      12-20 11:39:41.252: I/dalvikvm(4508):   at ti.modules.titanium.network.TiHTTPClient.send(TiHTTPClient.java:1036)
      12-20 11:39:41.260: I/dalvikvm(4508):   at ti.modules.titanium.network.HTTPClientProxy.send(HTTPClientProxy.java:148)
      12-20 11:39:41.260: I/dalvikvm(4508):   at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
      12-20 11:39:41.260: I/dalvikvm(4508):   at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
      12-20 11:39:41.260: I/dalvikvm(4508):   at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:872)
      12-20 11:39:41.260: I/dalvikvm(4508):   at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1095)
      12-20 11:39:41.260: I/dalvikvm(4508):   at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:354)
      12-20 11:39:41.260: I/dalvikvm(4508):   at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:116)
      12-20 11:39:41.260: I/dalvikvm(4508):   at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:453)
      12-20 11:39:41.260: I/dalvikvm(4508):   at android.os.Handler.dispatchMessage(Handler.java:95)
      12-20 11:39:41.268: I/dalvikvm(4508):   at android.os.Looper.loop(Looper.java:137)
      12-20 11:39:41.268: I/dalvikvm(4508):   at android.app.ActivityThread.main(ActivityThread.java:5103)
      12-20 11:39:41.268: I/dalvikvm(4508):   at java.lang.reflect.Method.invokeNative(Native Method)
      12-20 11:39:41.268: I/dalvikvm(4508):   at java.lang.reflect.Method.invoke(Method.java:525)
      12-20 11:39:41.276: I/dalvikvm(4508):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
      12-20 11:39:41.276: I/dalvikvm(4508):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
      12-20 11:39:41.276: I/dalvikvm(4508):   at dalvik.system.NativeStart.main(Native Method)
      12-20 11:39:41.284: W/System.err(4508): java.lang.OutOfMemoryError
      12-20 11:39:41.291: W/System.err(4508): 	at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:122)
      12-20 11:39:41.291: W/System.err(4508): 	at org.appcelerator.kroll.util.KrollStreamHelper.toByteArray(KrollStreamHelper.java:81)
      12-20 11:39:41.291: W/System.err(4508): 	at org.appcelerator.titanium.TiBlob.getBytes(TiBlob.java:327)
      12-20 11:39:41.291: W/System.err(4508): 	at ti.modules.titanium.network.TiHTTPClient.addTitaniumFileAsPostData(TiHTTPClient.java:866)
      12-20 11:39:41.291: W/System.err(4508): 	at ti.modules.titanium.network.TiHTTPClient.send(TiHTTPClient.java:1036)
      12-20 11:39:41.291: W/System.err(4508): 	at ti.modules.titanium.network.HTTPClientProxy.send(HTTPClientProxy.java:148)
      12-20 11:39:41.291: W/System.err(4508): 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
      12-20 11:39:41.291: W/System.err(4508): 	at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
      12-20 11:39:41.291: W/System.err(4508): 	at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:872)
      12-20 11:39:41.291: W/System.err(4508): 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1095)
      12-20 11:39:41.291: W/System.err(4508): 	at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:354)
      12-20 11:39:41.291: W/System.err(4508): 	at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:116)
      12-20 11:39:41.291: W/System.err(4508): 	at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:453)
      12-20 11:39:41.291: W/System.err(4508): 	at android.os.Handler.dispatchMessage(Handler.java:95)
      12-20 11:39:41.291: W/System.err(4508): 	at android.os.Looper.loop(Looper.java:137)
      12-20 11:39:41.291: W/System.err(4508): 	at android.app.ActivityThread.main(ActivityThread.java:5103)
      12-20 11:39:41.291: W/System.err(4508): 	at java.lang.reflect.Method.invokeNative(Native Method)
      12-20 11:39:41.291: W/System.err(4508): 	at java.lang.reflect.Method.invoke(Method.java:525)
      12-20 11:39:41.299: W/System.err(4508): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
      12-20 11:39:41.299: W/System.err(4508): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
      12-20 11:39:41.299: W/System.err(4508): 	at dalvik.system.NativeStart.main(Native Method)
      12-20 11:39:41.307: E/TiExceptionHandler(4508): (main) [2763,2763] ----- Titanium Javascript Runtime Error -----
      12-20 11:39:41.307: E/TiExceptionHandler(4508): (main) [0,2763] - In ti:/httpclient.js:28,9
      12-20 11:39:41.307: E/TiExceptionHandler(4508): (main) [1,2764] - Message: Uncaught Java Exception occurred
      12-20 11:39:41.307: E/TiExceptionHandler(4508): (main) [0,2764] - Source: 		_send.call(this, options);
      12-20 11:39:41.307: E/V8Exception(4508): Exception occurred at ti:/httpclient.js:28: Uncaught Java Exception occurred
      12-20 11:39:41.307: E/V8Exception(4508): Java Exception occurred

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              kronholm Bitfabrikken - Dan Wulff Kronholm
              Reviewer:
              Frankie Merzadyan (Inactive)
              Tester:
              Abir Mukherjee
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-10359
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code