You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running exchange-core in production . There are so many symbols. Offers and trades are happening in every second/minute. But sometime I get java.lang.NegativeArraySizeException for one symbol. Let's say I have symbol number from 241 to 300. After running some days exchange-core project throw java.lang.NegativeArraySizeException for 241. Then I am unable to view orderbook and placing offers for 241 symbol. Below I am sharing the lines where cause the exception.
java.lang.NegativeArraySizeException: null
at exchange.core2.core.common.L2MarketData.(L2MarketData.java:63) ~[classes/:0.0.1-SNAPSHOT]
at exchange.core2.core.orderbook.IOrderBook.getL2MarketDataSnapshot(IOrderBook.java:146) ~[classes/:0.0.1-SNAPSHOT]
After that I found below codes of L2MarketData.java in line no 63
public L2MarketData(int askSize, int bidSize) {
this.askPrices = new long[askSize];
this.bidPrices = new long[bidSize];
this.askVolumes = new long[askSize];
this.bidVolumes = new long[bidSize];
this.askOrders = new long[askSize];
this.bidOrders = new long[bidSize];
}
Below codes from IOrderBook interface in line no 146
default L2MarketData getL2MarketDataSnapshot(final int size) {
final int asksSize = getTotalAskBuckets(size);
final int bidsSize = getTotalBidBuckets(size);
final L2MarketData data = new L2MarketData(asksSize, bidsSize);
fillAsks(asksSize, data);
fillBids(bidsSize, data);
return data;
}
Thanks
The text was updated successfully, but these errors were encountered:
I am running exchange-core in production . There are so many symbols. Offers and trades are happening in every second/minute. But sometime I get java.lang.NegativeArraySizeException for one symbol. Let's say I have symbol number from 241 to 300. After running some days exchange-core project throw java.lang.NegativeArraySizeException for 241. Then I am unable to view orderbook and placing offers for 241 symbol. Below I am sharing the lines where cause the exception.
java.lang.NegativeArraySizeException: null
at exchange.core2.core.common.L2MarketData.(L2MarketData.java:63) ~[classes/:0.0.1-SNAPSHOT]
at exchange.core2.core.orderbook.IOrderBook.getL2MarketDataSnapshot(IOrderBook.java:146) ~[classes/:0.0.1-SNAPSHOT]
After that I found below codes of L2MarketData.java in line no 63
public L2MarketData(int askSize, int bidSize) {
this.askPrices = new long[askSize];
this.bidPrices = new long[bidSize];
this.askVolumes = new long[askSize];
this.bidVolumes = new long[bidSize];
this.askOrders = new long[askSize];
this.bidOrders = new long[bidSize];
}
Below codes from IOrderBook interface in line no 146
default L2MarketData getL2MarketDataSnapshot(final int size) {
final int asksSize = getTotalAskBuckets(size);
final int bidsSize = getTotalBidBuckets(size);
final L2MarketData data = new L2MarketData(asksSize, bidsSize);
fillAsks(asksSize, data);
fillBids(bidsSize, data);
return data;
}
Thanks
The text was updated successfully, but these errors were encountered: