bisq icon indicating copy to clipboard operation
bisq copied to clipboard

ArrayIndexOutOfBoundsException

Open MarcSte opened this issue 10 years ago • 11 comments

suddenly appeared without interaction. see screenshot 4

win 10 64 bit

app v 0.4.5

MarcSte avatar May 02 '16 08:05 MarcSte

Error -2

This is probably related.

2

MarcSte avatar May 02 '16 09:05 MarcSte

can you send me the logs? can u update to 0.4.6? did u see anything strange beside the popup?

ManfredKarrer avatar May 02 '16 11:05 ManfredKarrer

i'll send the logs in a minute.

Nothing strange besides the popup. I had 0.4.5 running for several days.

I updated to 0.4.6 like 2 hours ago and had no problems since.

MarcSte avatar May 02 '16 11:05 MarcSte

Same thing here with 0.4.6:

minus_6

deafboy avatar May 02 '16 15:05 deafboy

I also got one of these with v0.4.6. This may be a relevant snippet of the console log:

de maig-02 11:06:09.756 [JavaFX Application Thread] WARN  i.b.p.s.P2PDataStorage: Checks for refreshTTL failed 
de maig-02 11:06:44.223 [JavaFX Application Thread] WARN  i.b.p.s.P2PDataStorage: Checks for refreshTTL failed 
de maig-02 11:14:32.318 [JavaFX Application Thread] WARN  i.b.p.p.BroadcastHandler: Connection stopped already 
de maig-02 11:14:32.402 [JavaFX Application Thread] WARN  i.b.p.p.BroadcastHandler: stopped at sendToPeer: Message not broadcasted because we have stopped the handler already.
        message = RefreshTTLMessage{, hashOfDataAndSeqNr.hashCode()=782853457, hashOfPayload.hashCode()=-1650065883... 
de maig-02 11:14:32.641 [JavaFX Application Thread] WARN  i.b.p.p.BroadcastHandler: stopped at sendToPeer: Message not broadcasted because we have stopped the handler already.
        message = RefreshTTLMessage{, hashOfDataAndSeqNr.hashCode()=782853457, hashOfPayload.hashCode()=-1650065883... 
de maig-02 11:23:35.487 [JavaFX Application Thread] ERROR i.b.a.BitsquareApp: Uncaught Exception from thread JavaFX Application Thread 
de maig-02 11:23:35.488 [JavaFX Application Thread] ERROR i.b.a.BitsquareApp: Uncaught Exception throwableMessage= -3 
java.lang.ArrayIndexOutOfBoundsException: -3
        at javafx.collections.transformation.SortedList.findPosition(SortedList.java:318)
        at javafx.collections.transformation.SortedList.removeFromMapping(SortedList.java:359)
        at javafx.collections.transformation.SortedList.addRemove(SortedList.java:389)
        at javafx.collections.transformation.SortedList.sourceChanged(SortedList.java:105)
        at javafx.collections.transformation.TransformationList.lambda$getListener$8(TransformationList.java:106)
        at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
        at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164)
        at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
        at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
        at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
        at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
        at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
        at javafx.collections.transformation.FilteredList.sourceChanged(FilteredList.java:147)
        at javafx.collections.transformation.TransformationList.lambda$getListener$8(TransformationList.java:106)
        at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
        at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
        at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
        at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
        at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
        at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
        at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
        at javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:183)
        at java.util.AbstractList$Itr.remove(AbstractList.java:374)
        at java.util.Collection.removeIf(Collection.java:415)
        at io.bitsquare.gui.main.offer.offerbook.OfferBook$1.onRemoved(OfferBook.java:70)
        at io.bitsquare.trade.offer.OfferBookService$1.lambda$onRemoved$1(OfferBookService.java:78)
        at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
        at io.bitsquare.trade.offer.OfferBookService$1.onRemoved(OfferBookService.java:76)
        at io.bitsquare.p2p.storage.P2PDataStorage.lambda$null$2(P2PDataStorage.java:98)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
        at io.bitsquare.p2p.storage.P2PDataStorage.lambda$null$3(P2PDataStorage.java:97)
        at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
        at io.bitsquare.p2p.storage.P2PDataStorage.lambda$onBootstrapComplete$4(P2PDataStorage.java:96)
        at org.reactfx.util.FxTimer.lambda$restart$301(FxTimer.java:89)
        at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:226)
        at com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:167)
        at javafx.animation.Timeline.impl_playTo(Timeline.java:176)
        at javafx.animation.AnimationAccessorImpl.playTo(AnimationAccessorImpl.java:39)
        at com.sun.scenario.animation.shared.InfiniteClipEnvelope.timePulse(InfiniteClipEnvelope.java:110)
        at javafx.animation.Animation.impl_timePulse(Animation.java:1102)
        at javafx.animation.Animation$1.lambda$timePulse$29(Animation.java:186)
        at java.security.AccessController.doPrivileged(Native Method)
        at javafx.animation.Animation$1.timePulse(Animation.java:185)
        at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
        at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:506)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
        at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$383(QuantumToolkit.java:319)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$null$84(GtkApplication.java:139)
        at java.lang.Thread.run(Thread.java:745)
de maig-02 11:25:06.902 [JavaFX Application Thread] WARN  i.b.p.s.P2PDataStorage: Checks for refreshTTL failed 
de maig-02 11:26:49.578 [JavaFX Application Thread] WARN  i.b.p.s.P2PDataStorage: Checks for refreshTTL failed 

There was nothing else strange in the app.

ivilata avatar May 02 '16 16:05 ivilata

Seems to be a concurrency issue with the list...

ManfredKarrer avatar May 02 '16 23:05 ManfredKarrer

I noticed that the first mention to a Bitsquare class in the log snippet above is:

io.bitsquare.gui.main.offer.offerbook.OfferBook$1.onRemoved(OfferBook.java:70)

This may give a hint on which code is triggering this. It might also explain why in #429 the error came up when switching to the offer book screen.

ivilata avatar May 04 '16 07:05 ivilata

Fixed with https://github.com/bitsquare/bitsquare/commit/afb8c18d31825453e0070c0dc944867c42e627e7 Will be deployed with next version.

ManfredKarrer avatar May 05 '16 11:05 ManfredKarrer

Bug happens also on other sorted lists (trades). It is not a concurrency issues as it happens on the UI thread, most probably its caused by buggy event coordination inside the SortedList (or only in combination with the FilteredList). It seems to happen mostly after standby mode. Cannot reproduce it so far.

ManfredKarrer avatar Jun 18 '16 13:06 ManfredKarrer

Should be fixed by https://github.com/bitsquare/bitsquare/pull/498#issuecomment-227016158 Was a JavaFX bug which will be fixed in tnext release, we took the source and use SortedList as Bitsquare domain class until the fix is released in a JDK.

ManfredKarrer avatar Jun 19 '16 23:06 ManfredKarrer

I just discovered an issue. The sorting of the table does nor work anymore. I use sorted by data in most tables but that is not applied and the sort icons also does not get displayed nor interact by clicking the header. I assume they use a static reference to the original SortedList class. Do you know how to ensure compilation of our class if we use the use the original package path?

ManfredKarrer avatar Jun 20 '16 09:06 ManfredKarrer