SRL Archive - S.M.A.R.T. Bugs and Improvements.

Smart Issue


king vash

2008-02-29 21:31:02

[Runtime Error] : Exception: Can't create compatible DC in line 135 in script CrafterMaster.98e

line 135 is a arealoading procedure (the result line)

function AreaLoading:boolean;
var loadingscreen:integer;
begin
loadingscreen := BitmapFromString(47, 4, 'beNr7/x8IGJAAGpds' +
'ADeHJAOJccx/GCAoiF8cLotLPUHHIItg9S9+BcgMPLK43EmMY5B9h' +
'N+FRMqC2AA/tJVr');
Result:= FindBitmapin(loadingscreen, x, y, 6, 14, 53, 18);
end;

I also have a question about freeing resources. if it's called in a procedure \ function won't it be automatically freed at the end of that procedure?

HyperSecret

2008-02-29 22:31:46

no it doesnt automatically free at the end of the procedure/function make sure you free your bitmap

Smartzkid

2008-02-29 22:45:05

You have to manually free all bitmaps, dtms, forms. SCAR will destroy your variable, but windows keeps the object. Not sure about your error, never gotten it before; will test it out tomorrow if I get a chance.

king vash

2008-03-01 01:51:47

Another Question, I return a DDTM from a procedure setupddtm. can i free that somehow, do i not need to? I call that setupddtm inside of a DTMRotated often can I free that, or do I even have to?

n3ss3s

2008-03-01 03:53:38

SRL Member and cannot use the search button, eh? :rolleyes:

http://www.villavu.com/forum/showthread.php?t=16278?t=17869&highlight=Exception+compatible


Let me guess, your function is being used in a loop, the bitmap gets never freed and memory gets stuffed = crashkind o' thing.

king vash

2008-03-01 22:06:38

no this is the first time this has happened for me ever. but in lame it always seems to fail at 12 hours