SPONSORS:






User Tag List

Results 1 to 10 of 10

Thread: Stack Overflow

  1. #1
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stack Overflow

    Hello,

    I get the error message "Stack overflow" after running my tests for a while. How can I trace down which variable is causing this error message. I make use of a lot of lists in my testscripts.

    Is there a limit on the size (number of elements) of a the lists in Silktest and what is the limit? If so what are the alternative? Arrays?

    regards,

    ------------------
    --
    Serge Eric Thiam.
    Silverter - A guru was once a beginner

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    I have only ever had a stack overflow when I accidentally introduced recursion into one of my functions.
    I regularly use lists of hundreds of entries, occasionally thousands.
    Hope this helps?

  3. #3
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    Thanks for your reply, that gives me a hint. In fact, my whole testscript is a recursion. But why would I get a "stack overflow"? I still can find out which variables are affected? Is the number of function calls limited in silk?

    ------------------
    Serge Eric Thiam.
    Silverter - A guru was once a beginner

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    Just an idea. I used to run recursion in WebLoad and it ran out of software memory bandwidth. In a recursion you keep adding function calls in your memory stack. When your terminal condition is true, the stack starts to shrink as each finished function returns.

    Right now your dish(stack) is pilling so hight that it doesn't fit in a room.

    1)Take out your recursive program
    and see if it works-Use a dummie value(s) if you have to. If you can't try your recursion part in a separate test script
    to see if it overflows the stack.

    2)Check your task manager or a memory checker to see how the memory is moving around.

    3)Don't use recursion if you don't need to.


    Can you tell us what kind of recursion are you using, and for what purpose.

    [This message has been edited by GodKnows (edited 03-27-2001).]

  5. #5
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    Thanks for that info.

    I'm using recursion to collect the children of a window at runtime and do a random pick on those children, select the appropriate function call, depending on the class of the child (randomly selected from the list), run the function on the child (like e.g if child=menuitem then function will be pick (), and I'll run menuitem.pick () ) then log the result in a file then restart all over in a loop.

    Why am I using recursion to collect all children? Because when I use the function GetChildren from Silk, it just gives me the visible children of the AUT. So what I do is check if the found visible children has other children, if so I collect them which child.getChildren and add them to the list so that I can randomize on all of them. (e.g the items of a TreeView ...)

    What are other possibility to get this done? That is collect all the children (visible and not visible ones, not just for Treeview, but for menuitems... etc) without using recursion?

    Plese correct me if I'm doing something wrong or if my explanation is not clear enough

    Thanks for your time

    ------------------
    Serge Eric Thiam.
    Silverter - A guru was once a beginner

  6. #6
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    Fix for you:

    Since you can only invoke visible controls, why don't you collect and append information only if you are within an un-explored area(or window).

    You can still do your checks to see which function to use.

    Does that make sense?

  7. #7
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    Thanks again foryour (quick) replies.

    The problem with your suggestion is I NEED all the controls (visible and non visible) in order to have an equal distribution of the randpick of the items.

    What I mean by non visible controls are controls vivible by human, but that appear to be non visible by Silk. For e.g in my Java App, there some PaneWins containing menuitems or toolbars that Silk recognises as children of the Panewin. When I call GetChildren on the mainwin, it brings me Panewin as a Child, but not the contains of PaneWin. Panewin itself is mapped to the class MDICLIENT, because it's just a container of other objects. Do you get my point? I hope so...

    thanks for your time..

    ------------------
    Serge Eric Thiam.
    Silverter - A guru was once a beginner

  8. #8
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    If your use of recursion is working the way you describe it, these errors are very surprising - your app must have many many controls in it to cause a stack overflow (a hierarchy thousands deep, something like that).
    The times I have got stack overflows have been when the recursion accidentally turned into a vicious circle, calling itself without any option to stop; the classic mistake. It is a good idea to check that this is not happening to you in this case - for example, it might be worth printing lots of messages to the results file every time your recursive function is called; this way you will be able to see if it is going wrong somewhere.

  9. #9
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    I think you might be spidering too deep down the path. You only need to spider one level at max. From what you are saying you are doing recursion to catch controls that is on current page but not detected by silk.

    Couple question for you:
    1)Does GetChildren() returns all controls to you?

    2)How do you get the undetected controls?

    If all fails in silk you need to spider all the controls using an external software and store the result in a txt file. Then read in from silk. Or ask your devs to put captions for all controls.

  10. #10
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Stack Overflow

    Thanks alot for all your replies.

    GodKnows:
    As I said in my previous post, GetChildren () does not return all controls. there are some (human) visible controls that are not returned by Silk, because they are in a kind of container, that I mapped to MDICLIENT, and I need to run GetChildren () on that container in order to get it's controls. These controls all have captions.

    thanks for your time.

    ------------------
    Serge Eric Thiam.
    Silverter - A guru was once a beginner

 

 

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 02:38 PM.

Copyright BetaSoft Inc.