Null Pointer Exception

Issue #11 resolved
Former user created an issue

Love this extension but just had a problem emerge suddenly when it was previously stable. Was using latest Moneydance along with v35 and just tried v36a with a manual install. v36a made no difference. Like I said, was previously stable after the upgrades and suddenly stopped.

Hope you can help.

Starting Moneydance 2014.3 (947) at Tue Apr 08 21:31:50 EDT 2014 Settings Folder: /Users/joe/Library/Application Support/Moneydance OS: Mac OS X 10.6.8 i386 Java: 1.6.0_65 (Apple Inc.) Is in sandbox: false; restricted file access: false Initializing Moneydance SSL Created new custom trust manager TRUSTMGR: initialized custom stream handler factor... Starting netsync build 27 (re)initializing dropbox settings (allowed=true; ext build=27) netsync extension adding listener for services of type _mdncsync._tcp.local. netsync: scanning for existing services... svc type added: _http._tcp.local. opening last file: moneydance svc type added: _daap._tcp.local. (re)initializing dropbox settings (allowed=true; ext build=27) Saving state file to dropbox svc type added: _afpovertcp._tcp.local. Document folder for xxxxxxx (/Users/joe/Dropbox/.moneydancesync/4aa315c3-f55c-42a8-8570-9bd22c9b6fbe) exists netsync: scanning for existing services... file was modified; syncing! syncing now <no transaction files> Saving state file to dropbox syncing txns after date: 20140108 Deleting processed transaction files syncing finished svc type added: _adisk._tcp.local. no txn files to sync svc type added: _pdl-datastream._tcp.local. svc type added: _printer._tcp.local. java.lang.NullPointerException at com.moneydance.modules.features.forecaster.DataSetManager.determineCategoryName(DataSetManager.java:905) at com.moneydance.modules.features.forecaster.DataSetManager.processFutureTransactionsForDay(DataSetManager.java:744) at com.moneydance.modules.features.forecaster.DataSetManager.processAccountForDay(DataSetManager.java:678) at com.moneydance.modules.features.forecaster.DataSetManager.refresh(DataSetManager.java:163) at com.moneydance.modules.features.forecaster.AbstractForecasterController.generateForecast(AbstractForecasterController.java:188) at com.moneydance.modules.features.forecaster.AbstractForecasterController.loadFavouriteInfo(AbstractForecasterController.java:147) at com.moneydance.modules.features.forecaster.window.ForecastWindowController.show(ForecastWindowController.java:305) at com.moneydance.modules.features.forecaster.Main.showConsole(Main.java:163) at com.moneydance.modules.features.forecaster.Main.invoke(Main.java:139) at com.moneydance.apps.md.controller.Main.invokeFeatureModuleURI(Main.java:1612) at com.moneydance.apps.md.controller.Main.showURL(Main.java:996) at com.moneydance.apps.md.view.gui.MainMenu$URIAction.actionPerformed(MainMenu.java:799) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:389) at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95) at java.awt.MenuItem.processActionEvent(MenuItem.java:650) at java.awt.MenuItem.processEvent(MenuItem.java:609) at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:343) at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:331) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:720) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:676) at java.awt.EventQueue$2.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97) at java.awt.EventQueue$3.run(EventQueue.java:690) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.awt.EventQueue.dispatchEvent(EventQueue.java:687) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) no txn files to sync svc type added: _ipp._tcp.local. svc type added: _smb._tcp.local. no txn files to sync svc type added: _rfb._tcp.local. svc type added: _apple-mobdev2._tcp.local. no txn files to sync svc type added: _sub._apple-mobdev2._tcp.local. no txn files to sync

Comments (5)

  1. Kevin Stembridge repo owner

    Hi, Thanks for logging this and sorry it's causing you some trouble. I've had a quick look at the code and that NPE seems to be occurring because a parent transaction has no children, which should never be the case. So either something is wrong in Moneydance itself or I've misunderstood the Moneydance API.

    I hope to be able to have a closer look at it this weekend.

    Cheers, Kevin

  2. Kevin Stembridge repo owner

    I've just uploaded forecaster.36b.mxt to the downloads page. I still don't know why a parent transaction would have no children but I've modified the code so that it won't throw an exception but will log an error instead.

    When you run this can you check your help console for an error message that starts with this: "A parent txn has a split count of 0"

    It should then print some information about the transaction that might help me to figure out the bug.

  3. Joseph Moloughney

    Worked great, thanks. I checked the log and found a weird transaction in one of my accounts. It was a duplicate transaction of a scheduled transaction. The original (good) one had all the right info but the duplicate had a $0 transaction. I deleted the bad transaction and the error stopped coming up.

    A parent txn has a split count of 0: [ParentTxn(20500) desc=CapCom; val=0; stat= ; #splits=0; chk=; acct=CapCom Checking; date=20140415; splits=; ] no txn files to sync Saving to /Users/joe/Library/Application Support/Moneydance/Documents/moneydance.moneydance/root.mdinternal Saving state file to dropbox no txn files to sync Saving to /Users/joe/Library/Application Support/Moneydance/Documents/moneydance.moneydance/root.mdinternal file was modified; syncing! syncing now <no transaction files> Saving state file to dropbox syncing txns after date: 20140113 Deleting processed transaction files syncing finished Saving to /Users/joe/Library/Application Support/Moneydance/Documents/moneydance.moneydance/root.mdinternal no txn files to sync Saving state file to dropbox Saving to /Users/joe/Library/Application Support/Moneydance/Documents/moneydance.moneydance/root.mdinternal no txn files to sync no txn files to sync

  4. Log in to comment