Repeated freezing on a specific investment.

netr@cer's Avatar

netr@cer

29 Jan, 2023 07:31 PM

Is there a built in equivalent in MoneyDance for file validate?

I have an investment account that freezes up MD completely (all MD windows become non-responsive).

Backdrop - I'm cleaning up imported investment transactions that didn't come in clean. Specifically a security named "^" which seems to be where, in Quicken, there was "MiscInc" transactions categorized as Interest Income. These imported into MD in the Register (not bank reg) as "DivInc" with no security and a category of Interest Income. DivInc is supposed to be tied to a security, but since this was simple account interest, my fix was to create Bank Register transactions a simple Interest Income category and delete the rogue DivInc. After I cleaned up is when the freezing happens.

Steps:
Launch Moneydance
Scroll down to investments
Click on the investment account
Click on "Securities Detail"
Change to security 'B' in the drop down (there are only 3 securities; A,B,& C where A is the ^ security I cleaned up, B is the one that causes the hang, and C works fine)
Click on one of the transactions on the left side of the detail pane.
Freeze.

Need to use a force quit. I'd like to run a file integrity check if possible (unless I'm just being overly jaded as a former quicken user :D )

  1. 1 Posted by Stuart Beesley ... on 29 Jan, 2023 08:06 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Right.

    1. run toolbox extension. In security tools run the check hierarchical security feature. Any problems?

    2. Make it freeze up, then force quit. Then locate errlog.txt file on disk (before you relaunch MD) and upload that here.

    3. Do the securities in question have splits and do any buy then sell txns span the split dates?

  2. 2 Posted by Stuart Beesley ... on 29 Jan, 2023 08:16 PM

    Stuart Beesley (Mr Toolbox)'s Avatar
    1. Clarification. It’s on the account tools menu and called:
      ‘ FIX - Non-Hierarchical Security Acct Txns (& detect Orphans)’
  3. 3 Posted by Stuart Beesley ... on 29 Jan, 2023 08:33 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Also read this:
    https://infinitekind.tenderapp.com/discussions/problems/84228-ui-bl...

    Does this apply?

    And poss run the (last) script on post 14

  4. 4 Posted by netr@cer on 30 Jan, 2023 03:55 AM

    netr@cer's Avatar

    Thanks.
    1) I'm running Toolbox v1056 and cannot find the item you mention. I'm looking in "MENU: Accounts and Categories tools" (and checked others but can't find "FIX - Non-Hierarchical....."

    2) did that, and searched my whole computer for errlog.txt and received no results.

    3) No splits that I can see in the register for the security.

    The extra post I need to dig in tomorrow. Getting late and too many beers during the games :D

    FYI - Mac version 12.6, MD version 2022.5 (4091).

    ps. I received the notice about the new update but have not updated until this problem is resolved or until someone says the update is meant to fix.

    Thanks for the help!

  5. 5 Posted by netr@cer on 30 Jan, 2023 04:15 AM

    netr@cer's Avatar

    some additional info.

    I corrected all the erroneous MiscInc transactions that didn't have a security attached, and attempted to "Remove Security" on the blank value in the Securities Detail pane. It gave me a very ominous warning about are you sure you want to delete "the name of the investment account". I made a copy of my datafile and tried it. The account remained and it correctly removed the blank security.

    Interestingly, prior to deletion, it displayed in the drop down the following securities (in this order)
    A (the null value)
    B (the security hanging up)
    C

    Now it displays
    C
    B

    and B is still the security hanging. Just mentioning because I find it odd the sort order changed and am wondering if position in the list is playing a part.

  6. 6 Posted by Stuart Beesley ... on 30 Jan, 2023 08:43 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Sorry - typo - it's in transaction tools - try there.

    Also, not that you have toolbox installed, go to help/console and look for this:

    -----------------------------------------------------
    Toolbox - quick information:
    -----
    MD CONSOLE FILE LOCATION:       '/Users/xxx/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/errlog.txt'
    MD CONFIG/PREFERENCES LOCATION: '/Users/xxx/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/config.dict'
    

    It will tell you where to look for errlog.txt file after you force quit MD...

    ??

  7. 7 Posted by Stuart Beesley ... on 30 Jan, 2023 04:07 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    STEP1. Go to Tools/Security and make sure for each security that there is something set in the SecurityID, SecurityName and TickerSymbol fields (even if dummy info) - i.e. don't leave blank.

    Then you may need all these in toolbox:

    Transaction tools menu: "FIX - Non-Hierarchical Security Acct Txns (& detect Orphans)"

    Security Tools menu: "FIX - Detect and fix Investment Security records not properly linked to Security Master records"

    Security Tools menu: "FIX - Detect and merge/fix duplicate Securities within same Investment Account(s)"

  8. 8 Posted by netr@cer on 31 Jan, 2023 01:30 AM

    netr@cer's Avatar

    Step 1 - Toolbox. "Congrats - I found no non-hierarchical / invalid txns".... woohoo! :D

    Step 2 - I found the file location, but I walked the directory and it flat out doesn't exist.
    MD CONSOLE FILE LOCATION: '/Users/myname/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/errlog.txt'
    MD CONFIG/PREFERENCES LOCATION: '/Users/myname/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/config.dict'

    There is no com.infinitekind.moneydance folder in my user library. Which seems impossible but I've got hidden files turned on (shift + cmd + .) and I still can't find it. I must be missing something, my MD preferences are saving somewhere......

  9. 9 Posted by netr@cer on 31 Jan, 2023 01:33 AM

    netr@cer's Avatar

    Further update.

    Congrats messages on all

    Transaction tools menu: "FIX - Non-Hierarchical Security Acct Txns (& detect Orphans)"

    Security Tools menu: "FIX - Detect and fix Investment Security records not properly linked to Security Master records"

    Security Tools menu: "FIX - Detect and merge/fix duplicate Securities within same Investment Account(s)"

  10. 10 Posted by Stuart Beesley ... on 31 Jan, 2023 08:16 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    '/Users/myname/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/config.dict' Will be a called something different if you walk in finder. The infinite kind but will be called Moneydance. So look around a bit.

    However if you run terminal and then:

    Open “/Users/myname/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/errlog.txt”
    

    It should open.

  11. 11 Posted by Stuart Beesley ... on 31 Jan, 2023 08:19 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Ok. Well you need it to freeze, then force quit, and I need that log file.

    Another route. Launch toolbox. Top right. Open md folder. Open console. It should show you the folder.

  12. 12 Posted by Stuart Beesley ... on 31 Jan, 2023 09:32 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    If you want to try some more direct troubleshooting, email me:
    ….

  13. 13 Posted by netr@cer on 31 Jan, 2023 09:50 PM

    netr@cer's Avatar

    Finally found errlog.txt - MacOS is weird....

    Anyway, doesn't look like any obvious errors to me. Obfuscated personal info, otherwise the paste is intact.

    Starting Moneydance 2022.5 (4091) at Tue Jan 31 16:39:41 EST 2023
    Settings Folder: /Users/username/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance
    OS: Mac OS X 12.6 x86_64username
    Architecture: intel64
    Java: 18.0.1 (Eclipse Adoptium)
    Is in sandbox: true; restricted file access: false
    Library path: /Applications/Moneydance.app/Contents/MacOS:/Applications/Moneydance.app/Contents/PlugIns/vm.jdk/Contents/Home/lib:/Applications/Moneydance.app/Contents/MacOS:/Applications/Moneydance.app/Contents/PlugIns/vm.jdk/Contents/Home/Frameworks
    initialized extension moneyforesight in 0.474 seconds
    initialized extension securityquoteload in 0.047 seconds
    python.path: /Users/username/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/python
    python.cachedir: /Users/username/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/python/cache
    python.cachedir.skip: false
    Quote Load>INFO:16:39:41-main(Quote Load,Init) Started Build 3058
    Quote Load>INFO:16:39:41-main(Quote Load,Init) Locale en_US

    #############################################################################################################################
    toolbox: toolbox_init.py initializer script running - performing some quick checks, logging diagnostics, then will exit....
    #############################################################################################################################

    initialized extension toolbox in 0.485 seconds
    Font initialisation attempted from non-UI thread. Hopping over to dispatch thread...
    Initializing fonts:
      default: [[SF Pro Display, SF Display, Helvetica Neue, Helvetica, Lucida Grande, Dialog]]
      printing: [[Helvetica, SF Pro Display, SF Display, Helvetica Neue, Helvetica, Lucida Grande, Dialog]]
      monospaced: [[Gill Sans, Menlo, Monaco, Monospaced]]
      coding: [[Hack, Monospaced]]
    fonts resolved:
     default: SF Pro Display:12.0:style0
     mono: Gill Sans:12.0:style0
     coding: Hack:12.0:style0
     print: Helvetica:12.0:style0
     header: SF Pro Display:14.0:style0
     register: SF Pro Display:11.0:style0
     reportTitle: SF Pro Display:32.0:style0
     calendarTitle: SF Pro Display:11.0:style0
     reportHeader: SF Pro Display:10.0:style0
     detailTitle: SF Pro Display:14.0:style0
    detected system appearance: org.violetlib.vappearances.VAppearanceImpl@44c13103
    Theme NoSuchField: reminderHomeBG
    Theme NoSuchField: reportAlternateRowBG
    Theme NoSuchField: reportRowBG
    Setting look and feel class to com.apple.laf.AquaLookAndFeel
    Font initialisation attempted from non-UI thread. Hopping over to dispatch thread...
    opening last file: myfilename
    loading dataset: /Users/username/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Documents/myfilename.moneydance
    loading with 128 bit encryption key
    loading with 128 bit encryption key
    reading trunk data tiksync/trunk
    trunk data loaded (2.101 seconds), checking for incremental updates
    loading un-synced txn files...
    loading synced txn files...
    replacing root: null () with new root: myfilename (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
    ICloudContainer.isContainerAvailable(): nativeGetICloudPath: null

    -----------------------------------------------------
    Toolbox - quick information:
    -----
    MD CONSOLE FILE LOCATION: '/Users/username/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/errlog.txt'
    MD CONFIG/PREFERENCES LOCATION: '/Users/username/Library/Containers/com.infinitekind.MoneydanceOSX/Data/Library/Application Support/Moneydance/config.dict'
    -----
    BACKUPS - Save Daily: True
    BACKUPS - Keep no more than: 5 backups
    BACKUPS - Separate Backup Foldr: True
    BACKUPS - Backup Folder: '/Users/username/Documents/MoneyDance' (backup location exists)
    ..key - 'backup.location': '/Users/username/Documents/MoneyDance'
    ..key - 'backup.last_browsed': '<not set>'
    ..key - 'backup.last_saved': '/Users/username/Downloads'
    ..key - '_default_backup_dir': '<not set>'
    -----
    System Default Locale Cty/Lang: 'US' / 'en'
    MD Preference Locale Ctry/Lang: 'US' / 'en'
    MD Locale Cty/Lang: 'US' / 'en'
    Moneydance decimal point: '.'
    -----
    MD EXECUTION MODE: 2 (Normal)
    JVM - Available processor cores: 10
    JVM - Maximum memory possible: 28.8 GB
    JVM - Total memory allocated: 1.7 GB (used 0.8 GB / free 1.0 GB)
    -----------------------------------------------------

    Quote Load>INFO:16:39:57-main(Quote Load,HandleEventFileOpened) Debug level set to INFO
    Quote Load>INFO:16:39:57-main(Quote Load,sendAuto) Check Auto without delay
    Quote Load>INFO:16:39:57-AWT-EventQueue-0(Quote Load,sendAuto) now 16:39:57.035383 next 2023-01-31T17:00
    Update info received with successful signature verification
    calculated portfolio cost basis in 0.0 seconds
    mousePressed, but the parent is an ancestor
    -----------------------------------------------------
    JVM - Maximum memory possible: 28.8 GB
    JVM - Total memory allocated: 1.7 GB (used 0.7 GB / free 1.0 GB)
    -----------------------------------------------------

  14. 14 Posted by Stuart Beesley ... on 31 Jan, 2023 09:57 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    So this log was after the freeze and after the force quit and before you relaunched MD?

    If so, yes no errors.

    Out of interest, shut md. Rename config.dict. Launch md and try again. Does it still freeze? Either way, exit again, delete config.dict then rename the original back.

  15. 15 Posted by Stuart Beesley ... on 31 Jan, 2023 10:24 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    So I’m out of ideas as there are no errors.

    If you want me to look further/deeper, perhaps email me.
    ...

    (Not support, just a fellow user)

  16. 16 Posted by netr@cer on 01 Feb, 2023 05:40 PM

    netr@cer's Avatar

    Deleting the config file did not help. However, one clarification to a response on an earlier thread. When I said there were no splits involved, I meant transaction splits.
    I am now noticing that the security in question has multiple stock splits.

  17. 17 Posted by Stuart Beesley ... on 01 Feb, 2023 05:55 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Right. Two things...

    1. Run the script (the latest one called test_cost_basis3.py) on post 14 here:
      https://infinitekind.tenderapp.com/discussions/problems/84228-ui-bl...

    2. As a test, edit the stock splits on this security. Take a screenshot first and then delete all the splits.. Does the error go away?

  18. 18 Posted by netr@cer on 02 Feb, 2023 11:16 PM

    netr@cer's Avatar

    I think we're definitely in the area. The security hanging is a company stock option (purchase plan) I don't remember why it was set up this way, but the initial purchase was a Sell on the date of the signup. Then over X period of time, paycheck contributions were pushed into the account, and when the option executed, there was a Buy for the actual stock at the original option price and a Buy with the same values to cover the short sell. And over the period there were a few stock splits.

    Anyways, test_cost_basis3.py seems to be outputting without errors. Its picking up three transactions (correct) for the troublesome security, the original Sell (at the split adjusted qty) and the two Buy transacations to close out the position. Because of the split there was a fractional share involved. In the end share balance shows as 0. I've eliminated fee,costbasis,totalcost, price since this is an open forum but they all looked ok.

    19970514 sell:633.75 totshrs: -633.75
    19990630 buy:633 totshrs: -0.75
    19990630 buy:0.75 totshrs: 0

    I'll try removing the splits next...I've half tempted just to forget about it since the transaction is so long ago and the account is closed. But my curiosity has the better of me...

  19. 19 Posted by netr@cer on 03 Feb, 2023 12:33 AM

    netr@cer's Avatar

    And just like that, deleting the two splits makes the problem go away. However, adding the splits back in mucked up my holdings.

    Restored Backup. Try 2.
    Changed the dates of the splits (still within the appropriate period). Did not help, still freezes.

    Try 3. Changed the most recent split to a date outside the range (+10 yrs). Same hang.
    Restored Backup. Try 4.
    Changed the date of the other split to outside the range (+10 yrs). Hang FIXED.

    Now the fun part. Went back into the security and now I have three splits. The one original unchanged (remember I went to backup), and TWO other splits for the same +10 year date.

    Deleted one of the splits. Returned the date back to the original date. HANG RETURNS.... What the ??

    Restore Backup. Try 6?
    Changed the date of the bad split forward 10 again. Once again, it created two split entries 10 years ahead. Removed one of them. Balances look ok.. somehow. Not sure how considering the split is nine years after the last sell, but ok. Leaving it like this for now.

  20. 20 Posted by Stuart Beesley ... on 03 Feb, 2023 05:54 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    There is a bug whereby the combination of a negative stock balance prior to a stock split followed by any buy/sell after that date will cause an infinite loop.

    When it freezes, have you tried leaving it for 10 minds to see if it unfreezes? It should do. As it will abort. At this point grab help/console and upload. Then I can see if it’s the same error.

    Anyway, it sounds like you start with a negative sell and then have split(s) and then have buys. From memory this will cause the bug.

    My suggested fix. Delete all splits. Pretend the splits had already occurred and enter the original sell using pretend future state. But no good for you if you have other txn using the same security.

    @dwg. What’s the best way to handle stock purchase plans? Starting negative doesn’t sound right?

  21. 21 Posted by dwg on 03 Feb, 2023 07:13 AM

    dwg's Avatar

    Stuart,

    Going straight to the hard questions eh. Option handling is not something that has come up a lot so I would be hard pressed the state the best way.

    Some years back I decided to investigate options a little deeper. I wrote up a set of notes which I have attached. Now I cannot say I did exhaustive testing, but it seemed to work at the time and one of my goals was not to have the options contribute to net wealth, given the option only has a notional or potential value at the time.

    There is likely to be other ways but one of the problems is the net worth one. Moneydance is not really geared to handle employee options, vesting etc.

    Use the notes as you would like

    Des

  22. 22 Posted by netr@cer on 03 Feb, 2023 06:24 PM

    netr@cer's Avatar

    Thanks guys. As I recall (and it was many moons ago), the reason was to ensure it did not contribute to net wealth, while still being able to track the stock's potential value.

    Steps:
    Execute a Buy for X shares at Y price,
    Execute a simultaneous Sell of X shares of the option at the same Y price.
    This zeroed out any wealth increase, but still put the stock into the register to track potential value.

    Once payroll contributions accumulated in the cash balance and it hit the exercise date, there was a Buy of the option at Y price to cover using the cash funds that had accumulated.
    This single transaction zeroed the cash balance that accumulated and simultaneously increased wealth by whatever premium the market price was over exercise (remember wealth was accumulating because of the cash contributions which eventually totaled X shares time Y price).

    The reason for the 'option' I believe was just to use as a placeholder, rather than Option in the normal context. I needed a security to track against the actual security. If I created the sell of the original security instead of the option, well, I'd have no shares.

    The security hanging is the specific option, so it will never be used again; therefore I will follow Stuart's recommendation of manually entering the adjusted shares and eliminating the splits.

    Thanks again for the help!!!!

  23. 23 Posted by Stuart Beesley ... on 03 Feb, 2023 06:30 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    👍

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac