Finding errors in multithreaded GUI applications

Download: PDF, slides (PDF), slides (PowerPoint), implementation.

“Finding errors in multithreaded GUI applications” by Sai Zhang, Hao Lü, and Michael D. Ernst. In ISSTA 2012, Proceedings of the 2012 International Symposium on Software Testing and Analysis, (Minneapolis, MN, USA), July 2012, pp. 243-253.

Abstract

To keep a Graphical User Interface (GUI) responsive and active, a GUI application often has a main UI thread (or event dispatching thread) and spawns separate threads to handle lengthy operations in the background, such as expensive computation, I/O tasks, and network requests. Many GUI frameworks require all GUI objects to be accessed exclusively by the UI thread. If a GUI object is accessed from a non-UI thread, an invalid thread access error occurs and the whole application may abort.

This paper presents a general technique to find such invalid thread access errors in multithreaded GUI applications. We formulate finding invalid thread access errors as a call graph reachability problem with thread spawning as the sources and GUI object accessing as the sinks. Standard call graph construction algorithms fail to build a good call graph for some modern GUI applications, because of heavy use of reflection. Thus, our technique builds reflection-aware call graphs.

We implemented our technique and instantiated it for four popular Java GUI frameworks: SWT, the Eclipse plugin framework, Swing, and Android. In an evaluation on 9 programs comprising 89273 LOC, our technique found 5 previously-known errors and 5 new ones.

Download: PDF, slides (PDF), slides (PowerPoint), implementation.

BibTeX entry:

@inproceedings{ZhangLE2012,
   author = {Sai Zhang and Hao L{\"u} and Michael D. Ernst},
   title = {Finding errors in multithreaded {GUI} applications},
   booktitle = {ISSTA 2012, Proceedings of the 2012 International
	Symposium on Software Testing and Analysis},
   pages = {243--253},
   address = {Minneapolis, MN, USA},
   month = jul,
   year = {2012}
}

(This webpage was created with bibtex2web.)

Back to Michael Ernst's publications.