Portfolio report exception

5 views
Skip to first unread message

David Scuffham

unread,
Sep 13, 2019, 7:17:06 PM9/13/19
to jGnash-User
I am running version 3.2.1 with the current OpenJDK on macOS.

I added a bunch of Reinvest Dividend transactions in my Investments today. I have narrowed it down to the last two transactions. If I have them entered and I run the Portfolio report, I receive this stack trace:

java.lang.NullPointerException
    at jgnash.uifx.report.PortfolioReport$PortfolioReportTableModel.getRowCount(PortfolioReport.java:109)
    at jgnash.report.table.AbstractReportTableModel.getColumnPrototypeValueAt(AbstractReportTableModel.java:366)
    at jgnash.report.pdf.Report.getColumnWidths(Report.java:861)
    at jgnash.report.pdf.Report.addTable(Report.java:276)
    at jgnash.uifx.report.PortfolioReportController.addTable(PortfolioReportController.java:131)
    at jgnash.uifx.report.PortfolioReportController.handleReportRefresh(PortfolioReportController.java:116)
    at jgnash.uifx.report.PortfolioReportController.refreshReport(PortfolioReportController.java:105)
    at jgnash.uifx.util.JavaFXUtils.lambda$_runLater$0(JavaFXUtils.java:114)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)


If I delete the two transactions the Portfolio report runs as expected.

On a separate, but somewhat related topic, it would be great to be able to hide the IRR column on the Portfolio report.

Craig Cavanaugh

unread,
Sep 14, 2019, 6:10:21 AM9/14/19
to jGnash-User
David, were there any other exceptions that occurred?

Tracing the code, there may be an issue at a deeper level that is preventing the portfolio data from being created correctly resulting in the exception below.

If there some different / unusual about the last to reinvested dividends?

Thanks,
Craig

Craig Cavanaugh

unread,
Sep 14, 2019, 6:13:46 AM9/14/19
to jGnash-User
Additionally,

If running from a console, you should see some the calculated investment results logged to the console.  If your not seeing that, than something is failing for the initial calculations and I will need examples of the reinvested dividends or a small test file to debug the issue.

Thanks,
Craig

David Scuffham

unread,
Sep 15, 2019, 9:34:02 PM9/15/19
to jgnas...@googlegroups.com
There were no other exceptions that occurred. I copied and pasted the entire error message.

No, there was not anything unusual about them at the time.

I have entered new investment data since then, and the error has not reoccurred. The Portfolio report is working again. One thing that was odd was that when I was able to run the Portfolio report again, those two accounts’ share amounts were high. The two transactions had been rounded to the nearest hundredth, instead of storing them to the thousandth.

For example amount #1 was something like 0.366, and had been stored as 0.37. The second was something like 0.456, but had been stored as 0.46. I remember that both of the thousandths digits were sixes.

If this happens again I will run it from the console.
> --
> You received this message because you are subscribed to a topic in the Google Groups "jGnash-User" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/jgnash-user/j-i5D7wWDPA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to jgnash-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jgnash-user/6697bb00-5056-435e-95e2-9241438db500%40googlegroups.com.

Craig Cavanaugh

unread,
Sep 16, 2019, 4:55:50 AM9/16/19
to jGnash-User
Thanks David.

I've made some changes to the code so it's less likely to swallow any reported errors and the ability to change the displayed columns is on the TODO list as well.

Thanks,
Craig


On Sunday, September 15, 2019 at 9:34:02 PM UTC-4, David Scuffham wrote:
There were no other exceptions that occurred. I copied and pasted the entire error message.

No, there was not anything unusual about them at the time.

I have entered new investment data since then, and the error has not reoccurred. The Portfolio report is working again. One thing that was odd was that when I was able to run the Portfolio report again, those two accounts’ share amounts were high. The two transactions had been rounded to the nearest hundredth, instead of storing them to the thousandth.

For example amount #1 was something like 0.366, and had been stored as 0.37. The second was something like 0.456, but had been stored as 0.46. I remember that both of the thousandths digits were sixes.

If this happens again I will run it from the console.

> To unsubscribe from this group and all its topics, send an email to jgnash-user+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages