Windows TIG crash

The Windows TIG 1.02 keeps crashing on me. For a few days, a reboot of the SUT and restart of Eggplant would fix it for a few runs, but now I get the crash each time I run my script.

I’m running Eggplant 4.1 on OS X 10.5.2. The SUT is Windows XP SP2 (all up to date as of this morning including .NET 2.0 SP1) running in VMWare Fusion 1.1.1.

I’ve reinstalled the TIG, reinstalled Eggplant and tried with a fresh VM, but nothing has worked.

Any ideas on how to fix it?

What command(s) are you using to gen images when the TIG crashes?

Try turning the cache on to see if that helps. You can turn the cache on if you specify the following command in a terminal window on the Eggplant machine.

defaults write com.redstonesoftware.com TextCache Yes

Turning the cache on did not work.

I’m generating the images with imagefound.

It’s crashing on the last line of the following section of code (but it’s been through this section without error many times before crashing):


setoption SearchRectangle, leftHalfOfScreen
put (Text:itemName, TextStyle:"Default", Tolerance:40) into findText
put (Text:itemName, TextStyle:"Selected", TextBackgroundColor:(0,0,128), Tolerance:40) into findSelectedText
if itemInfo's (treeFont) is not empty
	put itemInfo's (treeFont) into findText's (TextFont)
	put itemInfo's (treeFont) into findSelectedText's (TextFont)
end if
put false into endOfList
put false into foundItemName
repeat until foundItemName
	try
		if imagefound (5, findText, findSelectedText)

I don’t know if this is related, but now I’m getting connection errors on every run. The exception text is

Runtime Error at line 12: Communication Error - Unable to Contact Server: test-xp2-gp.local:5899 (Operation timed out)

I’ve tried with two SUTs (one a real XP machine and the other a VM) and it happens at this line:


if imageFound (30, (Text:appName,TextStyle:"WindowTitle"))

Could both of these be caused by a network problem? Can I change eggplant’s networking timeout?

Although you can reset the timeout I think it’s likely that there is an inability to connect to the target SUT is what is really causing it. Since you have a VNC connection established we know the network is working. Please check the following: [list][]Check that the WindowsTIG is running (on port 5899)[]Check that your Windows firewall is configured to allow the TIG communication[*]Check that your Text font is set to generate against the “current sut” as opposed to a dedicated IP (and on the proper port)[/list:u]

Solved.

The problem was using the wrong plist file (com.redstonesoftware.com) to set TextCache. Using the following (and restarting everything) worked:

defaults write com.redstonesoftware.Eggplant TextCache Yes

I am seeing this still in 4.11, it just takes longer to crash.

Are you hitting the TIG in a VM ? Does it crash all the time or just some?

There is one known problem that involves hitting the Windows TIG very quickly with repeated requests (this could also occur if two Eggplant’s hit the same TIG at the same time).

Does it sound like that could be the problem?

It happens in either a VM or a real windows box.

I’m only using one eggplant instance at a time.

Does the TIG crash generating a particular string or more or less randomly as you run scripts?

When it crashes can you estimate how long since the last call to the TIG?