Re: [sleuthkit-users] Report Module - progressPanel issue
Brought to you by:
carrier
From: Richard C. <rco...@ba...> - 2018-03-21 17:25:29
|
Christopher, I am the tech lead for Autopsy development at Basis Technology. I have looked at the code snippet you provided, and from what I can see it looks correct. I have also looked at Autopsy developer Jonathan Millman's observation that he believes there is a thread safety issue in ReportProgressPanel. He is correct. Whether or not this could cause the problem you are experiencing is not yet clear to me, but I will see to it that the thread safety issue is fixed in Autopsy 4.7.0, which will be released soon (the current target is the first week in April). In fact, if you happen to be building from source, I will do the fix myself right now and put it in the develop branch, so you could pull that down and rebuild and see if the problem is fixed. If you are running with the Autopsy source code, you could also step through the code and try to figure out what is going on. I would start by putting a breakpoint here: /** * Changes the status message label component of this panel to show a given * processing status message. For example, updateStatusLabel("Now processing * files...") sets the label text to "Now processing files..." * * @param statusMessage String to use as label text. */ public void updateStatusLabel(String statusMessage) { EventQueue.invokeLater(() -> { if (status != ReportStatus.CANCELED) { // PUT BREAKPOINT ON THIS LINE statusMessageLabel.setText(statusMessage); } }); } and checking the values of status and statusMessage. I suspect that statusMessage is the empoty string, althpugh that would likely point to an issue in your code, rather than the concurrency problem mentioned above. Alternatively, if you are able and willing to send us your source code, I or one of my developers would be willing to see if we can recreate and debug the problem. Sincerely, Richard Cordovano Director of Engineering - Cyber Forensics, Basis Technology On Sat, Mar 17, 2018 at 9:04 AM, Christopher Wipat <ch...@cw...> wrote: > Hello, > > I'm currently creating a Report Module for Autopsy, which is nearly > finished now, however for some reason I can't get the progressPanel to > update a message which let's the user know what is happening, when it is > happening. > > I have used the exact same method as shown in add hashes module: > > http://www.sleuthkit.org/autopsy/docs/api-docs/4.5.0/_ > add_tagged_hashes_to_hash_db_8java_source.html > > progressPanel.updateStatusLabel > <http://www.sleuthkit.org/autopsy/docs/api-docs/4.5.0/classorg_1_1sleuthkit_1_1autopsy_1_1report_1_1_report_progress_panel.html#a2162ed8086014100811ef5b130fa13f8> > ("Adding hashes..."); > > However - their writing shows up on the progress panel page, where as mine > does not. > > These are the sum of my progressPanel statements in my generateReport > method: > > progressPanel.setIndeterminate(false); > progressPanel.start(); > progressPanel.updateStatusLabel("Adding files..."); > if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) > { > break; > } > progressPanel.setMaximumProgress(tags.size()); > progressPanel.updateStatusLabel("Adding \"" + tagName.getDisplayName() + > "\" files to " + configPanel.getSelectedDocumentName() + "..."); > progressPanel.updateStatusLabel("Adding " + tag.getContent().getName() + > " from \"" + tagName.getDisplayName() + "\" to " + configPanel.getSelectedDocumentName() > + "..."); > // Increment the progressPanel every time a file is processed > progressPanel.increment(); > progressPanel.complete(ReportProgressPanel.ReportStatus.COMPLETE); > > However not a single updateStatusLabel is showing when I generate a report. > > Note the bar itself is progressing as it should, everything compiles, > runs, without errors, increments itself to completion after every file is > processed, I have imported the reportProgressPanel > from org.sleuthkit.autopsy.report.ReportProgressPanel - exactly the same > as add tagged hashes to hash db report module. > > I have also tried compiling the module itself into a NBM, and then > installing it through Autopsy - however still no updated status labels. > > Could I get your help? > > Cheers > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > sleuthkit-users mailing list > https://lists.sourceforge.net/lists/listinfo/sleuthkit-users > http://www.sleuthkit.org > > |