SRL Archive - OSR Help

Script causing OSBuddy crash


anoobis

2015-03-04 02:49:47

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:


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

Le Jingle

2015-03-04 03:09:19

whats an osbuddy?

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

anoobis

2015-03-04 03:16:35

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?

Hoodz

2015-03-04 05:37:56

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

the bank

2015-03-04 09:05:13

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.

Flight

2015-03-04 09:41:31

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:

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.

anoobis

2015-03-04 11:41:50

So it looks like the osbuddy crash is causing the login functions to fail and the ulatimate result of script termination.

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.

Harrier

2015-03-04 11:44:55

From: anoobis
So it looks like the osbuddy crash is causing the login functions to fail and the ulatimate result of script termination.

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.

tock

2015-03-20 08:26:04

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