murat8505 / android-xbmcremote

Automatically exported from code.google.com/p/android-xbmcremote
0 stars 0 forks source link

Concurrent connections can throw NullPointerExceptions #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Instead of switching to "Now playing" in run() of the handler, switch right
after the command so the poller and the album add thread are concurrent

What is the expected output? What do you see instead?
No error, however there was a NullPointerException in Connection.java(128).
Needs review!

Original issue reported on code.google.com by phree...@gmail.com on 22 Oct 2009 at 10:30

GoogleCodeExporter commented 9 years ago
The query() method in Connection.java should be synchronized.
Patch attached.
The patch also includes a fix for a race resulting in an NPE in 
SongListLogic.java

I'm not 100% sure that the two are related, but I discovered both when I was 
researching this issue.
The patch is so short that I decided to include both.

:O) Mikkle

Original comment by mukkenb...@gmail.com on 31 Oct 2009 at 11:10

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in rev. 237

Original comment by mukkenb...@gmail.com on 2 Nov 2009 at 8:30