stevecasper Posted May 11, 2009 Report Share Posted May 11, 2009 Ok, looks like today is my day for problem-sharing. As mentioned in a previous post, I've finally moved some cumbersome macros over from ME3 to MEP. When I begin working a case, I always have to run Macro A. When I finish a case, I always have to run Macro B. When I run Macro A directly via its hotkey, it works fine. When I run Macro B via its hotkey: also fine. To streamline everything, Macro B ends with the following two commands: Macro Run: Macro A Macro Stop In ME3 this was flawless. I moved easily from one case to the next without having to run Macro A manually. In MEP Macro B runs Macro A, but somewhere between line 17 and line 35 (of Macro A) Macro Express crashes (and crashes hard, to the point I have to reboot my system in order to get MEP running again). It's hard to be certain where the crash is actually happening, though I guess I could throw in some text boxes or pauses to help me pinpoint it... but the problem only happens when Macro A is run by Macro B. Easy enough to work-around: Eliminate the Macro Run command from Macro B. Which I did. But then a whole new - possibly related - problem cropped up. Macro A > Manual, Macro B > Manual, Macro A > Manual, Macro B > Manual > Hard Crash! Back to ME 3 for these macros. Has anybody else experienced similar crashes? It's very consistent, though I cannot be certain what is causing it... I'm going to try to pinpoint the problem and report it officially, though I honestly can't keep rebooting my machine while trying to locate the problem (they don't like paying me for not working). But any input would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 11, 2009 Report Share Posted May 11, 2009 Did you try to uncheck the "Wait for this program to terminate... " box? Do you have a Variable Save in the called macro? How are you managing your variables from one to the other? EG global/local. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted May 11, 2009 Author Report Share Posted May 11, 2009 Very good questions. Did you try to uncheck the "Wait for this program to terminate... " No... honestly didn't even think about it. I'll give it a shot. Edit: Tried it, no luck. Program still crashes Do you have a Variable Save in the called macro? Yes, because some of the other macros I run during the course of reviewing the account will require information gathered by Macro A (account numbers, serial numbers, etc.). However, they are not used in Macro B, when Macro B runs. How are you managing your variables from one to the other? EG global/local. All variables are global... however none of the variables set within Macro B are pertinent to Macro A, so I don't imagine they would adversely affect Macro A... if you think they might, I would love to learn the reasons. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 11, 2009 Report Share Posted May 11, 2009 I have one incident with three tracking numbers with ISS on Variable Save crashes in called macros. 6824, 6825, and 6829. I'm not sure which they are using. In my ME3 macros I called a lot and had a uniform method. Whichever variable I wanted to pass to the sub-macro I would write to a registry key named feedback. Then I would call the macro. Then I would save all vars and then clear all vars. Next read Feedback back in. Do my thing in the sub then write back to feedback and restore variables. Finally return to the macro. Eventually I want to change the way I do this to a 'pro' method but I did not have time to change all of them and needed a quick fix. So what I did as to delete the variable save and restores and set all the sub-macros to use local vars. Works brilliantly. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted May 12, 2009 Author Report Share Posted May 12, 2009 I've reported these crashes to ISS, though I haven't yet gotten a ticket number. I'll update when I get one. Basically, thanks to Cory's helpful suggestion to log all commands through the Miscellaneous tab, I was able to find the command(s) that were crashing Macro Express. I don't know why, and obviously that's why I've reported a bug, but the command lines that were wreaking havoc were Save All Variables commands. I've recently gone through the two macros (A and B in the original example) and changed the Save All to simply Save Text (as the Integer variables I'd been setting didn't really need to be saved). Since I made that change, I have not had any further crashes. It may be important to note that I have also changed the "Macro Run" command at the end of Macro B to a "Text Type" command with the hot-key to launch Macro A. This, by itself, did not fix the Save All Variables crash, and I'm tempted to switch back to a Macro Run command, just because it's a little more elegant, but I thought it bore mentioning. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 12, 2009 Report Share Posted May 12, 2009 It may be important to note that I have also changed the "Macro Run" command at the end of Macro B to a "Text Type" command with the hot-key to launch Macro A. This, by itself, did not fix the Save All Variables crash, and I'm tempted to switch back to a Macro Run command, just because it's a little more elegant, but I thought it bore mentioning.IMHO you should have never gone away from it. I highly suggest you check out the "Wait for this macro to terminate..." option as well. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted May 12, 2009 Author Report Share Posted May 12, 2009 IMHO you should have never gone away from it. I highly suggest you check out the "Wait for this macro to terminate..." option as well. I've just switched the command sequence back to Macro Run > Macro Stop (about 20 minutes ago), and haven't had any issues, so I'm now sufficiently convinced that it was never contributing to the problem in the first place. The "Wait for this macro to terminate..." option defaults to checked. I unchecked it after you pointed it out to me earlier, and continued having issues. For now I'm leaving it as it is (unchecked) because it seems to be working fine. Would you recommend I leave it unchecked, or should I check it again? Since the only command left after the Macro Run command is a Stop (which I think is probably superfluous anyway), I don't see that it should make any difference whether the box is checked or not in this particular case. But I am certainly open to learning in what ways I might be wrong. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 12, 2009 Report Share Posted May 12, 2009 You do not need the stop so remove that first off. As for the behavior of the check box I am unsure of the effect, that's why I suggested experimenting with it. You see in ME3 only one macro could run at one time so effectively the one was put on hold while it ran the other. But this is pro so we can run multiples but we have the whole issue with the shared variable pool. I was thinking that if you tell it not to wait it would kill off all the variables defined by the parent macro and thus reduce possible collisions on the second. But you might still need to wipe these variables if they do not have unique names. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted May 13, 2009 Author Report Share Posted May 13, 2009 I've reported these crashes to ISS, though I haven't yet gotten a ticket number. I'll update when I get one. Tracking number: [iSS6970] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.