Access Violation (v10)

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

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

Access Violation (v10)

Post by Phil Pendlebury » Mon Dec 31, 2007 5:45 pm

Happy New Year all!

The below script causes access violation errors (v10).

This happens whenever the OK or cancel button are pressed. The script seems to work normally though once the violation error is cleared.

[code]
Dialog>Dialog1
Caption=Dialog1
Width=156
Height=157
Top=219
Left=1103
Label=Filename:,24,16,true
Edit=msEdit1,24,40,65,msEdit1
Button=Set,96,40,41,25,0,,Set
Button=OK,24,80,41,25,10,,OK!
Button=Cancel,96,80,43,25,2,,Pee Off!
FileBrowse=Set,msEdit1,,dir
EndDialog>Dialog1


Show>Dialog1,r

Let>folderresult=%Dialog1.msEdit1%
MSG>%folderresult%
[/code]

Any idea if this is reproducible or could it be my system only?

Cheers,

Phil.
Phil Pendlebury - Linktree

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

Post by Phil Pendlebury » Mon Dec 31, 2007 5:51 pm

Additional:

Sorry - I am getting access violations when hitting buttons on many dialogues created with MS.

For example I just tried with the Image Recognition test script:

[code]
/*

This macro demonstrates the speed of the FindImagePos command.

Run it and browse for a bitmap file previously created with the Image Capture tool which is
currently showing on the screen. Hit Find and the image will be found, the mouse will move
to it's location and a message box will be displayed showing elapsed time in seconds.

View a Tutorial on How to Use Image Recognition:
http://www.mjtnet.com/blog/2007/02/20/h ... cognition/

*/

VBSTART
VBEND

Dialog>Dialog1
Caption=Dialog1
Width=384
Height=257
Top=458
Left=358
Edit=msEdit1,16,72,249,
Label=BMP File:,16,56,true
Button=Browse,280,72,75,25,0
Label=Browse for a BMP captured with the image capture tool,16,16,true
Button=Find,280,128,75,25,10
Edit=msEdit2,16,128,121,0
Label=Color Tolerance:,16,112,true
Label=BMPs must be created with the Image Capture Tool%CRLF% (Editor/Tools/Image Capture Tool),16,176,true
FileBrowse=Browse,msEdit1
EndDialog>Dialog1

Show>Dialog1,r

If>r=10
VBEval>Timer,startTime
FindImagePos>Dialog1.msEdit1,SCREEN,Dialog1.msEdit2,1,X,Y,n
If>n>0
MouseMove>X_0,Y_0
Endif
VBEval>Timer-%startTime%,Elapsed
MessageModal>Seconds Elapsed: %Elapsed%
Endif
[/code]

and it worked but as soon as I hit a button - access violation.

I have just installed V10 which I installed in the default location.

V10 beta did not display this problem.
V9 also did not.
Phil Pendlebury - Linktree

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

Post by Phil Pendlebury » Mon Dec 31, 2007 5:56 pm

This does not appear to happen when the script is compiled.

Sorry I have to go to work now so can't follow this up until tomorrow.
Phil Pendlebury - Linktree

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

Post by Marcus Tettmar » Tue Jan 01, 2008 12:18 am

No issues with either script here.
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: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Tue Jan 01, 2008 3:34 am

I am using Vista 64 could this be the problem? It is 100% reproducible at the moment.

I will try un-installing and reinstalling tomorrow.
Phil Pendlebury - Linktree

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

Post by Phil Pendlebury » Tue Jan 01, 2008 3:40 am

Here's a screeny just in case it's any help and my system info is in my signature:

Image
Phil Pendlebury - Linktree

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

Post by Phil Pendlebury » Tue Jan 01, 2008 3:51 am

OK I did the following:

Uninstalled all version (9 and 10).
Removed all visible MJTNET entries from registry.
Ran registry scan.
Reinstalled v 10 only.

Still getting the same error.

Also MS will not quit. Although it shows that no macro is running after I have exited the macro (after the error). In the task bar it still says "running foldersetexample".

The script is not running.

MS must then be closed with task manager which takes a few attempts.

It can also be quit by running the macro AGAIN and closing the dialogue.

Hmmm.

I'm sure this is a real PITA for you as no one else is having this trouble. Is anyone else using Vx64?

If there is anything you can suggest to try and diagnose this I will gladly try it.

Bed time...
Phil Pendlebury - Linktree

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

Post by Marcus Tettmar » Tue Jan 01, 2008 8:01 am

Have you tried rebooting?

Nothing related to the dialogs/buttons has changed since the beta, yet you say the issue was not there in the beta. Equally odd is that you also say it works as a compiled macro. The code in either case is identical.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

bnc1
Pro Scripter
Posts: 127
Joined: Sun Jul 31, 2005 5:10 pm

Post by bnc1 » Tue Jan 01, 2008 3:01 pm

Hmmm ..I also had some access violation problems with MS10 beta that were never explained and I was also using Vista x64. See this post http://www.mjtnet.com/forum/viewtopic.php?t=4281. So far I am not having any issues with the general release of MS10. I also have another unresolved issue that occurred with MS9 but I suspect the root cause is something to do with hotkeys and sharing scripts with MS9 and MS10. This is speculation on my part at this point. See http://www.mjtnet.com/forum/viewtopic.php?t=4346

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

Post by Phil Pendlebury » Tue Jan 01, 2008 3:08 pm

Yes I have rebooted many times.

It is still 100% repro.

Would you like me to try with the beta again (I will need to re-download).

Please don't dismiss this as silly. I have a very stable and well maintained setup and a very decent system.

Once again I ask is anyone else using Vx64?
Phil Pendlebury - Linktree

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

Post by Phil Pendlebury » Tue Jan 01, 2008 3:17 pm

bnc1 wrote:Hmmm ..I also had some access violation problems with MS10 beta that were never explained and I was also using Vista x64. See this post http://www.mjtnet.com/forum/viewtopic.php?t=4281. So far I am not having any issues with the general release of MS10. I also have another unresolved issue that occurred with MS9 but I suspect the root cause is something to do with hotkeys and sharing scripts with MS9 and MS10. This is speculation on my part at this point. See http://www.mjtnet.com/forum/viewtopic.php?t=4346
Hi bnc1, did you try running either of the scripts I posted above? Just from the editor is fine.
Phil Pendlebury - Linktree

bnc1
Pro Scripter
Posts: 127
Joined: Sun Jul 31, 2005 5:10 pm

Post by bnc1 » Tue Jan 01, 2008 3:18 pm

Phil, I tried using the script you posted on my Vista x64 system with MS10 and it works fine :?: :!:

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

Post by Phil Pendlebury » Tue Jan 01, 2008 3:47 pm

Ok I also tried removing the macros.dat file. No change.

Some more info.

This error only happens when running a script form the editor.

If I close MS completely then double click on the macro file to run the script it executes perfectly.

Once again steps to repro:

Open the script in my first post in the editor.
Use the browse button to locate a folder.
After locating the folder - Click OK.

This is where the error appears.
Phil Pendlebury - Linktree

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

Post by Marcus Tettmar » Tue Jan 01, 2008 5:34 pm

Unable to replicate but have sent you a PM with a link to a debug version which will provide more information about the access violation.
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: 538
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Tue Jan 01, 2008 5:50 pm

mtettmar wrote:Unable to replicate but have sent you a PM with a link to a debug version which will provide more information about the access violation.
Thank you Marcus I will forward all relevant info later this evening.

:-)
Phil Pendlebury - Linktree

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