Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in Ansicht Berichte -> Performance -> Wertpapiere #602

Closed
MRamius opened this issue Aug 12, 2016 · 1 comment
Closed

NPE in Ansicht Berichte -> Performance -> Wertpapiere #602

MRamius opened this issue Aug 12, 2016 · 1 comment
Labels
bug

Comments

@MRamius
Copy link

@MRamius MRamius commented Aug 12, 2016

Version 0.24.2
Der Fehler passiert erst, seitdem ich gestern eine neue Dividende eingetragen habe:

java.lang.NullPointerException
    at name.abuchen.portfolio.snapshot.security.SecurityPerformanceSnapshot.lambda$0(SecurityPerformanceSnapshot.java:120)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    at name.abuchen.portfolio.snapshot.security.SecurityPerformanceSnapshot.extractSecurityRelatedPortfolioTransactions(SecurityPerformanceSnapshot.java:120)
    at name.abuchen.portfolio.snapshot.security.SecurityPerformanceSnapshot.create(SecurityPerformanceSnapshot.java:29)
    at name.abuchen.portfolio.ui.views.SecuritiesPerformanceView.reportingPeriodUpdated(SecuritiesPerformanceView.java:883)
    at name.abuchen.portfolio.ui.views.SecuritiesPerformanceView.createTopTable(SecuritiesPerformanceView.java:291)
    at name.abuchen.portfolio.ui.views.AbstractListView.createBody(AbstractListView.java:20)
    at name.abuchen.portfolio.ui.AbstractFinanceView.createViewControl(AbstractFinanceView.java:108)
    at name.abuchen.portfolio.ui.PortfolioPart.createView(PortfolioPart.java:499)
    at name.abuchen.portfolio.ui.PortfolioPart.activateView(PortfolioPart.java:478)
    at name.abuchen.portfolio.ui.ClientEditorSidebar$ActivateViewAction.run(ClientEditorSidebar.java:64)
    at name.abuchen.portfolio.ui.Sidebar.select(Sidebar.java:253)
    at name.abuchen.portfolio.ui.Sidebar$Item$2.mouseDown(Sidebar.java:438)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:192)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:159)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

Ausserdem kommt diese NPE in Performance -> Rechnung:

java.lang.NullPointerException
    at name.abuchen.portfolio.snapshot.ClientPerformanceSnapshot.addCapitalGains(ClientPerformanceSnapshot.java:241)
    at name.abuchen.portfolio.snapshot.ClientPerformanceSnapshot.calculate(ClientPerformanceSnapshot.java:217)
    at name.abuchen.portfolio.snapshot.ClientPerformanceSnapshot.<init>(ClientPerformanceSnapshot.java:128)
    at name.abuchen.portfolio.ui.views.PerformanceView.reportingPeriodUpdated(PerformanceView.java:79)
    at name.abuchen.portfolio.ui.views.PerformanceView.createBody(PerformanceView.java:120)
    at name.abuchen.portfolio.ui.AbstractFinanceView.createViewControl(AbstractFinanceView.java:108)
    at name.abuchen.portfolio.ui.PortfolioPart.createView(PortfolioPart.java:499)
    at name.abuchen.portfolio.ui.PortfolioPart.activateView(PortfolioPart.java:478)
    at name.abuchen.portfolio.ui.ClientEditorSidebar$ActivateViewAction.run(ClientEditorSidebar.java:64)
    at name.abuchen.portfolio.ui.Sidebar.select(Sidebar.java:253)
    at name.abuchen.portfolio.ui.Sidebar$Item$2.mouseDown(Sidebar.java:438)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:192)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:159)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
@buchen buchen added the bug label Aug 15, 2016
@buchen buchen added this to the 2016 Q3 Short-List milestone Aug 15, 2016
@buchen
Copy link
Owner

@buchen buchen commented Aug 15, 2016

Hi @MRamius,

die beiden Fehler treten auf, weil es in Deiner Datei anscheinend ein Wertpapier gibt, dass nicht in der Wertpapier-Liste eingetragen ist. Dass darf aber nicht sein. Keine Ahnung warum - es scheint irgendwo ein Bug zu sein beim Anlegen der Dividende. Allerdings ist es schwer den Fehler nur anhand dieser beiden Meldungen zu finden. Könntest Du mir Deine Datei an portfolio.performance.help@gmail.com schicken? Gerne auch andere Umsätze auslöschen - nur nicht diese Dividendenbuchung.

Andreas

buchen added a commit that referenced this issue Aug 20, 2016
Previously it could happen that the user imports a transaction from PDF
but explicitly does not import the newly created security. That would
create orphan securities only attached to the transaction.

Issue: #602
buchen added a commit that referenced this issue Aug 20, 2016
@buchen buchen closed this Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.