Hello there-
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 VirgoFTP 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.
edu/sysu/virgoftp/gui/widgets/dialogs/PromptDialog, main([Ljava/lang/String;)V
-> org/eclipse/swt/widgets/Display, readAndDispatch()Z
-> org/eclipse/swt/widgets/Display, runPopups()Z
-> org/eclipse/swt/widgets/Display, runDeferredEvents()Z
-> org/eclipse/swt/widgets/Widget, sendEvent(Lorg/eclipse/swt/widgets/Event;)V
-> org/eclipse/swt/widgets/EventTable, sendEvent(Lorg/eclipse/swt/widgets/Event;)V
-> edu/sysu/virgoftp/gui/widgets/FtpBrowserView$PopupMenu$5, handleEvent(Lorg/eclipse/swt/widgets/Event;)V
-> edu/sysu/virgoftp/gui/FtpBrowser, advancedTransfer(Z)V
-> edu/sysu/virgoftp/gui/JobTableManager, addFxpTransferTask(Ledu/sysu/virgoftp/gui/FtpEngine;[Ledu/sysu/virgoftp/gui/widgets/TableFileItem;ZZZ)V
-> edu/sysu/virgoftp/gui/transfer/TransferTask, startFxpTransfer(Ljava/util/List;ZZZZ)V
-> edu/sysu/virgoftp/gui/threads/ThreadPool$TaskThread, start()V
-> Node: synthetic < Primordial, Ljava/lang/Thread, start()V
-> edu/sysu/virgoftp/gui/threads/ThreadPool$TaskThread, run()V
-> edu/sysu/virgoftp/gui/transfer/AbstractFileTransferThread, run()V
-> edu/sysu/virgoftp/gui/transfer/AbstractFileTransferThread, prepareForTransfer()Z
-> edu/sysu/virgoftp/gui/LoggerHandle, <init>(Lorg/eclipse/swt/custom/StyledText;Ledu/sysu/virgoftp/gui/threads/TaskLog;)V
-> edu/sysu/virgoftp/gui/preferences/ColorPreference, getLog_command()Lorg/eclipse/swt/graphics/Color;
-> org/eclipse/swt/widgets/Display, getSystemColor(I)Lorg/eclipse/swt/graphics/Color;
-> org/eclipse/swt/widgets/Display, checkDevice()V
The above method call chain indicates how the error will be triggered. Due to the unfamiliarity of VirgoFTP'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
Another potential error, similar but not identical to the above.
edu/sysu/virgoftp/gui/widgets/dialogs/PromptDialog, main([Ljava/lang/String;)V
-> org/eclipse/swt/widgets/Display, readAndDispatch()Z
-> org/eclipse/swt/widgets/Display, runPopups()Z
-> org/eclipse/swt/widgets/Display, runDeferredEvents()Z
-> org/eclipse/swt/widgets/Widget, sendEvent(Lorg/eclipse/swt/widgets/Event;)V
-> org/eclipse/swt/widgets/EventTable, sendEvent(Lorg/eclipse/swt/widgets/Event;)V
-> edu/sysu/virgoftp/gui/widgets/FtpBrowserView$PopupMenu$5, handleEvent(Lorg/eclipse/swt/widgets/Event;)V
-> edu/sysu/virgoftp/gui/FtpBrowser, advancedTransfer(Z)V
-> edu/sysu/virgoftp/gui/JobTableManager, addFxpTransferTask(Ledu/sysu/virgoftp/gui/FtpEngine;[Ledu/sysu/virgoftp/gui/widgets/TableFileItem;ZZZ)V
-> edu/sysu/virgoftp/gui/transfer/TransferTask, startFxpTransfer(Ljava/util/List;ZZZZ)V
-> edu/sysu/virgoftp/gui/threads/ThreadPool$TaskThread, start()V
-> < Primordial, Ljava/lang/Thread, start()V
-> edu/sysu/virgoftp/gui/threads/ThreadPool$TaskThread, run()V
-> edu/sysu/virgoftp/gui/transfer/AbstractFileTransferThread, run()V
-> edu/sysu/virgoftp/gui/transfer/AbstractFileTransferThread, prepareForTransfer()Z
-> edu/sysu/virgoftp/gui/LoggerHandle, <init>(Lorg/eclipse/swt/custom/StyledText;Ledu/sysu/virgoftp/gui/threads/TaskLog;)V
-> edu/sysu/virgoftp/gui/preferences/FontPreference, getLog_font()Lorg/eclipse/swt/graphics/FontData;
-> org/eclipse/swt/widgets/Display, getSystemFont()Lorg/eclipse/swt/graphics/Font;
-> org/eclipse/swt/widgets/Display, checkDevice()V
Hi there, could anyone kindly take a look at the above bug report, and verify it if it is a real bug or refuse it? Thanks a lot.
-Sai