DBFlow icon indicating copy to clipboard operation
DBFlow copied to clipboard

TransactionManager SaveOnSaveQueue

Open arturonaredo opened this issue 11 years ago • 3 comments

Hi,

I'm recording all my exceptions and crashes and I've experienced this crash. Should I do something to avoid send the Model to the saveOnSaveQueue thread while is running?

Sorry I have no more data to reproduce it. Yep, it's pain to have bug reports like this. The OS version is 4.4.2 and the library version used is 1.7.2

Cheers, Arturo.

java.lang.IllegalThreadStateException: Thread already started at java.lang.Thread.checkNotStarted(Thread.java:871) at java.lang.Thread.start(Thread.java:1025) at com.raizlabs.android.dbflow.runtime.TransactionManager.saveOnSaveQueue(TransactionManager.java:294)

arturonaredo avatar Mar 30 '15 10:03 arturonaredo

No worries, that is strange.


 // Only start save queue if we are going to use it
 if (!getSaveQueue().isAlive()) {
     getSaveQueue().start();
 }

Is there some issue with this code you notice?

agrosner avatar Mar 30 '15 14:03 agrosner

Not really. I'm calling saveOnSaveQueue from different threads asap the data is received. Could be a race condition? Thinking aloud.

Just happened once so I'm not really worried about... Feel free to close it as long I just posted it for tracking purposes or easy/fast support, If I'm able to reproduce it... I'll be back :)

arturonaredo avatar Mar 30 '15 15:03 arturonaredo

@arturonaredo that's certainly possible. Let me know if you find it again, or find a way to repro it. thanks!

agrosner avatar Apr 05 '15 23:04 agrosner