Quote from: Phoenix on 15 October 2018, 10:47:41Sorry for the late reply (I'm enjoying safe browsing with ExpressVPN and not registered on the site and I do not receive an email alert).
IMPORTANT NOTE
Even if you use Windows 64bit, if you compile for example with Lazarus 32bit you can not have this problem.
Unfortunately, the memory violation has unpredictable effects.
- You can try to change the two lines of suspicious code
If you use Lazarus (32 / 64bit):
uInt = NativeUInt
ptr2int = PtrUInt
If you use Delphi (depends on the version):
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.NativeUInt
in theory for 64bit if you use "Int64" it's ok
For ptr2int see my post
- RESTART the computer (in Windows 10, shut down the system should be similar to a hibernation) to "clean" the corrupted memory.
- Build the library (separately if you use it as a package) and the program
If you see differences with your problem you will have confirmation ;).
QuoteGet the latest source code from Mercurial repository. Latest release version is 0.26.4 released on 12th October 2009. Get the library package in 7z or ZIP format: Imaging.7z | Imaging.ZIP.
Quote from: JernejL on 17 May 2018, 10:15:04
Even if it was last updated in 2012, this library is so solid and productive it could well have no updates for years :)
Quote
#0 SYSTEM_$$_WAITFREE_VAR$PMEMCHUNK_VAR at :0
#1 SYSTEM_$$_SYSFREEMEM_VAR$PFREELISTS$PMEMCHUNK_VAR$$LONGWORD at :0
#2 ?? at :0
#3 FREEMEMNIL(<error reading variable: Attempt to dereference a generic pointer.>) at J:\\Top Down City\EDITORS\Imaging\Source\ImagingUtility.pas:325
#4 FREEIMAGE({WIDTH = 256, HEIGHT = 256, FORMAT = IFA8R8G8B8, SIZE = 262144, BITS = 0x13450070, PALETTE = 0x0}) at J:\\Top Down City\EDITORS\Imaging\Source\Imaging.pas:792
#5 ROTATE45({WIDTH = 256, HEIGHT = 256, FORMAT = IFA8R8G8B8, SIZE = 262144, BITS = 0x13450070, PALETTE = 0x0}, 22, 0x16af720) at J:\\Top Down City\EDITORS\Imaging\Source\Imaging.pas:1970
#6 ROTATEIMAGE({WIDTH = 256, HEIGHT = 256, FORMAT = IFA8R8G8B8, SIZE = 262144, BITS = 0x13450070, PALETTE = 0x0}, 22) at J:\\Top Down City\EDITORS\Imaging\Source\Imaging.pas:2104
#7 MAKEADOOR(292, 0x16afa44) at u_cared.pas:2195
#8 TWND_CAREDITOR__BTN_GENERATEDOORSCLICK(0x17f4c48, <error reading variable>) at u_cared.pas:2348
Quote
procedure Twnd_careditor.BitBtn2Click(Sender: TObject);
var
imgtest: TImageData;
begin
InitImage(imgtest);
NewImage(256, 256, IFA8R8G8B8, imgtest);
RotateImage(imgtest, 309);
FreeImage(imgtest);
end;
Quote
procedure Twnd_careditor.BitBtn2Click(Sender: TObject);
var
imgtest: TImageData;
i: Integer;
begin
for i:= 0 to 360 - 1 do begin
InitImage(imgtest);
NewImage(256, 256, IFA8R8G8B8, imgtest);
OutputDebugString(pchar(format('angle %d', [ i ])));
RotateImage(imgtest, round(i));
FreeImage(imgtest);
end;
end;
Page created in 0.015 seconds with 19 queries.