-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.util.NoSuchElementException raised when switching between "Sell BTC" and "Buy BTC" tabs #995
Comments
Looks like this may be the same bug @meapistol mentioned in #868. |
Yes, that seems to be it, at least it's caused by the same thing. I no
longer get the issue, so I'm unsure how I would reproduce it, but
hopefully something can be done with the stack trace.
…--
Nicolás Ortega Froysa
https://themusicinnoise.net/
http://uk7ewohr7xpjuaca.onion/
Public PGP Key:
https://themusicinnoise.net/[email protected]_pub.asc
http://uk7ewohr7xpjuaca.onion/[email protected]_pub.asc
|
Wow, it looks like async collection modify error, because occured in Similar problems were detected for Viritin and also around lazy and filter wrappers: viritin/viritin#273, https://vaadin.com/forum#!/thread/11721719. I will try to reproduce it via async modify... |
@Deathsbreed it occured only once or was reproducible several times before disappearing? |
This error also can be related to JDK - https://bugs.openjdk.java.net/browse/JDK-8161558 |
Yes, it's reproducible!
private void applyFilterPredicate() {
+++ new Thread(){
+++ public void run(){
+++ filteredItems.getSource().remove(0);
+++ }
+++ }.start();
filteredItems.setPredicate(offerBookListItem -> {
Offer offer = offerBookListItem.getOffer();
boolean directionResult = offer.getDirection() != direction;
boolean currencyResult = showAllTradeCurrenciesProperty.get() ||
offer.getCurrencyCode().equals(selectedTradeCurrency.getCode());
boolean paymentMethodResult = showAllPaymentMethods ||
offer.getPaymentMethod().equals(selectedPaymentMethod);
boolean notMyOfferOrShowMyOffersActivated = !isMyOffer(offerBookListItem.getOffer()) || preferences.isShowOwnOffersInOfferBook();
return directionResult && currencyResult && paymentMethodResult && notMyOfferOrShowMyOffersActivated;
});
} and similar exception. |
My resolution for this bug - the error in JavaFX's for (int i = 0; i < r.length; i++) {
>>> if (! it.hasNext()) // fewer elements than expected
return Arrays.copyOf(r, i);
>>> r[i] = it.next();
} Additionally, occurred not I listed in code all possible places where performed The problem is to protect the private void applyFilterPredicate() {
here occurs the error >>> filteredItems.setPredicate(offerBookListItem -> {
...
} For me it's not clear how to fix that JavaFX behavior, if I will find solution I come back and write about it. |
@ManfredKarrer I think somewhere in the code there is a place where an |
@dulanov Thanks a lot for your investigation! The list should be only accessed via UI thread. I tried the remove within a thread as you posted above but that does not reproduce the issue for me. With the live data though I get a ConcurrentModificationException when doing that. |
I put a log into the onAdded and onRemoved calls in OfferBook to log the calling thread (so far its all UI thread). Also a try/catch for the applyFilterPredicate. Will leave it running a while so see if I can reproduce it. |
Usually occurs I also tried to find an update not from JavaFX Thread via using conditional breakpoints and additionally set uped automatic switch between first three NavButtons (every 300 ms), but without success. May be it's not reproducible on my Window machine (occurred on Linux, because |
Yes maybe it is a Linux issue. The UI implementation of JavaFX on Linux is always a bit more problematic than other OS. I also never saw that exception myself (OSX). Might be also that is is fixed in Java 9. If maven supports Java9 at next release time we will update as well. |
Closed because of added Java 10 support. Please re-open this issue, if it still occurs with current master. |
I got this exception while switching to the "Sell BTC" and "Buy BTC" tabs. I'd also like to note that this happened directly after I had been disconnected from all my P2P peers and had to reconnect (I reconnected and then started getting these errors).
Here's the stack trace from the
bisq.log
:Upon restarting Bisq I no longer seem to get this error.
The text was updated successfully, but these errors were encountered: