shadowrecon Posted February 20, 2012 Share Posted February 20, 2012 I was getting an error when using the SmartDebugText in a script and keep getting the cannot locate the DIB so i went back to the DebugSMART file and traced it back to the SmartDebugBitmap function and found in that function your not freeing BM2. [scar]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= procedure SmartDebugBitmap(BMP, X, Y: Integer); Contributors: Wanted, Timer. Description: Draws a bitmap on the smart debug canvas. Date Created: January 22nd, 2012. By Wanted. RS2 Build 699. Last Modified: January 22nd, 2012. By Wanted. RS2 Build 699. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} procedure SmartDebugBitmap(BMP, X, Y: Integer); var Canvas, SCanvas: TCanvas; BMP2, W, H: Integer; begin BMP2 := BitmapFromString(RSPW, RSPH, ''); // <--- this is never being free'ed SCanvas := GetBitmapCanvas(BMP2); SCanvas.Handle := SmartGetDebugDC; Canvas := GetBitmapCanvas(BMP); GetBitmapSize(BMP, W, H); SafeCopyCanvas(Canvas, SCanvas, 0, 0, W, H, X, Y, X + W, Y + H); end; [/scar] Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 20, 2012 Share Posted February 20, 2012 Good find, it will be in the large commit tonight along with many other things. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 20, 2012 Author Share Posted February 20, 2012 Good find, it will be in the large commit tonight along with many other things. Yeah, i keep scratching my head with the error. =p Thanks! Quote Link to comment Share on other sites More sharing options...