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.

NullPointerException on empty value in currency-converted amount

See original GitHub issue

Issue Description

If no value is entered in the converted amount text box in the “Transfer funds” dialog, the application crashes with a NullPointerException:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.math.BigDecimal java.math.BigDecimal.setScale(int, java.math.RoundingMode)' on a null object reference
  at android.view.View.performClick(
  at android.view.View$
  at android.os.Handler.handleCallback(
  at android.os.Handler.dispatchMessage(
  at android.os.Looper.loop(
  at java.lang.reflect.Method.invoke(Native Method)
  at java.lang.reflect.Method.invoke(

Steps to reproduce:

  1. Create a new account with a different currency than the one configured.
  2. Create a new transaction in some other account.
  3. Enter a description and an amount.
  4. Select the previously created account as transfer account. The transfer funds dialog will open.
  5. Select “Converted Amount”.
  6. Delete any value in the text box leaving it empty.
  7. Press “Save”.
  8. The application crashes.

Received as Crashlytics issue #205.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

rivaldi8commented, May 23, 2016

I’m working on a fix.

rivaldi8commented, May 30, 2016

Fixed in develop branch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception in thread "main" java.lang.NullPointerException ...
You need to call setExchangeRates ; otherwise, the double[] will be null. CurrencyConverter cc = new CurrencyConverter(); { cc.
Read more >
How to Fix and Avoid NullPointerException in Java - Rollbar
NullPointerException in Java occurs when a variable is accessed which is not pointing to any object and refers to nothing or null.
Read more >
Null Pointer Exception In Java - GeeksforGeeks
NullPointerException is thrown when program attempts to use an object reference that has the null value. These can be: Invoking a method from...
Read more >
What Is NullPointerException In Java & How To Avoid It
NullPointerException in Java is a runtime exception. Java assigns a special null value to an object reference. When a program tries to use ......
Read more >
NullPointerException (Java Platform SE 7 ) - Oracle Help Center
Thrown when an application attempts to use null in a case where an object is required. These include: Calling the instance method of...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found