I'm a PhD student in Computer Science at University of Washington, evaluating a static error finding tool for GUI applications on open source programs. I ran the tool on FileBunker and found a set of potential invalid thread access errors, which happens when a SWT GUI object was accessed via a non UI-thread. Normally, this error normally will trigger the assertion Display.checkWidget or Display.checkDevice to fail.
Here is a sample error report the tool produces, which indicates a method call chain that may lead to the error: "->" means call relationship between methods.
com/toubassi/filebunker/commandline/FileBunker, main([Ljava/lang/String;)V
-> com/toubassi/filebunker/commandline/FileBunker, performBackup([Ljava/lang/String;)V
-> com/toubassi/filebunker/vault/BackupSpecification, addFile(Ljava/io/File;)V
-> com/toubassi/filebunker/vault/BackupSpecification, changed()V
-> com/subx/common/NotificationCenter, post(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
-> com/subx/common/NotificationCenter, postToMap(Ljava/util/Map;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
-> com/subx/common/NotificationCenter, postToInfo(Lcom/subx/common/ListenerInfo;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
-> com/toubassi/filebunker/ui/backup/SpecificationDescriptionController, handleNotification(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
-> com/toubassi/filebunker/ui/backup/SpecificationDescriptionController, updateText()V
-> org/eclipse/swt/custom/StyledText, setText(Ljava/lang/String;)V
-> org/eclipse/swt/widgets/Widget, notifyListeners(ILorg/eclipse/swt/widgets/Event;)V
-> org/eclipse/swt/widgets/Widget, sendEvent(ILorg/eclipse/swt/widgets/Event;)V
-> org/eclipse/swt/widgets/Widget, sendEvent(ILorg/eclipse/swt/widgets/Event;Z)V
-> org/eclipse/swt/widgets/Widget, sendEvent(Lorg/eclipse/swt/widgets/Event;)V
-> org/eclipse/swt/widgets/EventTable, sendEvent(Lorg/eclipse/swt/widgets/Event;)V
-> org/eclipse/swt/widgets/TypedListener, handleEvent(Lorg/eclipse/swt/widgets/Event;)V
-> com/toubassi/filebunker/ui/restore/RestoreController$3, widgetSelected(Lorg/eclipse/swt/events/SelectionEvent;)V
-> com/toubassi/filebunker/ui/restore/RestoreController, access$2(Lcom/toubassi/filebunker/ui/restore/RestoreController;)V
-> com/toubassi/filebunker/ui/restore/RestoreController, restoreClicked()V
-> com/toubassi/filebunker/ui/restore/RestoreController, restore(Lcom/toubassi/filebunker/vault/RestoreSpecification;)V
-> org/eclipse/jface/dialogs/ProgressMonitorDialog, run(ZZLorg/eclipse/jface/operation/IRunnableWithProgress;)V
-> org/eclipse/jface/operation/Modal
-> ode: synthetic < Primordial, Ljava/lang/Thread, start()V
-> org/eclipse/jface/operation/Modal
-> com/toubassi/filebunker/ui/backup/PerformBackup, run(Lorg/eclipse/core/runtime/IProgressMonitor;)V
-> com/toubassi/filebunker/vault/Vault, backup(Lcom/toubassi/filebunker/vault/BackupSpecification;Lcom/toubassi/filebunker/vault/FileOperationListener;Lcom/toubassi/filebunker/vault/BackupResult;)V
-> com/toubassi/filebunker/vault/CoordinatingFileStore, backupFile(Ljava/io/File;Ljava/lang/String;Lcom/toubassi/filebunker/vault/RevisionIdentifier;Lcom/toubassi/filebunker/vault/FileOperationListener;)V
-> com/toubassi/filebunker/vault/WebMailFileStore, backupFile(Ljava/io/File;Ljava/lang/String;Lcom/toubassi/filebunker/vault/RevisionIdentifier;Lcom/toubassi/filebunker/vault/FileOperationListener;)V
-> com/subx/common/NotificationCenter, post(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
-> com/subx/common/NotificationCenter, postToMap(Ljava/util/Map;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
-> com/subx/common/NotificationCenter, postToInfo(Lcom/subx/common/ListenerInfo;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
-> com/toubassi/filebunker/ui/backup/SpecificationDescriptionController, handleNotification(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
-> com/toubassi/filebunker/ui/backup/SpecificationDescriptionController, updateText()V
-> org/eclipse/swt/custom/StyledText, setText(Ljava/lang/String;)V
-> org/eclipse/swt/custom/DefaultContent, setText(Ljava/lang/String;)V
-> org/eclipse/swt/custom/DefaultContent, sendTextEvent(Lorg/eclipse/swt/custom/StyledTextEvent;)V
-> org/eclipse/swt/custom/StyledTextListener, handleEvent(Lorg/eclipse/swt/widgets/Event;)V
-> org/eclipse/swt/custom/StyledText$6, textChanged(Lorg/eclipse/swt/custom/TextChangedEvent;)V
-> org/eclipse/swt/custom/StyledText, handleTextChanged(Lorg/eclipse/swt/custom/TextChangedEvent;)V
-> org/eclipse/swt/custom/StyledText$ContentWidthCache, textChanged(IIIII)V
-> org/eclipse/swt/custom/StyledText$ContentWidthCache, calculateVisible(II)V
-> org/eclipse/swt/custom/StyledText, getTopIndex()I
-> org/eclipse/swt/widgets/Widget, checkWidget()V
The above method call chain indicates how the error will be triggered. Due to the unfamiliarity of FileBunker's code and configuration/settings, I can not run the program to reproduce the error myself.
I would be happy if you can confirm/refute the above potential error. Any feedback you provide is valuable to me since I'm evaluating this tool on real-world programs.
thanks a lot
-Sai
Hi, there, could anyone kindly take a look at this report, and verify the bug if it is a real one or refuse it? Thanks a lot.
-Sai