Dear Android Developer- I'm developing a java code that process a set of
pdf files. The program process some set of files but it fails in the
middle and throws the error like below
"FATAL ERROR : Caught a fatal signal or exception"
Here is the sample code that I wrote.
Imports:
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
On input row code:
setNull("MD5");
if(!isNull("FileName")){
try {
BinaryOut = Files.readAllBytes(Paths.get(FileName));
logInfo("Done for file " + FileName);
} catch (Exception e) {
logError("Error reading file. Exception: " + e);
}
}else{
setNull("BinaryOut");
synchronized(lock) {
countNullRows++;
}
}
This still gives the same seg fault. I can log a message showing info about
“BinaryOut” and then null it; that works fine but obviously defeats the
purpose as the final output is null.
In other words, this runs:
setNull("MD5");
if(!isNull("FileName")){
try {
BinaryOut = Files.readAllBytes(Paths.get(FileName));
logInfo("Done for file " + FileName);
logInfo("BinaryOut has length " + BinaryOut.length);
BinaryOut = null;
} catch (Exception e) {
logError("Error reading file. Exception: " + e);
}
}else{
setNull("BinaryOut");
synchronized(lock) {
countNullRows++;
}
}
So it seems the “outputBuf” that “BinaryOut” is written to could be
overflowing. any workarounds?
Please advise.
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/f2028703-5f9d-46ab-9a41-182f2508991d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.