加载文件时出现应用程序崩溃> 256MB的iPad [英] App Crash when loading a file> 256MB on the iPad

查看:750
本文介绍了加载文件时出现应用程序崩溃> 256MB的iPad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法理解崩溃应用程序的原因。如果有人遇到同样的问题,请告诉我。

I can not understand what the cause of the crash applications. If someone met the same problem, please tell me.

Cordova 3.5.0

插件版本:

FileTransfer 0.4。 4

文件1.2.0

InAppBrowse 0.5.0

Cordova 3.5.0
Plugins version:
FileTransfer 0.4.4
File 1.2.0
InAppBrowse 0.5.0

iPad 2版本7.1.2

上传文件时大于iOS> 256MB

iPad 2 version 7.1.2
Error uploading files iOS > 256MB

日志设备:

Jul 21 18:17:01 iPad-Sergej MyApp[160] <Warning>: CDVWebViewDelegate: Navigation started when state=1
Jul 21 18:17:01 iPad-Sergej MyApp[160] <Warning>: Failed to load webpage with error: CDVWebViewDelegate: Navigation started when state=1
Jul 21 18:17:01 iPad-Sergej MyApp[160] <Warning>: THREAD WARNING: ['File'] took '68.479980' ms. Plugin should use a background thread.
Jul 21 18:17:01 iPad-Sergej MyApp[160] <Error>: MyApp(160,0x3b50818c) malloc: *** mach_vm_map(size=408289280) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Jul 21 18:17:01 iPad-Sergej MyApp[160] <Error>: *** Terminating app due to uncaught exception 'NSFileHandleOperationException', reason: '*** -[NSConcreteFileHandle readDataOfLength:]: Cannot allocate memory'
*** First throw call stack:
(0x2e49af83 0x38f81ccf 0x2e49aec5 0x2ee49931 0x2ee49fe3 0xceee7 0xd1a8d 0xbcd09 0xbc9ff 0x2ee7b163 0x2e466167 0x2e465d7f 0x2e46411b 0x2e3ceebf 0x2e3ceca3 0x332c9663 0x30d1b14d 0xbffb7 0x3948eab7)
Jul 21 18:17:01 iPad-Sergej ReportCrash[161] <Notice>: ReportCrash acting against PID 160
Jul 21 18:17:02 iPad-Sergej ReportCrash[161] <Notice>: Formulating crash report for process MyApp[160]
Jul 21 18:17:02 iPad-Sergej mediaserverd[45] <Warning>: 18:17:02.266 [0x5ee000] CMSession retain count > 1!
Jul 21 18:17:02 iPad-Sergej com.apple.launchd[1] (UIKitApplication:com.MyApp[0xd3ac][160]) <Warning>: (UIKitApplication:com.MyApp[0xd3ac]) Job appears to have crashed: Abort trap: 6
Jul 21 18:17:02 iPad-Sergej backboardd[29] <Warning>: Application 'UIKitApplication:com.MyApp[0xd3ac]' exited abnormally with signal 6: Abort trap: 6
Jul 21 18:17:02 iPad-Sergej SpringBoard[33] <Warning>: [MPUSystemMediaControls] Updating supported commands for now playing application.
Jul 21 18:17:02 iPad-Sergej ReportCrash[161] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MyApp_2014-07-21-181701_iPad-Sergej.ips using uid: 0 gid: 0, synthetic_euid: 501 egid: 0

b>

function uploadVideo(meeting_id) {  
    navigator.camera.getPicture(
        successGetFileFromCamera,
        failGetFileFromCamera,
        {
            quality: 50,
            destinationType: navigator.camera.DestinationType.FILE_URI,
            sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY,
            mediaType: navigator.camera.MediaType.VIDEO
        }
    );

function successGetFileFromCamera(fileURI) {
    uploadFileToServ(fileURI);
}

function uploadFileToServ(fileURI) {
    window.resolveLocalFileSystemURL(fileURI, successGetFileFromLocal, failGetFileFromLocal);

    function successGetFileFromLocal(fileEntry) {
        fileEntry.file(successFile, failFile);
        function successFile(fileObj) {
            var localURL = fileObj.localURL,
                fileName = fileObj.name;

            var options = new FileUploadOptions();
            options.fileKey = "my_video";
            options.fileName = fileName;
            options.mimeType="video/mp4";
            var params = {};
            params.meeting_id = meeting_id;
            options.params = params;
            options.chunkedMode = true;

            var ft = new FileTransfer();
            ft.onprogress = function(progressEvent) {
                if(progressEvent.lengthComputable) {
                    updateProgress(Number(((progressEvent.loaded / progressEvent.total) * 100).toFixed(1)));
                }
            };
            showProgress();

            ft.upload(localURL, encodeURI(window.host + "/myserver/mobile/uploadFile/t:" + window.Token), successUploadFileToServ, failUploadFileToServ, options);
        }
}

}


推荐答案

我认为这是错误消息的关键部分:

I think this is the key part of the error message:


无法分配内存

Cannot allocate memory

iPad 2只有512MB的内存,所以你似乎是硬硬件。

The iPad 2 only has 512MB of RAM, so you appear to be pushing the hardware to hard.

这篇关于加载文件时出现应用程序崩溃&gt; 256MB的iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆