droid
droid copied to clipboard
NullPointerException
While using the droid-command-line-6.5.jar-version, I get a NullPointerException (see below).
After this error message, the cli hangs and the only thing left behind is an empty .droid.tmp~-file. I run droid as part of a script, where I first save the profile and then use this saved profile to draw reports. If I do the analysis of the same files with droid-ui-6.5.jar, it works and I can save reports directly as PDF or XML, but I still cannot export the profile as a .droid or .csv-file. I have this problem with only one folder. Everything works as normal with other folders. I was thinking it could be a local problem with permissions, but that seems to be OK. I'm on Windows 10 and I have admin-permissions.
Hi @MSavels Could you please also share the command that you used, so we can try ans reproduce it at our end. Thanks
Hi @sparkhi
The code is part of a larger bash script, that is run with Cygwin on a Windows 10-system
Variables: target_directory = the folder to be analysed profile = the path to the profile, saved as a .droid-file xml_report = the path to the XML-report SIGNATURE_FILE = ....droid6\signature_files\DROID_SignatureFile_V109.xml CONTAINER_FILE = ....droid6\container_sigs\container-signature-20221102.xml
First, the profile.droid-file is created and saved:
java -Xmx512M -jar droid-command-line-6.5.jar -a "$target_directory" -R -p "$profile" --signature-file "$SIGNATURE_FILE" --container-file "$CONTAINER_FILE" --quiet
Next, the saved profile is read to generate a report:
java -Xmx512M -jar droid-command-line-6.5.jar -p "$profile" --report-name "Comprehensive breakdown" -t "DROID Report XML" -r "$xml_report"
Hi @MSavels Is the null pointer exception happening in the first command where it is profiling. Does the NPE stack trace give more details, could you please share that? I wonder if the NPE is occuring on a specific file?
I'm under the impression the error occurs when Droid tries to write to the .droid.tmp~-file. I don't have any more stack trace, but in the logs I found the following when I was trying to analyze the same folder with the droid-ui-6.5.jar: droid_ui_log.txt
Maybe this sheds more light?