SRL Archive - OSR Help

Bitmaps not freed?


Rare Scripts

2015-05-14 09:51:23

Hello, im sure i've freed ALL bitmaps.
Somethimes it run 30 hours flawless and somethimes it throw the error within a few hours.
Is there any way to check if i have all bitmaps freed??

PS Im not new to Bitmaps, this is just very very strange….

Thanks - Baws.


Error:

The following bitmaps were not freed: [0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112, 113, 115, 116, 117, 118, 119, 121, 122, 123, 124]

cosmasjdz

2015-05-14 10:43:15

From: BawsScripts
Hello, im sure i've freed ALL bitmaps.
Somethimes it run 30 hours flawless and somethimes it throw the error within a few hours.
Is there any way to check if i have all bitmaps freed??

PS Im not new to Bitmaps, this is just very very strange….

Thanks - Baws.


Error:

The following bitmaps were not freed: [0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112, 113, 115, 116, 117, 118, 119, 121, 122, 123, 124]


Doesnt seem like much during hours run. How many bitmaps do you use? If only 1 or few you can load it once. No need to load everytime. If using more then you should check scrip logic to find the flaw which prevents you from freeing bitmaps.

I used to get something similar when using non-quaranteed sequence mainloop flow as free function was inside other one which had like 98% to get called. Maybe you have something similar or you have some label jumps? Sometimes especially if labels are used outside of function for example to jump from one to another function weird things happens. Seems like script makes after jump instance of itself and runs that instance and if it is loop it tends to not get back to same instance it used to be and if it jumps again it gets to instance of the instance. Had some WTF moments and script/memory crashes cause of that at early drag scripts.

Rare Scripts

2015-05-14 10:44:30

From: cosmasjdz
Doesnt seem like much during hours run. How many bitmaps do you use? If only 1 or few you can load it once. No need to load everytime. If using more then you should check scrip logic to find the flaw which prevents you from freeing bitmaps.


I'm using more then a few. I call em on startup and free on finish. As i said i NEVER had this problem.

Edit: I use more bitmaps on other scripts and they work fine….

Edit1: if there was just a way to run script and see if i forgot a bitmap or so….. Shoulnd be possible cuz i checked 10 times.

Hoodz

2015-05-14 10:51:24

why do you even use bitmaps in the first place?

masterBB

2015-05-14 10:51:52

Add this function:


function LoadBitmapWithName(w, h: integer; data, name: String): integer;
begin
Result := BitmapFromString(w, h, data);
SetBitmapName(Result, name);
end;

And replace all bitmap load calls with this one.

e: but the error is not related to bitmaps by the way ;) We need the output before that.

Rare Scripts

2015-05-14 10:54:02

From: hoodz
why do you even use bitmaps in the first place?


Fast interaction + prefer above reflection searching.

Rare Scripts

2015-05-14 10:55:02

From: masterBB
Add this function:


function LoadBitmapWithName(w, h: integer; data, name: String): integer;
begin
Result := BitmapFromString(w, h, data);
SetBitmapName(Result, name);
end;

And replace all bitmap load calls with this one.

e: but the error is not related to bitmaps by the way ;) We need the output before that.


How do i even use this? Lol.

Edit: If its not the bitmaps then what can it be?… I have no clue.. really mind = fucked.

masterBB

2015-05-14 10:57:59

From: BawsScripts
How do i even use this? Lol.

Edit: If its not the bitmaps then what can it be?… I have no clue.. really mind = fucked.


Paste the output before the last line.

use the code like this:

ironOreBmp := LoadBitmapWithName(20, 20, "oibwfioufhLONGBITMAPCODEubkaefwbfbk", "iron ore");

Rare Scripts

2015-05-14 11:01:58

From: masterBB
Paste the output before the last line.

use the code like this:

ironOreBmp := LoadBitmapWithName(20, 20, "oibwfioufhLONGBITMAPCODEubkaefwbfbk", "iron ore");


So what does this change?… I really dont get it anymore….
I change that with the loading bitmaps?? How do i free them? What happends if i use that code? I have no clue. mind = fucked.


Edit parts:


procedure LoadBMPS;
begin

SILVER_ORE_INV := BitmapFromString(72, 7, 'meJyVlFEKAjEMRHsmUQRxkZVF/PD' +
'H+x9Ggw+HYbKKlrAkbZrMJOleT9NyPFxPE3I7zyUyOapv97lfFgTz' +
'd1HAknm/O243kjJLdBp5V3cCpPsoxeO1BL50B+ABkXL4l1EAgMiPv' +
'DoXcApJXETqqGKOMaAGrzJXU4ATh96yVb6BLahJvpDyOnscISGRN0' +
'ukMEshjpReIjl0Cn3fS92pfRJl8XSdF/jJGGPJvlfMYZcOQTBHIu+' +
'O+6iPmH3yyeun7qaxKQEGnkoUFwWs84paiZeioYzX8kTRHS76XY13' +
'f57jvQKG9CijwlJtHy0vcgTR/8HHSe9IO/QCXn0UfTOC+C9RNXemq' +
'oDzincRM9l9KsUTyRQG7A==');

end;


procedure FreeBMPS;
begin
FreeBitmap(SILVER_ORE_INV);

end;

masterBB

2015-05-14 11:11:38

From: BawsScripts
So what does this change?… I really dont get it anymore….
I change that with the loading bitmaps?? How do i free them? What happends if i use that code? I have no clue. mind = fucked.


Edit parts:


procedure LoadBMPS;
begin

SILVER_ORE_INV := LoadBitmapWithName(72, 7, 'meJyVlFEKAjEMRHsmUQRxkZVF/PD' +
'H+x9Ggw+HYbKKlrAkbZrMJOleT9NyPFxPE3I7zyUyOapv97lf FgTz' +
'd1HAknm/O243kjJLdBp5V3cCpPsoxeO1BL50B+ABkXL4l1EAgMiPv' +
'DoXcApJXETqqGKOMaAGrzJXU4ATh96yVb6BLahJvpDyOnscIS GRN0' +
'ukMEshjpReIjl0Cn3fS92pfRJl8XSdF/jJGGPJvlfMYZcOQTBHIu+' +
'O+6iPmH3yyeun7qaxKQEGnkoUFwWs84paiZeioYzX8kTRHS76 XY13' +
'f57jvQKG9CijwlJtHy0vcgTR/8HHSe9IO/QCXn0UfTOC+C9RNXemq' +
'oDzincRM9l9KsUTyRQG7A==', 'silver ore');

end;

That is all. It changes nothing. But in the event of unfreed bitmaps it will give you the name of the bitmap instead of the number so you can see if it is your bitmap or from srl. Also it gives information if it is the same bitmap a hunderd times or not.

I need the output before the bitmaps not freed to help you with your error.

Rare Scripts

2015-05-14 11:13:28

From: masterBB
procedure LoadBMPS;
begin

SILVER_ORE_INV := LoadBitmapWithName(72, 7, 'meJyVlFEKAjEMRHsmUQRxkZVF/PD' +
'H+x9Ggw+HYbKKlrAkbZrMJOleT9NyPFxPE3I7zyUyOapv97lf FgTz' +
'd1HAknm/O243kjJLdBp5V3cCpPsoxeO1BL50B+ABkXL4l1EAgMiPv' +
'DoXcApJXETqqGKOMaAGrzJXU4ATh96yVb6BLahJvpDyOnscIS GRN0' +
'ukMEshjpReIjl0Cn3fS92pfRJl8XSdF/jJGGPJvlfMYZcOQTBHIu+' +
'O+6iPmH3yyeun7qaxKQEGnkoUFwWs84paiZeioYzX8kTRHS76 XY13' +
'f57jvQKG9CijwlJtHy0vcgTR/8HHSe9IO/QCXn0UfTOC+C9RNXemq' +
'oDzincRM9l9KsUTyRQG7A==', 'silver ore');

end;

That is all. It changes nothing. But in the event of unfreed bitmaps it will give you the name of the bitmap instead of the number so you can see if it is your bitmap or from srl. Also it gives information if it is the same bitmap a hunderd times or not.

I need the output before the bitmaps not freed to help you with your error.


Thanks will test this out asap i get home ^^, but since its one time running 30 hours and other 2h im not sure of its really bitmaps… I think so… U know any way to find out??

Edit: how do u mean 'i need the output before the bitmaps not freed '?

slacky

2015-05-14 11:29:02

From: BawsScripts
Thanks will test this out asap i get home ^^, but since its one time running 30 hours and other 2h im not sure of its really bitmaps… I think so… U know any way to find out??

Edit: how do u mean 'i need the output before the bitmaps not freed '?

He means the actual error message, and whatever more there is in the debug.

The message "The following bitmaps were not freed: .." is not an error, Simba is just notifying you, this will happen every time the script crashes (as the bitmaps wont be freed when the script crashes…)

Rare Scripts

2015-05-14 11:32:36

From: slacky
He means the actual error message, and whatever more there is in the debug.

The message "The following bitmaps were not freed …" is not an error, it's just notifying you, this will happen every time the script crashes (as the bitmaps wont be freed since the script crashed…)


There is nothing more in the debug, it just randomly crashes.

Edit: just added the LoadBitmapWithName. ill run and get back with the error it throws me :) Many thanks for that function

slacky

2015-05-14 11:37:43

From: BawsScripts
There is nothing more in the debug, it just randomly crashes.

So there is no: "Error: Access violation .." (or any other error message), and a following "Execution failed."?? which means it says "Successfully executed." ?

The last one (Successfully executed) is NOT a crash..
The first one (Execution failed) implies a crash, and if theres a crash there is ALWAYS some error message.

Rare Scripts

2015-05-14 11:40:02

From: slacky
So there is no: "Error: Access violation .." (or any other error message), and a following "Execution failed."?? which means it says "Successfully executed." ?


nope :S

slacky

2015-05-14 11:41:27

From: BawsScripts
nope :S

Lies. When a script end there is ALWAYS a termination message (Execution failed, or Successfully executed).. That is unless Simba crashed.

Rare Scripts

2015-05-14 11:46:39

From: slacky
Lies. When a script end there is ALWAYS a termination message (Execution failed, or Successfully executed).. That is unless Simba crashed.


Why would i lie about it? :) No reason to do since im asking help.

slacky

2015-05-14 11:53:43

From: BawsScripts
Why would i lie about it? :) No reason to do since im asking help.

Aha, my bad.. PascalScript + SRL-OSR.. I thought no one used that crap anymore.

Rare Scripts

2015-05-14 11:54:10

From: slacky
Aha, my bad.. PascalScript + SRL-OSR.. I thought no one used that crap anymore.


I do haha :P

Edit: IT DOES! a miracle happend here… First time it prints more.

Succesfully freed SMART[3944]
Successfully executed.
The following bitmaps were not freed: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129]

Edit: I can restart the script right after it without touching the client, and everything runs again…. Idk why it errors out, i really dont get it lmao…

Turpinator

2015-05-14 12:15:16

The best way to solve your issue would just to post the script so we can check where you dont free a bitmap properly, rather than us tell you what is possibly wrong.

Rare Scripts

2015-05-14 12:21:26

From: Turpinator
The best way to solve your issue would just to post the script so we can check where you dont free a bitmap properly, rather than us tell you what is possibly wrong.


Can i send it to u in a private message? Its kinda private, i use it myself :P

Turpinator

2015-05-14 12:30:19

if you really must.

Rare Scripts

2015-05-14 12:34:42

From: Turpinator
if you really must.


PMd u :) <3

Turpinator

2015-05-14 12:54:15

1) you load bitmaps multiple times
2) you dont free all your bitmaps.

Rare Scripts

2015-05-14 13:32:34

From: Turpinator
1) you load bitmaps multiple times
2) you dont free all your bitmaps.


Can u tell me what ones??? i cant seem to find em..

Edit: ahhhh i see it double load on start…. THX!

Edit1: can u tell me which i forgot to free? :)

Citrus

2015-05-14 13:50:50

I have this issue too, but I don't use bitmaps and never have. My script doesn't crash, but when I manually stop it I get hundreds of unfreed bitmaps.

Ian

2015-05-14 14:19:08

From: evilcitrus
I have this issue too, but I don't use bitmaps and never have. My script doesn't crash, but when I manually stop it I get hundreds of unfreed bitmaps.


I think it's something with tesseract.

Citrus

2015-05-14 14:41:32

From: BMWxi
I think it's something with tesseract.


Ahh that makes sense.. My scripts still run, so I'm not too worried about it.

Turpinator

2015-05-14 15:47:24

From: BawsScripts
Can u tell me what ones??? i cant seem to find em..

Edit: ahhhh i see it double load on start…. THX!

Edit1: can u tell me which i forgot to free? :)


Not unless i get a cut of your profits from selling this script.

Rare Scripts

2015-05-14 17:13:23

From: Turpinator
Not unless i get a cut of your profits from selling this script.


I lolled.

Hoodz

2015-05-14 17:32:28

From: BawsScripts
I lolled.


i think hes not joking.

Rare Scripts

2015-05-14 17:37:33

From: hoodz
i think hes not joking.


Still think its funny.

Turpinator

2015-05-15 00:57:38

From: BawsScripts
Still think its funny.


How about this.

I _BawsScripts/RareScripter__, promise to donate 25% of any past, present, or future sales of "RareAddyMiner" and its derivatives to SRL/Villavu Forums in lieu of payment to Turpinator (as well as every other member of the SRL/Villavu community) for his/their assistance in learning to script, creating of scripts, and troubleshooting of scripts that may or may not be derivatives of any past, present, or future work here at SRL/Villavu Forums.

Signed,


(Insert Signature here)
BawsScripts


And then ill help you.

Rare Scripts

2015-05-16 22:59:10

From: Turpinator
How about this.

I _BawsScripts/RareScripter__, promise to donate 25% of any past, present, or future sales of "RareAddyMiner" and its derivatives to SRL/Villavu Forums in lieu of payment to Turpinator (as well as every other member of the SRL/Villavu community) for his/their assistance in learning to script, creating of scripts, and troubleshooting of scripts that may or may not be derivatives of any past, present, or future work here at SRL/Villavu Forums.

Signed,


(Insert Signature here)
BawsScripts


And then ill help you.


Areally fixed. Kinda sad to ask that for a 2 line bug. I would not be the worse. I would pay u a 10 bucks or so for it. But how and what you ask is kinda funny.

Edit: "Learn to script"? Sir my scripts work well. The only thing is i misstyped some things (was working on 2 files) and forgot a part.

Anyways its fixed for now, thx for ur reply anyways i guess :)

Harrier

2015-05-17 02:12:57

From: BawsScripts
Areally fixed. Kinda sad to ask that for a 2 line bug. I would not be the worse. I would pay u a 10 bucks or so for it. But how and what you ask is kinda funny.

Edit: "Learn to script"? Sir my scripts work well. The only thing is i misstyped some things (was working on 2 files) and forgot a part.

Anyways its fixed for now, thx for ur reply anyways i guess :)

Think it's more the fact that you're trying to get free help and then selling it on which is a really dick move.