Results 1 to 9 of 9

Thread: SMART Window Crashing randomly

  1. #1
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default SMART Window Crashing randomly

    Hey Everyone,
    I had a cooking script running fine for awhile, but then wanted to make it use all reflection, I don't know where I went wrong, but now my client crashes at different points, and not sure if its related to my memory management or something else. If someone could take a look and see if they can reproduce the problem that would be awesome.

    Here is also the command prompt output
    Code:
    formWriteln: getting box
    formWriteln: moving mouse
    formWriteln: clicking
    formWriteln: Cooking all
    formWriteln: Waiting for allRaw shark to be cooked
    formWriteln: Checking for level up
    formWriteln: Waiting
    formWriteln: Checking for level up
    formWriteln: Waiting
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    SMART: Could Not Call
    [Reflection] RogueDenCooker.simba
    Last edited by Mj; 01-31-2016 at 07:15 PM.

  2. #2
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    I've had this happen before, seems to be caused when your client's socket dies. I don't know what causes that, though.

    (git)

    Had this happen once or twice, and then never again. At what frequency do you experience this issue? What is your system's uptime?
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  3. #3
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default

    It only started happening when I started doing MemoryManagement with Reflection, I try to Free every Object after I am done using it, but that is what has seemed to cause the issues, I rebooted my computer within the last day because I thought maybe that could help with whatever was going on. I Just removed all of my Free's from my script and so far its running fine (5 minutes), it normally closed within 10-15 seconds. I am pretty sure I have induced a memory leak though because the memory usage on the running java application keeps going up, slowly, but still going up. I might try to isolate which free is giving me issues. Is there a heavy debug setting I can use to see more output?

  4. #4
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by mudda_fudda View Post
    It only started happening when I started doing MemoryManagement with Reflection, I try to Free every Object after I am done using it, but that is what has seemed to cause the issues, I rebooted my computer within the last day because I thought maybe that could help with whatever was going on. I Just removed all of my Free's from my script and so far its running fine (5 minutes), it normally closed within 10-15 seconds. I am pretty sure I have induced a memory leak though because the memory usage on the running java application keeps going up, slowly, but still going up. I might try to isolate which free is giving me issues. Is there a heavy debug setting I can use to see more output?
    More than likely you are freeing a primitive type. You only need to deallocate pointers.

    The return type of any GetObject incuding the array ones is an integer representing the memory address. Free these. Do not free any others, they are not valid memory addresses and will cause SMART to crash.

  5. #5
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default

    Could you take a look at my script and let me know If what I am doing is correct? I don't believe I am freeing primitives, Only after I call a Find or get Method on a TReflect instance.

  6. #6
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Well - my scope of SMART's reflection functions is only from my own work, not any public reflection includes. I have no idea what a TReflect type is.

    But sure, post it and I will review.

  7. #7
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default

    Its An attachment at the bottom, or at least should be

  8. #8
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    Quote Originally Posted by mudda_fudda View Post
    Its An attachment at the bottom, or at least should be
    Easy way to debug is to add each one in again one at a time.

    Whenever script starts crashing, you know you found the problem.

  9. #9
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    You actually don't have to free anything other than widgets using the reflection include @mudda_fudda; Everything is handled internally to make it easier. Since you are attempting to free an already freed object, it will eventually crash smart..
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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