Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
PR_SUBJECT = 3604510 ; &H0037001E oApp= createobject( "outlook.application" ) sItem = CreateObject("Redemption.SafeMailItem") sItem.Item = oApp.Session.GetDefaultFolder(6).Items(1) s= sItem.Fields(PR_SUBJECT) ; ---> where it goes wrong objectclose( sItem ) objectclose( oApp ) exitI'm using the latest version (v3.4.0.325) of redemption. Outside winstudio there seems to be no problem and I'm able to run it over and over succesfully.
Any idea what is causing this or how I can prevent winbatch to crash?
Hmmm. When a WinBatch script exits, any unclosed handles or unreleased memory is freed by the system (hopefully) But in Studio, since studio does not exit, if you rerun the script it may conflict with the unclosed unfreed items from the previous run.
This problem was studied in great depth. Looks like a Redemption problem. Or maybe an Outlook problem. In any case we claim complete innocence. The general theory is that Redemption is making an unwarranted assumption about the environment that it is running in. I suspect that on the surface it may seem like a perfectly reasonable assumption...but not a correct one. And this leads to some assumption that really causes an ugly crash. It appears there is considerale stack corruption. Most of the crashes we could made required a reboot to get the system running again.
My advice is to either figure out how to email without Outlook, or use the usual debug once/Restart Studio approach.
Article ID: W16589
File Created: 2005:02:18:12:21:34
Last Updated: 2005:02:18:12:21:34