Regular crash when compiling

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Regular crash when compiling

Post by Phil Pendlebury » Wed Mar 03, 2010 9:02 pm

Hi there,

I am getting this problem a lot lately (since before the last release).

When creating a compiled exe file - MS starts the process then the compiler crashes.

The message: msrt.exe has stopped working

Followed by:
Problem signature:
Problem Event Name: APPCRASH
Application Name: msrt.exe
Application Version: 0.0.0.0
Application Timestamp: 4b8ba1d3
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdbdf
Exception Code: 0eedfade
Exception Offset: 0000b727
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 2057
Additional Information 1: 33c8
Additional Information 2: 33c8caaca251c0ae8e451ce3399ff6c8
Additional Information 3: da59
Additional Information 4: da592b5efb070f57f6ffb7d34d82e7fe

I then see another error: Application Error

Image

Which obviously hints that the file is in use. The thing is the file is not in use at all. It is closed. I have even tried deleting the file. (It deletes successfully).

Sometimes it can be cured by saving to a different folder but if I then delete the compiled file (without ever accessing it or running it) and save (compile) to the same folder again I get the error.

The only way round this is to log off my computer and try again.

I have checked all processes.... Nothing a-miss. MSched is not running and neither is the app that I have attempted to compile.

I have no clue what may cause this.

Does anyone have an ideas?
Phil Pendlebury - Linktree

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Mar 04, 2010 4:11 am

Hi Phil,

I have never seen the first error "msrt.exe has stopped working". Looks like something Marcus will need to help you with.

I have had the second "Application Error" before. I was testing a script that could only be run as an executable and didn't realize that it did not close when I "closed" it. Finally, after half a dozen failed attempts at compiling, I figured out that the executable was still running and thus still in use.

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Thu Mar 04, 2010 11:30 am

Thanks JRL.

Yes I get you. I am 99.9999999% sure that the app wasn't (obviously) running. Checked in task manager. Closed Msched and reopened etc. Plus I don't have MS set to run in background I don't use it for scheduled tasks at all.

Also I had not actually run the compiled app yet. Only from within Msched.

It's an odd one for sure.
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Thu Oct 07, 2010 11:50 am

Hi there, I hope someone is still reading this, as I think I have finally found the issue.

This is still happening to me on a regular basis:
  • Compile Script.
    Change something in the script editor.
    Compile again - Crash! (this file is already in use and other such messages - but it is a proper crash, not just a message)
    I have had to get into a routine where if I wish to recompile I first delete all traces of the original compiled script, close MS and start again
I had checked the obvious:
  • The script was not running
    The compiler was not running
    The compiled script was not running
So anyway, I think I have found what is causing this.

If I compile the script and then open the folder where the compiled script is and then leave the folder open and recompile this when I get the error.

So the workaround for me is to close the window that is showing where the compiled script is.

Of course this is a bit of PITA because if I forget to close the window... Crash. Also I then have to find the folder and open it again after compiling, to work with the compiled file.

I find it odd that no one else has noticed this compiling. So maybe it is just me that is experiencing this.

I would be very grateful if anyone could check it out and if you cannot confirm, suggest any reasons why this would happen.

Thanks.




:)
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Tue Oct 12, 2010 10:15 am

Just a quick bump - I have a feeling this last post was missed. :-)
Phil Pendlebury - Linktree

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Oct 12, 2010 11:09 am

I've not seen this myself. If I have understood you correctly you get the error when Windows Explorer is open and showing the file you are compiling? I'm not sure why that should cause an error. But I've tried replicating and doing the same thing. I recompiled a script 5 times in quick succession while Windows Explorer was showing both the .scp and resultant .exe. Did not get any error.

Certainly the error is suggesting the file is open. The compiler has to overwrite the file and modify it. So if something has it open it will fail. But I wonder what has it open and why. Do you have any kind of AV product or similar that might be trying to scan it?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Tue Oct 12, 2010 11:45 am

Thanks for having a look Marcus. Yes you have understood it right.

I will try disabling MSSE that is all I use. May well be something like that.

I'll keep you posted.

Thanks again,

Phil.
Phil Pendlebury - Linktree

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Wed Oct 13, 2010 5:42 pm

Hi guys,

Marcus you hit the nail on the head (as usual)...

The problem was indeed being caused by Microsoft Security Essentials.

After some testing I found a quick fix:
  • Open MSSE
    Go to Settings
    Excluded Processes

    Add: C:\Program Files\Macro Scheduler 12\msrt.exe
Now I can compile the same file over and over again without having to close the damn window I am compiling to every time. LOL.

Odd that no one else has come across this though.

I should point out that in my case the correct path was: C:\Program Files (x86)\Macro Scheduler 12\msrt.exe as I am using Win 7 64bit.
Phil Pendlebury - Linktree

Greg
Newbie
Posts: 3
Joined: Tue Jul 10, 2012 2:29 am
Location: Louisville, kY

Love the forum-- it solves my problems!

Post by Greg » Sun Apr 14, 2013 4:32 am

Had the same problem, though it started where the compiled script was crashing on the target. I tried compiling the script on the target, and then the Macro Editor would hang after saying it created my EXE file. There was no EXE file, and I'd have to reboot Windows XP.

Marcus suggested (above) looking at sources which could be accessing the file during the compilation. When I excluded the EXE name from being scanned by the antivirus software in real time, the problem went away. I could run the original EXE with no problem, and probably could compile a new one (though I didn't try it, since the problem was gone).

Thanks guys!

Greg

P.S. I did scan the EXE with the antivirus software afterword. No virus, just a meddling real-time antiviral scan.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts