SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    May 2001
    Location
    Houston, TX USA
    Posts
    40
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    *** Error: Stack Overflow

    I am using Silk Test 5.5 SP2 on Windows XP and I am getting ***Error: Stack Overflow when ever I run a script. The same script works fine on Windows 2K, Silk Test 5.5 SP2. Did any one saw this error and is there a workaround for this error.

    ------------------
    SG
    SG

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: Stack Overflow

    Suresh,

    WE have executed scripts on XP without any issues.

    ------------------
    Sree
    Sree

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    Caribou, ME, USA
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: Stack Overflow

    Hey Suresh! I'm getting stack overflows on XP as well. I have an .inc file with a single class as such...

    first.inc
    ---
    private STRING firstString

    winclass FirstClass
    property FirstString
    STRING Get()
    return firstString
    void Set(STRING value)
    firstString = value

    Then I have another .inc file such as...

    second.inc
    ---
    use "first.inc"

    window FirstClass fc

    winclass SecondClass

    MyMethod()
    fc.FirstString = "something"

    Finally, I have a .t file like this...

    script.t
    ---
    use "second.inc"

    window SecondClass sc

    testcase MyTC()
    sc.MyMethod()

    When I run the script, I get the stack overflow. I just started running into this and I'm not sure if it's XP-specific or not.

    -Greg
    Greg
    ATX II, LLC
    You wrote [i]what</I] in 4Test?!?

  4. #4
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: Stack Overflow

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by gmajor:
    ... When I run the script, I get the stack overflow.
    <HR></BLOCKQUOTE>

    You will get an overflow with your code because you're returning the property FirstString from itself - an infinite loop.

    Try this:

    John


    ------------------

  5. #5
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: Stack Overflow

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by gadagoju:
    I am using Silk Test 5.5 SP2 on Windows XP and I am getting ***Error: Stack Overflow when ever I run a script. The same script works fine on Windows 2K, Silk Test 5.5 SP2. Did any one saw this error and is there a workaround for this error.

    <HR></BLOCKQUOTE>
    To locate the cause of a stack overflow set a break point near code that is looping.
    You can determine the correct location by checking the results file. Put the break point on the line just before the loop begins then single-step in to see where the code calls itself.


    John


    ------------------

  6. #6
    Member
    Join Date
    Jan 2003
    Location
    Caribou, ME, USA
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: Stack Overflow

    John,

    Two questions...

    One, is 4Test case sensitive? This is probably something I should already know (I assumed that it was), but I'm wondering now if it really is. The field name in my example uses camelCasing and the property uses PascalCasing. If 4Test can't tell the difference then I can see your point.

    Two, if I declare the field in the class then it's not private (is it?). The only way I've found to make a field private is to declare it outside the scope of the class. What's the point in providing property support if the underlying fields are public?

    Your example certainly works without throwing the exception, but I'm curious if I'm forced to name my fields something completely different than my properties (not differentiating by casing).

    -Greg
    Greg
    ATX II, LLC
    You wrote [i]what</I] in 4Test?!?

  7. #7
    Member
    Join Date
    Jun 2001
    Location
    Bedford, MA, USA
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: Stack Overflow

    I find it helpful to use a consistent naming convention for properties and their associated variable. In my case I always name a property's variable the same as the property but with a leading underscore.

    code:
    ---------------------------------------------
    STRING _sInstanceName

    property sInstanceName
    STRING Get()
    if !IsSet(_sInstanceName)
    _sInstanceName = SettingsFile.GetValue("//automation_settings/config/instancename")
    return(_sInstanceName)

    Set(STRING sInput)
    _sInstanceName = sInput

    ---------------------------------------------

    - Jim

    ------------------

  8. #8
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: Stack Overflow

    QUESTION 1: The best reference to "case sensitivity" in the online help index. Briefly, the names used for variables and windows are case sensitive. Contrary to that source however, the names used for methods and functions are NOT case sensitive.

    I missed your lower-case variable definition that differentiated if from the property name when I keyed in your original example. ( Click on the "UBB code is" link on the left side of the reply screen to see more on how to retain original source code formatting when posting.)

    QUESTION 2: Correct. The private keyword can only only applied to global variables. I too would prefer to apply the private keyword directly to class variable definitions. An I agree that it doesn't make much sense to both require a separate property variable having public assess AND force its definition to be relocated outside the class to obtain a level of protected isolation.

    As to the last item, I don't think you'll have a problem here. For example, you can add a pushbutton instance labeled MyMethod and not incur a collision with the MyMethod() method.


    John


    ------------------

  9. #9
    Member
    Join Date
    Jan 2003
    Location
    Caribou, ME, USA
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: Stack Overflow

    Thanks for the reply, John. The help file is a bit, ummm... confusing, but we keep digging into it trying to find answers. Right now we're wrestling with several issues such as the Silk IDE crashing when we turn the Auto Complete feature on, learning the features (and limitations) of 4Test and mapping 3rd party controls. I'm confident we'll get everything worked out. Especially with the help of friendly folks such as yourself.

    -Greg

    PS: Thanks for the tip regarding formatting source. I will do more research before I post any more source code to the forums.
    Greg
    ATX II, LLC
    You wrote [i]what</I] in 4Test?!?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:00 PM.

Copyright BetaSoft Inc.