Java tid 13934中的致命信号11(SIGSEGV),代码1,故障地址0x40
我正在尝试提取歌曲缩略图。但是在提取了一些之后 只有 tid 13934中的致命信号11(SIGSEGV),代码1,故障地址0x40此错误引发。请帮助我或给我另一个解决方案来提取歌曲缩略图Java tid 13934中的致命信号11(SIGSEGV),代码1,故障地址0x40,java,android,layout,Java,Android,Layout,我正在尝试提取歌曲缩略图。但是在提取了一些之后 只有 tid 13934中的致命信号11(SIGSEGV),代码1,故障地址0x40此错误引发。请帮助我或给我另一个解决方案来提取歌曲缩略图 Thread thread = new Thread(new Runnable() { @Override public void run() { for (int i = 0; i < arrayList.size(
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
for (int i = 0; i < arrayList.size(); i++) {
Log.i("Number",String.valueOf(i));
Bitmap bitmap;
byte[] buffer;
try {
FFmpegMediaMetadataRetriever fFmpegMediaMetadataRetriever = new FFmpegMediaMetadataRetriever();
fFmpegMediaMetadataRetriever.setDataSource(arrayList.get(i));
buffer = fFmpegMediaMetadataRetriever.getEmbeddedPicture();
} catch (RuntimeException e) {
buffer = null;
}
if (buffer != null) {
bitmap = resizeBitmap.resizeBitmap(buffer, 100, 100);
} else bitmap = null;
try {
File fos = new File(s + "/MyApp/data/thumbs", "image" + i + ".jpg");
if (!fos.exists()) {
fos.createNewFile();
}
if (bitmap != null) {
FileOutputStream fileOutputStream = new FileOutputStream(fos);
if (!fos.exists()) fos.createNewFile();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fileOutputStream);
fileOutputStream.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
});
Thread-Thread=新线程(new Runnable()){
@凌驾
公开募捐{
对于(int i=0;i
在大多数情况下,由于图像格式与解码器不匹配,会出现此信号错误。确保使用正确的方法解码“/MyApp/data/thumbs/image”。例如,了解您的图像是yuv或jpeg。在大多数情况下,您会收到此信号错误,因为您的图像格式与解码器不匹配。确保使用正确的方法解码“/MyApp/data/thumbs/image”。例如,了解您的图像是yuv还是jpeg