Run-time error
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Run-time error Expand / Collapse
Author
Message
Posted 9/14/2007 2:01:04 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/14/2007 4:26:49 PM
Posts: 2, Visits: 9
I'm in a tricky situation where I've just learned e-prime and have been asked to modify a fairly complex program that someone else has written. I've run into an error and I have no idea how to get past it.

Basically, there's a TextDisplay that jumps to a label called ClickedLure. I've had to modify this to an image display, but I've taken pains to make sure that all the option are identical to the text display, aside from the display input being a different file. When the program gets to the point where it's about to display that image I get an application-defined run-time error that puts to this in the script:
ClickedLure:
If Err.Number = ebInputAccepted Then
Err.Clear
Resume ClickedLureResume
ElseIf Err.Number <> 0 Then
'NOTE: If you receive a runtime error here, it
' is because a runtime error other than ebInputAccepted
' was thrown (ebInputAccepted for catching input masks that jump).
'You are encouraged to either handle the error so that
' it is not thrown in the future or will have to set up
' your own error handler, which will also need to take
' into account for any input masks that jump.
'
'Raise the error so the default error handler will show the message
Err.Raise Err.Number
End If

I know this is a really vague question, but if anyone has an idea as to what's happening or what I can do to fix it that would be a huge help.
Post #627
Posted 9/14/2007 2:35:06 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Awaiting Activation
Last Login: 8/22/2008 4:45:23 AM
Posts: 7, Visits: 1,154
Hi,

Just to find out which error caused this runtime error, you could try to remove the jump-to-label setting and label temporarily. The problem is that EPrime will insert an error handler to catch the jump action after a response. This handler 'masks' the default error handler, so the actual error message is never displayed. When you remove the ClickedLure label and jump setting temporarily you will probably receive the actual error message. Note that a common mistake is to set the ‘Correct’ property of the input mask to a value that is not part of the ‘Allowable’ property. This is difficult to do with static text values, but rather easy when these properties are dynamic [] attributes or when some inline script is being used to set these properties.

best
Paul




Paul Groot
VU University Amsterdam, FPP-ITM
Post #628
Posted 9/14/2007 2:59:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/14/2007 4:26:49 PM
Posts: 2, Visits: 9
Thanks Paul, you put me on the right track. It's fixed, although it a really slapped together way that I don't like. I'm still very confused. I took your advice the real error that popped up was that it was doing a c.GetAttribute for a variable name doesn't exist within the code. I'm confused because I can't find where in any of the properties it's trying to get that attribute and having checked the script for both my version and original, the variable name appears no where except in that one place that's giving me the error. It's not in the original code at all and I'm fairly sure I didn't type it anywhere in the modified version. Oh well. I added the attribute to the list to stop it from complaining. Problem...mostly solved. Again, thanks so much for the help.
Post #629
Posted 9/14/2007 5:07:50 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Awaiting Activation
Last Login: 8/22/2008 4:45:23 AM
Posts: 7, Visits: 1,154
In most cases it should be possible to ‘reverse engineer’ the context of the c.GetAttribute statement and locate the origin of this statement. For example, if the attribute was part of a text property, then you will find some code which looks like:

SomeObject.Text = … c.GetAttrib("Myattribute") …

In this case the attribute is used in the text property of ‘SomeObject’.

This technique can be helpful for example, if the text object is not visible anymore.

p.g.


Paul Groot
VU University Amsterdam, FPP-ITM
Post #630
Posted 9/17/2007 11:37:12 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: 1/5/2009 9:26:59 AM
Posts: 576, Visits: 1,254
As Paul mentioned, tracking down a "Attribute Not Found" error is basically finding the line number the error occurs in Full script, then viewing what object/property is attempting to use the attribute.  After that, pop open the GUI in E-Studio of the property in question and then edit it.  Attributes [attrib] will appear in blue in the GUI property pages.

FYI, As of E-Prime 1.2.1.815, E-Studio generates the description of the runtime error that is not related to jumping in the code for the label jump error handler.  This will provide a little better indication of the error.  The label would need to be temp removed to find the exact line number the error was invoked for easier debugging.

KB2612 - BUG: Use of Label object and Jump results in "application defined error" when a runtime error occurs that is not jumping related (note: this KB is in the process of QA and requires verbose comment of the error and debugging tips)

-Brandon

Post #632
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 6:21am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.187. 9 queries. Compression Disabled.