question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NegativeArraySizeException when getting value with parallel access

See original GitHub issue

Any idea what could cause this exception to be raised?

Caused by java.lang.NegativeArraySizeException: -16
       at at.favre.lib.armadillo.AesGcmEncryption.decrypt(SourceFile:99)
       at at.favre.lib.armadillo.DefaultEncryptionProtocol.decrypt(SourceFile:152)
       at at.favre.lib.armadillo.SecureSharedPreferences.decrypt(SourceFile:518)
       at at.favre.lib.armadillo.SecureSharedPreferences.getString(SourceFile:149)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickfavcommented, Jan 31, 2019

@MarkVillacampa fyi 0.8.0 was just released

1reaction
MarkVillacampacommented, Jan 28, 2019

After some digging I could reproduce it locally. It seems to happen when trying to get a value from two different threads at the same time.

I assume there must be an internal stateful component that gets reused between decryptions and is not thread-safe, but I’m not familiar enough with the Armadillo internals to know where to look.

Let me know if you would like me to put together a test app that reproduces this issue, or you want me to test something specific.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java Spark DataFrameReader java.lang. ...
csv file to work as I keep getting exception java.lang.NegativeArraySizeException . Here is what I am doing: public void test() { ...
Read more >
"java.lang.NegativeArraySizeException" in EDC 10.2.1 U1
ERROR: "java.lang.NegativeArraySizeException" in EDC 10.2.1 U1 ... at com.infa.products.ldm.scanner.miti.access.executor. ... at java.util.concurrent.
Read more >
How to Handle the Negative Array Size Exception in Java
Since the NegativeArraySizeException is an unchecked exception, it does not need to be declared in the throws clause of a method or constructor....
Read more >
65340 – Hpack decode NegativeArraySizeException: -1
I found some information. Can you give me some answers? 1. If my header size is very big. Its length is bigger than...
Read more >
NegativeArraySizeException
Provides programmatic access to the stack trace information printed by printStackTrace() ... Initializes the cause of this throwable to the specified value.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found