mirror of https://github.com/M66B/FairEmail.git
Catch parse OOM
This commit is contained in:
parent
cebc18794f
commit
9357cceb86
|
@ -2369,6 +2369,7 @@ public class MessageHelper {
|
||||||
try {
|
try {
|
||||||
ensureStructure();
|
ensureStructure();
|
||||||
|
|
||||||
|
try {
|
||||||
MimePart part = imessage;
|
MimePart part = imessage;
|
||||||
|
|
||||||
if (part.isMimeType("multipart/mixed")) {
|
if (part.isMimeType("multipart/mixed")) {
|
||||||
|
@ -2486,8 +2487,13 @@ public class MessageHelper {
|
||||||
Log.e(ct.toString());
|
Log.e(ct.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (ParseException | OutOfMemoryError ex) {
|
} catch (ParseException ex) {
|
||||||
Log.w(ex);
|
Log.w(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
getMessageParts(imessage, parts, null);
|
||||||
|
} catch (OutOfMemoryError ex) {
|
||||||
|
Log.e(ex);
|
||||||
parts.warnings.add(Log.formatThrowable(ex, false));
|
parts.warnings.add(Log.formatThrowable(ex, false));
|
||||||
/*
|
/*
|
||||||
java.lang.OutOfMemoryError: Failed to allocate a xxx byte allocation with yyy free bytes and zzMB until OOM
|
java.lang.OutOfMemoryError: Failed to allocate a xxx byte allocation with yyy free bytes and zzMB until OOM
|
||||||
|
@ -2503,7 +2509,6 @@ public class MessageHelper {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
getMessageParts(imessage, parts, null);
|
|
||||||
return parts;
|
return parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue