Strategy Monitor unhandled exception and crash
Author: wmrgrove
Creation Date: 2/5/2018 8:25 PM
profile picture

wmrgrove

#1
OK, looks like I have a STRATEGY MONITOR problem that is not related to my Strategy;

1. closed everything, did a full restart to win and WL, nothing else open

2. Created a new Strategy using Cone's basis Strategy Monitor test ( from another Forum Post )

code here;


CODE:
Please log in to see this code.





3. opened Strategy Monitor, added strategy and enabled logging ( per Eugene advice )

4. enabled strategy and ran on 79 ticker list, data loaded and got 15 alerts on 79 tickers

5. right clicked to view the logging and got an "unhandled exception" dialog box,

6. Although this simple code has not crashed, if I try to run it a second time (run dailies) it will run, but find no alerts

I am way out of my league at this point on next steps?? NOTE; I just ran it again on one ticker and got a full WL crash!

Started WL again, opened Strategy Monitor, did nothing but remove the one Strategy and WL crashed again!

I'm guessing I have a corrupted file, and for now everything else seams to run correctly.


Eugene, one more thing on the Strategy Monitor problem.

If I just restart WL and do nothing but open the empty Strategy Monitor, right click and select "view the item log", I will get an "Unhandled Exception" . I have a second laptop for backup and I just updated the data on it, opened the Strategy Monitor, right clicked and got the same error. ( don't think I have ever used Strategy Monitor on that PC ) I do backup all my "DATA " file to that PC.
profile picture

Eugene

#2
Hi,

Let's agree on definitions first. If you can suppress an error message and continue working in the program, it means that Wealth-Lab has not crashed.

QUOTE:
I am way out of my league at this point on next steps?? NOTE; I just ran it again on one ticker and got a full WL crash!

It's possible that the StrategyMonitorConfiguration.xml file got corrupt. I recommend closing the SM, deleting the file and reopening the SM (and starting from scratch). You will find instructions on how to find the file on the Errors | Strategy page.

If just one particular Strategy crashes WLP then please follow superticker's suggestion in the other thread.

QUOTE:
6. Although this simple code has not crashed, if I try to run it a second time (run dailies) it will run, but find no alerts

This is a known issue documented on the Open Issues page: "Run Dailies" always fail on second attempt in WLD (results are mixed in WLP). This, as well as Known Errors, is a helpful resource for self-help.

QUOTE:
I will get an "Unhandled Exception"

Copying and pasting the exception text might provide insight into what causes it.
profile picture

wmrgrove

#3
Eugene, per your instructions;

1. after a PC restart, deleted the config file, started WL, opened Strategy Monitor, and first just right clicked, selected view logging and got an "Unhandled Exception" ( correct not a crash ). text file attached

2. closed wealth lab, restarted, ran Cone's basic program 3 or 4 times on a list ok, then 10+ times on different lists with no problems.
3. right clicked, selected view logging and got an "Unhandled Exception" ( correct not a crash ). It appears that this "Unhandled Exception" is always there?

4. I have read all of the open issues and know problems now
profile picture

superticker

#4
QUOTE:
1. after a PC restart, deleted the config file, started WL, opened Strategy Monitor, and first just right clicked, selected view logging and got an "Unhandled Exception" (correct not a crash). text file attached
So did you delete the StrategyMonitorConfiguration.xml file or the WealthLabConfig.txt file?

I had a problem were I had to delete the latter file. That fixed my problem but created two others with the EditorSettings.xml file being out of sync with the new WealthLabConfig.txt file, which lead to a new WL unhandled exception. I eventually ended up deleting the EditorSettings.xml file too to get it in sync with the "new" WealthLabConfig.txt file. :(

Because you can "move" the problem from your workstation to your laptop with a file backup, in would "guess" one of these configuration files are corrupted. But understand deleting one may cause new issues with the others. Some of the Open Issues cited above will tell you that.

One thing to consider is to restore backups for all of WL's configuration files. Then the problem will go away and all the configuration files will be in sync from their backups.
profile picture

Eugene

#5
QUOTE:
So did you delete the StrategyMonitorConfiguration.xml file or the WealthLabConfig.txt file?

Good question superticker. And good points re: backups for the config files.

William, FYI: to reset the StrategyMonitorConfiguration.xml neither PC restart nor WLP shutdown are required. Simply close the SM tool.

QUOTE:
3. right clicked, selected view logging and got an "Unhandled Exception" ( correct not a crash ). It appears that this "Unhandled Exception" is always there?

Just the opposite - it's something that affects your PC only. The log may suggest that you're right-clicking on an inexistent item in the SM. Please delete the StrategyMonitorConfiguration.xml as instructed previously.
profile picture

wmrgrove

#6
OK, deleted the StrategyMonitorConfiguration.xml as instructed previously on both PC's and restarted. Ran Cone's basic strategy on both many ,many times with no errors. Ran on single ticker and list large and small with no errors. Ran my basic strategy using external symbol no errors.
Right clicked , selected view logging and got an "Unhandled Exception" ( correct not a crash ). It appears that this "Unhandled Exception" is always there?
This may be a silly question but if either or both of you could just open Strategy Monitor and do nothing but ; Right click , select view logging and see if you get an "Unhandled Exception" . ( since I did not turn on logging ????) Just a thought.

Bottom line is I think I am good to go for what I am doing.

I did discover an interesting situation when running supertickers strategy on my pairs, and will post that in the correct Forum topic shortly. Superticker, thanks again for the help on that, it does exactly what I need to do. This Forum is great!!!!!

Thanks again to both of you for all the help
profile picture

Eugene

#7
QUOTE:
This may be a silly question but if either or both of you could just open Strategy Monitor and do nothing but ; Right click , select view logging and see if you get an "Unhandled Exception"

William,

Indeed this produces an exception dialog but due to not having much sense in it. ;) The idea of logging is to highlight a Strategy (or Strategies), click "Enable logging for selected item(s)", let it run, and then again highlight the Strategy which seems malfunctioning to "View the item log".

Glad you got SM up and running.
profile picture

superticker

#8
If I delete a strategy that's referenced in Strategy Monitor, then try to double click on that row in Strategy Monitor with that deleted reference, I get an unhandled exception. It's very reproducible. Moreover, substituting a new strategy with the same name as the deleted strategy doesn't help (which is acceptable behavior).

I think this unhandled exception confuses new users that are non-computer types. I would either have Strategy Monitor automatically remove the rows with bad references to nonexistent strategies or put up a dialog box telling the user he needs to manually delete that row because the original strategy referenced there no longer exists.
profile picture

Eugene

#9
QUOTE:
If I delete a strategy that's referenced in Strategy Monitor, then try to double click on that row in Strategy Monitor with that deleted reference, I get an unhandled exception. It's very reproducible.

Not for me. I can invoke the "Change Settings" dialog just fine. Maybe because the SM works with its own compiled copy of the Strategy and isn't affected by external changes.
profile picture

superticker

#10
QUOTE:
I can invoke the "Change Settings" dialog just fine.
You can do that for a strategy that no longer exists? So happens if you make a configuration change for this nonexistent strategy in SM? You don't get an error? If SM isn't griping when making SM changes to nonexistent strategies, then that's another problem.

QUOTE:
Maybe because the SM works with its own compiled copy of the Strategy ...
Perhaps. So after deleting some strategy referenced in SM, try rebooting WL so SM can't find that deleted strategy, then try the Change Settings dialog on that nonexistent strategy again. I get an unhandled exception.
profile picture

Eugene

#11
Not "perhaps", this is by design as per the User Guide. There's no "problem" to invoke the dialog for the strategy with whose compiled copy the SM is still working with.

You omitted this key fact: rebooting WL. This changes the picture as there's no more compiled copy in the memory and no Strategy. Its SM entry has become invalid. However, you get the exception box and this is just fine to draw attention of the user to the problem he has created by shooting himself in the foot.