Page 1 of 2 12 LastLast
Results 1 to 25 of 35

Thread: Bitmaps not freed?

  1. #1
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default Bitmaps not freed?

    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]

  2. #2
    Join Date
    Jun 2014
    Location
    Lithuania
    Posts
    475
    Mentioned
    27 Post(s)
    Quoted
    200 Post(s)

    Default

    Quote Originally Posted by BawsScripts View Post
    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.

  3. #3
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by cosmasjdz View Post
    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.

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

    Default

    why do you even use bitmaps in the first place?

  5. #5
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Add this function:

    Simba Code:
    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.
    Working on: Tithe Farmer

  6. #6
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    why do you even use bitmaps in the first place?
    Fast interaction + prefer above reflection searching.

  7. #7
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    Add this function:

    Simba Code:
    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.

  8. #8
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by BawsScripts View Post
    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");
    Working on: Tithe Farmer

  9. #9
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    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+HYbKKlrAkbZrMJOleT9NyPFxPE3I7zyUyOapv97lf FgTz' +
    'd1HAknm/O243kjJLdBp5V3cCpPsoxeO1BL50B+ABkXL4l1EAgMiPv' +
    'DoXcApJXETqqGKOMaAGrzJXU4ATh96yVb6BLahJvpDyOnscIS GRN0' +
    'ukMEshjpReIjl0Cn3fS92pfRJl8XSdF/jJGGPJvlfMYZcOQTBHIu+' +
    'O+6iPmH3yyeun7qaxKQEGnkoUFwWs84paiZeioYzX8kTRHS76 XY13' +
    'f57jvQKG9CijwlJtHy0vcgTR/8HHSe9IO/QCXn0UfTOC+C9RNXemq' +
    'oDzincRM9l9KsUTyRQG7A==');

    end;
    procedure FreeBMPS;
    begin
    FreeBitmap(SILVER_ORE_INV);

    end;

  10. #10
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by BawsScripts View Post
    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:
    Simba Code:
    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.
    Working on: Tithe Farmer

  11. #11
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    Simba Code:
    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 '?

  12. #12
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by BawsScripts View Post
    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...)
    Last edited by slacky; 05-14-2015 at 03:33 PM.
    !No priv. messages please

  13. #13
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    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

  14. #14
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by BawsScripts View Post
    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.
    Last edited by slacky; 05-14-2015 at 03:40 PM.
    !No priv. messages please

  15. #15
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    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

  16. #16
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by BawsScripts View Post
    nope :S
    Lies. When a script end there is ALWAYS a termination message (Execution failed, or Successfully executed).. That is unless Simba crashed.
    !No priv. messages please

  17. #17
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    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.

  18. #18
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by BawsScripts View Post
    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.
    !No priv. messages please

  19. #19
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    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...

  20. #20
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    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.

  21. #21
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    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

  22. #22
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

  23. #23
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    if you really must.
    PMd u <3

  24. #24
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

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

  25. #25
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    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?

Page 1 of 2 12 LastLast

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
  •