elective-stereophonic
elective-stereophonic
ArrayIndexOutOfBoundsException in mint thread when switching between currencies singapore
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Nxt Client: Nxt 1.11.15

Author Topic: ArrayIndexOutOfBoundsException in mint thread when switching between currencies  (Read 2107 times)

frmelin

  • Jr. Member
  • **
  • Karma: +1/-0
  • Offline Offline
  • Posts: 45
    • View Profile

I tried switching the mint worker from one coin to another. Initially it was minting EGOLD, then I changed the setting to ELEMS.
It worked fine with EGOLD (minted 1), stopped the worker (ctrl-c), changed the currency code in the conf file to ELEMS, and started the worker again. It got initialized , then bang :

Code: [Select]
2015-01-11 13:18:02 INFO: Mint worker started
Exception in thread "main" java.lang.IllegalStateException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException
at nxt.mint.MintWorker.solve(MintWorker.java:141)
at nxt.mint.MintWorker.mintImpl(MintWorker.java:114)
at nxt.mint.MintWorker.mint(MintWorker.java:94)
at nxt.mint.MintWorker.main(MintWorker.java:46)
Caused by: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at nxt.mint.MintWorker.solve(MintWorker.java:139)
... 3 more
Caused by: java.lang.ArrayIndexOutOfBoundsException
at sun.security.provider.DigestBase.engineUpdate(DigestBase.java:114)
at sun.security.provider.SHA2.implDigest(SHA2.java:98)
at sun.security.provider.DigestBase.engineDigest(DigestBase.java:173)
at sun.security.provider.DigestBase.engineDigest(DigestBase.java:152)
at java.security.MessageDigest$Delegate.engineDigest(MessageDigest.java:576)
at java.security.MessageDigest.digest(MessageDigest.java:353)
at com.sun.crypto.provider.HmacCore.engineDoFinal(HmacCore.java:201)
at javax.crypto.Mac.doFinal(Mac.java:546)
at javax.crypto.Mac.doFinal(Mac.java:589)
at nxt.crypto.Scrypt.hash(Scrypt.java:40)
at nxt.crypto.HashFunction$3.hash(HashFunction.java:28)
at nxt.CurrencyMint.getHash(CurrencyMint.java:167)
at nxt.mint.MintWorker$HashSolver.call(MintWorker.java:273)
at nxt.mint.MintWorker$HashSolver.call(MintWorker.java:246)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Not sure what is wrong?

I reverted to EGOLD with no issue

edit: typo
Logged
NXT-DNEE-TZ9V-EW7E-C64UY

frmelin

  • Jr. Member
  • **
  • Karma: +1/-0
  • Offline Offline
  • Posts: 45
    • View Profile

Ok, found the reason : the setting nxt.mint.threadPoolSize must be at 1 for ELEMS
Logged
NXT-DNEE-TZ9V-EW7E-C64UY

jasemoney

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 9
    • View Profile

weird. I have Elems at 10 threads on my 3930kcpu i havent solved anything yet but it hasnt thrown any errors. maybe try closing then restarting the minter batch file after you edit the .properties for another currency?
Logged

Riker

  • Core Dev
  • Hero Member
  • *****
  • Karma: +439/-42
  • Offline Offline
  • Posts: 1794
    • View Profile

Ok, found the reason : the setting nxt.mint.threadPoolSize must be at 1 for ELEMS

This was solved in 1.4.8
Logged
NXT Core Dev
Account: NXT-HBFW-X8TE-WXPW-DZFAG
Public Key: D8311651 Key fingerprint: 0560 443B 035C EE08 0EC0  D2DD 275E 94A7 D831 1651
 

elective-stereophonic
elective-stereophonic
assembly
assembly