AsyncTask loadfile 返回函数中的 bmp 它只是 android OS 3.12 唯一错误我如何优化 asyncTask?
File tileFile = null;
tileFile = layerTmp.urlMaker_.makeCacheFile(DEFAULT_TILE_CACHE_PATH, tileTmp.tileCoords, (mapView_.getZoomLevel() - mapView_.getAdjustLevelPoint()), layer.layerName_);
if(tileFile != null) {
fis = new FileInputStream(tileFile);
} else {
throw new Exception("load error");
}
out = new ByteArrayOutputStream();
bis = new BufferedInputStream(fis);
if (isCancelled()) throw new Exception("task cancel");
boolean isComplete = false;
isComplete = interruptableStreamCopy(bis, out);
if (!isComplete) throw new Exception("task cancel");
out.flush();
final byte[] data = out.toByteArray();
out.close();
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPreferredConfig = Bitmap.Config.RGB_565;
options.inDither = false; //Disable Dithering mode
options.inPurgeable=true; //Tell to gc that whether it needs free memory, the Bitmap can be cleared
options.inInputShareable=true; //Which kind of reference will be used to recover the Bitmap data after being clear, when it will be used in the future
options.inTempStorage=new byte[32 * 1024];
bmp = BitmapFactory.decodeByteArray(data, 0, data.length, options);
if (bmp == null) {
if(tileFile != null)
tileFile.delete();
try {
throw new IOException("Image file was not decodable: "+ tileFile);
} catch (IOException e) {
e.printStackTrace();
}
}
if (isCancelled()) throw new Exception("task cancel");
if (mapView_.getAdjustLevelPoint() > 0) {
bmp = Bitmap.createScaledBitmap(bmp , bmp.getWidth() << mapView_.getAdjustLevelPoint(), bmp.getHeight() << mapView_.getAdjustLevelPoint(), true);
}
10-18 08:40:15.095:我/调试(30889):** * ** * * * * ** * ** * *10-18 08:40:15.095:I/DEBUG(30889):构建指纹:'lge/express_lgu_kr/express:3.2.1/HTK75D/LG-LU8300-V130.47A6032B:user/release-keys' 10-18 08 :40:15.095: I/DEBUG(30889): pid: 31983, tid: 31983 >>> kr.co.lgupgis.map <<< 10-18 08:40:15.095: I/DEBUG(30889): 信号 11 (SIGSEGV), 代码 1 (SEGV_MAPERR), 故障地址 595b7900 10-18 08:40:15.095: I/DEBUG(30889): r0 413784bc r1 595b7900 r2 00000200 r3 00000000 10-18 08/I5:40: 30889): r4 595b7800 r5 413783bc r6 000000e5 r7 00000200 10-18 08:40:15.095: I/DEBUG(30889): r8 00000d00 r9 00000100 10 00000200 fp 40fa67c8 10-18 08:40:15.095: I/DEBUG(30889) : ip 00000002 sp be91decc lr ab18d714 pc aff0c9a8 cpsr 20000010 10-18 08:40:15.095: I/DEBUG(30889): d0 ffd7ffd7ffd7d696 d1 ffd7ffd7ffd7ffd7 10-18 08:40:15.095: I/DEBUG(30889):d2 ffd7ffd7ffd7ffd7 d3 ffd7ffd7ffd7ffd7 10-18 08:40:15.095: I/DEBUG(30889): d4 ffd7ffd7ffd7ffd7 d5 ffd7ffd7ffd7ffd7 10-18 08:40:15.095: I/DEBUG(30889): d6 ffd7ffd7ffd7ffd7 d7 ffd7ffd7ffd7ffd7 10-18 08:40 :15.095:I/DEBUG(30889):D8 0000037A3F000000 D9 4433C00000000003CF 10-18 08:40:40:15.095:I/DEBUG(30889):D10 3F7B9ADFER3DFE7B1 D11 D11 D11 3FE5FE53FE53FE53923E0 COMETIGE d12 3f63fa43864086f2 d13 3ee0ba74ce830ace 10-18 08:40:15.095: I/DEBUG(30889): d14 3e664d97e3daa951 d15 3df0179b74c46cff 10-18 08:40:15.095: I/DEBUG(30889): d16 ffd7ffd7ffd7ffd7 d17 ffd7ffd7ffd7ffd7 10-18 08:40 :15.095: I/DEBUG(30889): d18 ffd7ffd7ffd7ffd7 d19 ffd7ffd7ffd7ffd7 10-18 08:40:15.095: I/DEBUG(30889): d20 ffd7ffd7ffd7ffd7 d21 ffd7ffd7ffd7ffd7 10-18 08:40:15.095: I/DEBUG(30889):d22 ffd7ffd7ffd7ffd7 d23 ffd7ffd7ffd7ffd7 10-18 08:40:15.095: I/DEBUG(30889): d24 ce00ff00fa05ea15 d25 ff00ff00ff00de00 10-18 08:40:15.095: I/DEBUG(30889): d26 c700fb00fa05ea15 d27 f700f700f700d700 10-18 08:40 :15.095:i/debug(30889):D28 FFFC8934FFFC8934 D29 FFFC8934FFFC8934 10-18 08:40:40:15.095:I/DEBUG(I/DEBUG(30889):D30 0001000001000001000000 DABER SCR 20000012 10-18 08:40:15.175: I/DEBUG(30889):SCR 20000012 10-18 08:40:15.175: I/DEBUG(30889):SCR 20000012 10-18 08:40:15.175: I/DEBUG(30889):
00 pc 0000c9a8 /system/lib/libc.so 10-18 08:40:15.175: I/DEBUG(30889): #01 lr ab18d714 /system/lib/libskia.so
10-18 08:40:15.175:I/DEBUG(30889):libc 基地址:aff00000 10-18 08:40:15.175:I/DEBUG(30889):PC 周围代码:10-18 08:40:15.175: I/DEBUG(30889): aff0c988 f461428d e25cc001 f400028d f400428d 10-18 08:40:15.175: I/DEBUG(30889): aff0c998 f440028d f440428d 1afffff4 e3a0c006 10-18 08:40:15.175: I/DEBUG(30889): aff0c9a8 f421028d f421428d f461028d f461428d 10-18 08:40:15.175: I/DEBUG(30889): aff0c9b8 e25cc001 f400028d f400428d f440028d 10-18 08:40:15.175: I/DEBUG(30889): aff0c9c8 f440428d 1afffff5 e212207f 0a00001e 10-18 08 :40:15.175:I / DEBUG(30889):lr周围的代码:10-18 08:40:15.175:I / DEBUG(30889):ab18d6f4 e0243e97 e08b5002 e0804004 e1a00005 10-18 08:40(15.175:I / DEBUG 30889): ab18d704 e1a01004 e2866001 e1a0200a ebfe7597 10-18 08:40:15.175: I/DEBUG(30889): ab18d714 e1560009 e0855008 e0844007 1afffff6 10-18 815.175: I/DEBUG(30889): ab18d724 e8bd8ff8 e590c004 e92d4ff0 e1a05003 10-18 08:40:15.175: I/DEBUG(30889): ab18d734 e59c6018 e24dd014 e5903008 e1a0e081 10-18 08:40:15.175: I/DEBUG(30889) : 堆栈: 10-18 08:40:15.175: I/DEBUG(30889): be91de8c ab16e9cc /system/lib/libskia.so 10-18 08:40:15.175: I/DEBUG(30889): be91de90 001b6944 10-18 08:40:15.175: I/DEBUG(30889): be91de94 001b6944 10-18 08:40:15.175: I/DEBUG(30889): be91de98 5959b000 10-18 08:40:15.175: I/DEBUG(30889): be91 ab14f218 /system/lib/libskia.so 10-18 08:40:15.175: I/DEBUG(30889):be91de8c ab16e9cc /system/lib/libskia.so 10-18 08:40:15.175: I/DEBUG(30889): be91de90 001b6944 10-18 08:40:15.175: I/DEBUG(30889): be91de94 001b6944 10-18 08 :40:15.175: I/DEBUG(30889): be91de98 5959b000 10-18 08:40:15.175: I/DEBUG(30889): be91de9c ab14f218 /system/lib/libskia.so 10-18 08:40:15.175: I /调试(30889):be91de8c ab16e9cc /system/lib/libskia.so 10-18 08:40:15.175: I/DEBUG(30889): be91de90 001b6944 10-18 08:40:15.175: I/DEBUG(30889): be91de94 001b6944 10-18 08 :40:15.175: I/DEBUG(30889): be91de98 5959b000 10-18 08:40:15.175: I/DEBUG(30889): be91de9c ab14f218 /system/lib/libskia.so 10-18 08:40:15.175: I /调试(30889):
be91dea0 00000000 10-18 08:40:15.175: I/DEBUG(30889): be91dea4 001b6944 10-18 08:40:15.175: I/DEBUG(30889): be91dea8 be91e03c 10-18 08:40:15.71. (30889): be91deac ab165dd4 /system/lib/libskia.so 10-18 08:40:15.175: I/DEBUG(30889):
be91deb0 ab204b80 10-18 08:40:15.175: I/DEBUG(30889): be91deb4 ab18d3b8 /system/lib/libskia.so 10-18 08:40:15.175: I/DEBUG(30889):
be91deb8 be91e03c 10-18 08:40:15.175: I/DEBUG(30889): be91debc ab14e4d8 /system/lib/libskia .so 10-18 08:40:15.175:我/调试(30889):
be91dec0 df002777 10-18 08:40:15.175: I/DEBUG(30889): be91dec4 e3a070ad 10-18 08:40:15.175: I/DEBUG(30889): be91dec8 be91e160 10-18 08:40:15.175: I/DEBUG (30889): #00 be91decc 413783bc 10-18 08:40:15.175: I/DEBUG(30889): be91ded0 00000100 10-18 08:40:15.175: I/DEBUG(30889): be91ded4 001b68f0 10-18 08:40 :15.175: I/DEBUG(30889): be91ded8 000004cf 10-18 08:40:15.175: I/DEBUG(30889): be91dedc 00193bd0 10-18 08:40:15.175: I/DEBUG(30889): be91dee0 be9116 18 08:40:15.175: I/DEBUG(30889): be91dee4 00000001 10-18 08:40:15.175: I/DEBUG(30889): be91dee8 be91e1f8 10-18 08:40:15.175: I/DEBUG(30889): be91deec be91e03c 10-18 08:40:15.175: I/DEBUG(30889): be91def0 0000027a 10-18 08:40:15.175: I/DEBUG(30889):be91def4 ab171880 /system/lib/libskia.so 10-18 08:40:15.175: I/DEBUG(30889):
be91def8 00000100 10-18 08:40:15.175: I/DEBUG(30889): be91defc be91e03c 10-18 08:40:15.175: I/DEBUG(30889): be91df00 00000124 10-18 08:40:15.175: (30889): be91df04 00000000 10-18 08:40:15.175: I/DEBUG(30889): be91df08 000003cf 10-18 08:40:15.175: I/DEBUG(30889): be91df0c be91e03c 10-18 08:10-18 08:1 : I/DEBUG(30889): be91df10 000000c0 10-18 08:40:15.355: D/RPC(352): 3000008c:00050000 收到 CALL。10-18 08:40:15.355: D/libloc(352): 事件 RPC_LOC_EVENT_NMEA_1HZ_REPORT(客户端 1) 10-18 08:40:15.355: D/libloc(352): loc_eng_process_loc_event: 4 10-18 08:40:15.355: D/libloc(352): loc_eng_report_nmea: $GSV 10-18 08:40:15.355: D/libloc(352): 事件 RPC_LOC_EVENT_NMEA_1HZ_REPORT (client 1) 10-18 08:40:15.355: D/libloc(352): loc_eng_process_loc_event : 4 10-18 08:40:15.355: D/libloc(352): loc_eng_report_nmea: $VTG 10-18 08:40:15.355: D/RPC(352): 3000008c:00050000 为回调客户端 3100008c:00050001 调度 RPC 调用 (XID 681125, xdr 0x395820)。10-18 08:40:15.355: D/RPC(352): 3100008c:327681 发送 RPC 回复 (XID 681125) 10-18 08:40:15.355: D/RPC(352): 3000008c:00050000 收到 CALL。10-18 08:40:15.355: D/RPC(352): 3000008c:00050000 为回调客户端 3100008c:00050001 调度 RPC 调用 (XID 681126, xdr 0x395820)。10-18 08:40:15.355: D/RPC(352): 3100008c:327681 发送 RPC 回复 (XID 681126) 10-18 08:40:15.375: D/RPC(352): 3000008c:00050000 收到 CALL。10-18 08:40:15.375: D/libloc(352): 事件 RPC_LOC_EVENT_NMEA_1HZ_REPORT (client 1) 10-18 08:40:15.375: D/libloc(352): loc_eng_process_loc_event: 4 10-18 08:40:15.375: D/libloc(352): loc_eng_report_nmea: $GSA 10-18 08:40:15.375: D/RPC(352): 3000008c:00050000 为回调客户端 3100008c:00050001 调度 RPC 调用 (XID 681127, xdr 0x395820)。10-18 08:40:15.375: D/RPC(352): 3100008c:327681 发送 RPC 回复 (XID 681127) 10-18 08:40:15.395: D/RPC(352): 3000008c:00050000 收到 CALL。10-18 08:40:15.395: D/libloc(352): 事件 RPC_LOC_EVENT_NMEA_1HZ_REPORT (client 1) 10-18 08:40:15.395: D/libloc(352): loc_eng_process_loc_event: 4 10-18 08:40:15.395: D/libloc(352): loc_eng_report_nmea: $GGA 10-18 08:40:15.395: D/RPC(352): 3000008c:00050000 为回调客户端 3100008c:00050001 调度 RPC 调用 (XID 681128, xdr 0x395820)。10-18 08:40:15.415: D/RPC(352): 3100008c:327681 发送 RPC 回复 (XID 681128) 10-18 08:40:15.415: D/RPC(352): 3000008c:00050000 收到 CALL。10-18 08:40:15.415: D/libloc(352): 事件 RPC_LOC_EVENT_NMEA_1HZ_REPORT(客户端 1)10-18 08:40:15.415:D/libloc(352):loc_eng_process_loc_event:4 10-18 08:40:15.415:D/libloc(352):loc_eng_report_nmea:$RMC 10-18 08: 40:15.415: D/RPC(352): 3000008c:00050000 为回调客户端 3100008c:00050001 调度 RPC 调用 (XID 681129, xdr 0x395820)。10-18 08:40:15.415: D/RPC(352): 3100008c:327681 发送 RPC 回复 (XID 681129) 10-18 08:40:15.435: D/RPC(352): 3000008c:00050000 收到 CALL。10-18 08:40:15.435:D/libloc(352):事件 RPC_LOC_EVENT_SATELLITE_REPORT(客户端 1)10-18 08:40:15.435:D/libloc(352):sv 计数:11 10-18 08:40:15.435 : D/RPC(352): 3000008c:00050000 为回调客户端 3100008c:00050001 调度 RPC 调用 (XID 681130, xdr 0x395820)。10-18 08:40:15.455: V/libloc(352): sv 列表: 10-18 08:40:15.455: V/libloc(352): 000 146.000 0.000 10-18 08:40:15.455: V/libloc(352): 9: 5 20 -1 2 0 1 33.000 233.000 0.000 10-18 08:40:15.455: V/libloc(352): 10: 5 19 -1 2 0 1 75.000 309.000 0.000 10-18 08:40:15.455:D/libloc(352):loc_eng_process_loc_event:2 10-18 08:40:15.455:D/GpsLocationProvider(352):reportSvStatus 10-18 08: 40:15.455: D/GpsLocationProvider(352): updateStatus 10-18 08:40:15.475: D/RPC(352): 3100008c:327681 发送 RPC 回复 (XID 681130) 10-18 08:40:15.595: I/BootReceiver (352): 复制 /data/tombstones/tombstone_05 到 DropBox (SYSTEM_TOMBSTONE) 10-18 08:40:15.605: I/DEBUG(30889): 分离 10-18 08:40:15.605: I/DEBUG(30889): 调试器自杀以释放僵尸!10-18 08:40:15.665:E/JavaBinder(352):在 Java 对象 0x4089e728 中的 0x7b8030 上进行事务处理,代码 3 失败 10-18 08:40:15.665:V/GpsLocationProvider(352): getListenerPackageName() packages = [android.uid.system:1000] uid = [1000] 10-18 08:40:15.665: E/InputDispatcher(352): channel '40a1e410 (server)' ~消费者关闭输入通道或发生错误。events=0x8 10-18 08:40:15.665: E/InputDispatcher(352): channel '40a1e410 (server)' ~ Channel 已不可恢复地损坏,将被处理!