Calling GetTextInit causes macro to crash

Technical support and scripting issues

Moderators: JRL, Dorian Ellis

Calling GetTextInit causes macro to crash

Postby c0ntra » Mon Feb 06, 2012 4:41 pm

Hi,

I'm trying to use the text detection feature in Macro Scheduler 13, and for some reason whenever I call GetTextInit in my script, Windows throws an exception and I can't figure out why.
At first I thought it was because I was developing on a Windows 7 x64 computer but trying to run the macro on an x86 platform, but I tried compiling the exe using a virtual instance of Windows 7 X86, only to end up with the same result.

The error window that pops up says:

Code: Select all
Exception EAccessViolation in module Viewpoint_v1.6.exe at 00000000.
Access violation at address  00000000. Read of address 00000000.


The Eventlog shows:

Code: Select all
Log Name:      Application
Source:        Application Error
Date:          2/6/2012 10:18:15 AM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      FC-004
Description:
Faulting application name: Viewpoint_v1.6.exe, version: 1.0.0.0, time stamp: 0x4f1958ad
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00000000
Faulting process id: 0xbf0
Faulting application start time: 0x01cce4e27e02a6b3
Faulting application path: C:\Users\helpdesk\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Viewpoint_v1.6.exe
Faulting module path: unknown
Report Id: ca2fee39-50d5-11e1-996c-80ee731eaa20
Event Xml:
<Event>
  <System>
    <Provider>
    <EventID>1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated>
    <EventRecordID>3512</EventRecordID>
    <Channel>Application</Channel>
    <Computer>FC-004</Computer>
    <Security>
  </System>
  <EventData>
    <Data>Viewpoint_v1.6.exe</Data>
    <Data>1.0.0.0</Data>
    <Data>4f1958ad</Data>
    <Data>unknown</Data>
    <Data>0.0.0.0</Data>
    <Data>00000000</Data>
    <Data>c0000005</Data>
    <Data>00000000</Data>
    <Data>bf0</Data>
    <Data>01cce4e27e02a6b3</Data>
    <Data>C:\Users\helpdesk\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Viewpoint_v1.6.exe</Data>
    <Data>unknown</Data>
    <Data>ca2fee39-50d5-11e1-996c-80ee731eaa20</Data>
  </EventData>
</Event>



And finally, the last few lines of log output from Macro Scheduler before the crash is:

Code: Select all
2/6/2012 10:18:13:538 - START: // Begin 
2/6/2012 10:18:13:539 -   END: // Begin
2/6/2012 10:18:13:540 - START: Repeat>i
2/6/2012 10:18:13:543 -   END: Repeat>i
2/6/2012 10:18:13:544 - START: Let>i=i+1
2/6/2012 10:18:13:545 -   END: Let>i=i+1
2/6/2012 10:18:13:545 - START: MouseMove>1920,1080
2/6/2012 10:18:13:549 -   END: MouseMove>1920,1080
2/6/2012 10:18:13:549 - START: SetFocus>.+Windows Internet Explorer$
2/6/2012 10:18:14:470 -   END: SetFocus>.+Windows Internet Explorer$
2/6/2012 10:18:14:476 - START:
2/6/2012 10:18:14:477 -   END:
2/6/2012 10:18:14:478 - START: // Detect if the Viewpoint Application fails to load
2/6/2012 10:18:14:479 -   END: // Detect if the Viewpoint Application fails to load
2/6/2012 10:18:14:485 - START:
2/6/2012 10:18:14:486 -   END:
2/6/2012 10:18:14:487 - START: Let>WST_TIMEOUT=1
2/6/2012 10:18:14:490 -   END: Let>WST_TIMEOUT=1
2/6/2012 10:18:14:492 - START: GetTextInit



It would appear that anywhere in my code, if I place GetTextInit I experience the same crash; Even if it's the only line present in my code, as I attempted to comment everything else out to test.

Any help would be greatly appreciated

thanks

Adam

[/code]
c0ntra
Newbie
 
Posts: 2
Joined: Mon Feb 06, 2012 4:33 pm
Location: Toronto

Postby Marcus Tettmar » Tue Feb 07, 2012 10:25 am

Can you clarify precisely which v13 build you are running?

Can you also send me your script and .exe so that I can see if the same script reproduces the same error here?

Could you send to support AT mjtnet.com
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
Marcus Tettmar
Site Admin
 
Posts: 5817
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK

Postby c0ntra » Tue Feb 07, 2012 2:29 pm

Hi Marcus,

thanks for the reply. I've emailed you a copy of the source and exe to look at. We're currently using version 13.1.01

Adam
c0ntra
Newbie
 
Posts: 2
Joined: Mon Feb 06, 2012 4:33 pm
Location: Toronto

Postby kevinm » Sun Feb 19, 2012 10:46 pm

I am getting the same error when using GetTextInit, with v13.1.02,

Has this been resolved?
kevinm
Newbie
 
Posts: 1
Joined: Sun Feb 19, 2012 10:43 pm

Postby Marcus Tettmar » Tue Feb 21, 2012 11:11 am

We have not been able to replicate this in any application. It is possible that the issue is related to the application that you are trying to extract from.

1. Does the problem occur when attempting to get text from a different application - e.g. try with Notepad and the Desktop.

2. Does it occur when using GetTextAtPoint. Try GetTextAtPoint against your application and also against Notepad and the Desktop.

If we can identify which application this occurs in, we can feed back to the vendor of the text capture library.
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
Marcus Tettmar
Site Admin
 
Posts: 5817
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK

Any updateS?

Postby t7n7 » Thu Aug 23, 2012 7:26 pm

Hi,

I just purchased the enterprise version and am experiencing the same issue.

Running version: 13.1.06 April 2012

It is critical that I require my app to be compiled in order for it to run. At the moment, everything works except when i compile to an exe file with the GetTextInit command inside.

I also tried to create a new script with just the GetTextInit command and NOTHING ELSE and the program would still crash once compiled into an exe file.

MY OS: Windows 7 64BIT SP 2 with all the updates / patches / service packs.

Thanks
t7n7
Newbie
 
Posts: 2
Joined: Thu Aug 23, 2012 7:23 pm

Postby Rain » Fri Aug 24, 2012 1:33 am

Taken from the version 13 help file.
Create Exe

If your script contains any of the text capture functions (GetTextAtPos, GetTextInRect, GetWindowsTextEx, GetTextPos, WaitScreenText) you will need to supply the following files with your .exe:

GetWord.dll
GetWordNT.dll
GetWord_x64.dll
GetWordNT_x64.dll
GetWord_x64.exe
License.dat

These files can be found in the Macro Scheduler program folder. Copy the above files to the same location as your .exe.

Running Macro Scheduler 13.2.4 on Windows 7 Ultimate

Some of my Scripts I'm sharing with the world


Image
User avatar
Rain
Automation Wizard
 
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm

:D

Postby t7n7 » Wed Aug 29, 2012 6:10 pm

Thanks Rain!!

I'm a happy camper for now... though I do wish these libraries are included in the next update for a single executable!
t7n7
Newbie
 
Posts: 2
Joined: Thu Aug 23, 2012 7:23 pm

Postby Rain » Thu Aug 30, 2012 3:38 pm

You're very welcome.

I believe (But don't know for sure) the reason why the files are not automatically included is to keep the executable size as small as possible plus not every script uses the GetText functions. GetWordNT_x64.dll and GetWord_x64.exe combined are over 4 MB. I personally haven't used the GetText functions and would hate for my executable's sizes to increase by roughly 5 MB.

Maybe Marcus can include an option like a check box in the compiler to include those files? You can post the suggestion in the "Enhancement Suggestions" forum here http://www.mjtnet.com/usergroup/enhance ... ns-f8.html
Running Macro Scheduler 13.2.4 on Windows 7 Ultimate

Some of my Scripts I'm sharing with the world


Image
User avatar
Rain
Automation Wizard
 
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm

Postby Me_again » Thu Aug 30, 2012 5:39 pm

It's a third party library so the issue may be the license terms.
Me_again
Automation Wizard
 
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Postby JRL » Thu Aug 30, 2012 6:31 pm

You could also import them into your script then have the script export them to be used. I'd also make sure to delete them when I was finished with them. Its possible this violates some licensing terms but if it does, I haven't seen it.
JRL
Automation Wizard
 
Posts: 2760
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Postby Me_again » Thu Aug 30, 2012 8:11 pm

I couldn't find the getword license on their website.

If you just gotta have a single file distribution use an installer package, like inno, to combine everything.
Me_again
Automation Wizard
 
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Postby Marcus Tettmar » Fri Aug 31, 2012 8:14 am

While they are third party libraries the "issue" is technical. These are low level hooks that have to hook into every application and process running on your system. Otherwise they cannot do what they do. These hooks *HAVE* to live in external DLLs. It is simply impossible to make them work as part of the application. A lot of work has been done to shrink the number of files required to as small as possible.

Welcome to the world of software distribution. Barely any software exists that doesn't need multiple files to function. That's why we use installers, which package up all the files you require so that your user/customer can run one installer file which unpacks all the files and sets everything up for them. As suggested you could use the free Inno Setup installer, or use Macro Scheduler's own binary import/export functions. Or just use a good old zip file.
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
Marcus Tettmar
Site Admin
 
Posts: 5817
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK


Return to Technical / Scripting

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron