Results 1 to 10 of 10

Thread: Script causing OSBuddy crash

  1. #1
    Join Date
    Jun 2007
    Posts
    106
    Mentioned
    1 Post(s)
    Quoted
    33 Post(s)

    Default Script causing OSBuddy crash

    Hey guys I've been running HoodzFigher https://villavu.com/forum/showthread.php?t=99977 and run into an interesting problem I hope to understand. I'm posting here because it seems to be and aerolib/osbuddy interaction rather than script specific. Osbuddy crashes followed by script termination with debug information:

    Range check error at line 66
    and sometimes
    Error: Out of memory at line 66
    Execution failed.
    The following DTMs were not freed: [0]
    The following bitmaps were not freed: [0, 1, 2, 3]

    Line 66 is referring to AeroLib/core/engine/ColorEx.simba:

    Simba Code:
    55| function TColEx.findIn(Area: TBox; var Point: TPoint): Boolean;
    56| var
    57|   tmpCTS : Integer;
    58| begin
    59|   tmpCTS := getToleranceSpeed();
    60|   if ((Self.hMod <> 0.2) or (Self.sMod <> 0.2)) then
    61|   begin
    62|     setColorToleranceSpeed(2);
    63|     setToleranceSpeed2Modifiers(Self.hMod, Self.sMod);
    64|   end;
    65|  checkAreaBounds(Area);
    66|  Result := findColorTolerance(Point.x, Point.y, Self.Col, Area.X1, Area.Y1, Area.X2, Area.Y2, Self.Tol);
    67|  setColorToleranceSpeed(tmpCTS);
    68| end;

    This can be reproduced with some consistency by logging either in or out AFTER you start the script but before you finish the setup form. It does however happen occasionally while running. When the script errors out OS buddy closes and an error log is created(http://pastebin.com/0L6Gs4c4).

    The error log suggests enabling minidumps (Win7 64) which looks easy enough to do I'd just like to understand more what is happening before I go changing things. What exactly is the OSBuddy/script interaction that causes OSBuddy to crash, and why is it random to some extent? Is there an underlying issue to be examined? I have so far been unable to produce the crash in scripts outside of hoodz fighter.

    Thanks much for any information,
    anoobis
    Last edited by anoobis; 03-04-2015 at 08:02 AM.

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    whats an osbuddy?

    anywho someone(s) failed to map their memory, maybe it has to do with w/e an osbuddy is

  3. #3
    Join Date
    Jun 2007
    Posts
    106
    Mentioned
    1 Post(s)
    Quoted
    33 Post(s)

    Default

    OsBuddy is a 3rd party client for OSRS. Currently this specific script will only run on said client. I don't know much about memory mapping (is this the wrong place for a quick ELI:5?) but would that mean that the randomness of the error is due to the randomness of memory allocation when OSB is launched? Then, would the culprit function just be a result of no longer having an active client?

  4. #4
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    I heard it before.. No idea how to fix it.
    Maybe something with aerolib or my script, perhaps @Flight; knows it

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

    Default

    Ughhh AWT.

    What does just enclosing that part of the script in a try/catch do? OutOfMemory can be resolved by adding more memory to your JVM heap. -Xms= (for maximum heap) and Xmx= (for starting heap).

    However, after reading through your error, it really looks like you need to update your video card driver.

    ALSO, if you have 64-bit Java installed, uninstall it. Even if you also have 32-bit installed, it will always to default to 64, and I've seen a lot of errors like this resulting from 64-bit Java running.

  6. #6
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Yep I've had this happen but it's been a very, very long time. Reading over the post by the bank that makes sense to me and would explain why I've also not seen that error occur in quite some time. Also from reading posts about OSBuddy and the substantial amount of memory it uses I'd have to agree with that.

    Anywho, if you're able to reproduce it, first try replacing that function with this one:
    Simba Code:
    function TColEx.findIn(Area: TBox; var Point: TPoint): Boolean;
    var
      tmpCTS : Integer;
    begin
      tmpCTS := getToleranceSpeed();
      if ((Self.hMod <> 0.2) or (Self.sMod <> 0.2)) then
      begin
        setColorToleranceSpeed(2);
        setToleranceSpeed2Modifiers(Self.hMod, Self.sMod);
      end;
      checkAreaBounds(Area);
      try
        Result := findColorTolerance(Point.x, Point.y, Self.Col, Area.X1, Area.Y1, Area.X2, Area.Y2, Self.Tol);
      except
        writeln('Something went wrong in TColEx.findIn()');
      end;
      setColorToleranceSpeed(tmpCTS);
    end;
    In theory that should catch the error so, at least, your script won't crash but whatever function is looking for that TColEx will fail.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  7. #7
    Join Date
    Jun 2007
    Posts
    106
    Mentioned
    1 Post(s)
    Quoted
    33 Post(s)

    Default

    So it looks like the osbuddy crash is causing the login functions to fail and the ulatimate result of script termination.
    Code:
    Checking for script updates...
    You have the latest version of the script!
    HoodzFighter - Aero has been started
    Freeing form...
    [=================================]
    |        < Aero|Library >         |
    |        ----------------         |
    |         Version  : 1.1          |
    |          Revision : 3           |
    [=================================]
    [AL] Initiating AeroLib...
    [AL] Checking version...
    [AL] Currently up to date.
    [AL] Loaded 2 MSObjects.
    [AL] Loaded 3 GroundItems.
    [AL] Startup complete!
    MouseSpeed set at: 20
    Random hp generated at: 67%
    Random run energy generated at: 30%
    player setup...
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    [AL] Could not start up OSRS or RSReady was not detected!
    Successfully executed.
    What does just enclosing that part of the script in a try/catch do? OutOfMemory can be resolved by adding more memory to your JVM heap. -Xms= (for maximum heap) and Xmx= (for starting heap).

    However, after reading through your error, it really looks like you need to update your video card driver.

    ALSO, if you have 64-bit Java installed, uninstall it. Even if you also have 32-bit installed, it will always to default to 64, and I've seen a lot of errors like this resulting from 64-bit Java running.
    My drivers are up to date and I'm running java 32 bit. If it's relevant, OSB was using ~300mb ram and java ~50. I'll mess around with the memory allocation numbers in your commands and post the results. Thanks a ton for the help guys.
    Last edited by anoobis; 03-04-2015 at 04:45 PM.

  8. #8
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by anoobis View Post
    So it looks like the osbuddy crash is causing the login functions to fail and the ulatimate result of script termination.
    Code:
    Checking for script updates...
    You have the latest version of the script!
    HoodzFighter - Aero has been started
    Freeing form...
    [=================================]
    |        < Aero|Library >         |
    |        ----------------         |
    |         Version  : 1.1          |
    |          Revision : 3           |
    [=================================]
    [AL] Initiating AeroLib...
    [AL] Checking version...
    [AL] Currently up to date.
    [AL] Loaded 2 MSObjects.
    [AL] Loaded 3 GroundItems.
    [AL] Startup complete!
    MouseSpeed set at: 20
    Random hp generated at: 67%
    Random run energy generated at: 30%
    player setup...
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    Something went wrong in TColEx.findIn()
    [AL] Could not start up OSRS or RSReady was not detected!
    Successfully executed.


    My drivers are up to date and I'm running java 32 bit. OSB was using ~250mb ram and java ~50. I'll mess around with the memory allocation numbers in your commands and post the results. Thanks a ton for the help guys.
    Guessing you forgot to select the OSBuddy client.
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  9. #9
    Join Date
    Feb 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I have this exact problem, did anyone work out a fix?

  10. #10
    Join Date
    Jul 2015
    Posts
    80
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Anybody found a fix? After update Im getting these errors, cannot find some workaround, it logs ok and only happens on lobbyscreen, like Client dimensions change and it crashes.

    It was working before RS update just fine and I had this before too, like this update changed something going on on lobbyscreen.

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
  •