Author | Topic: Critical bug in XbpBitmap:LoadFile() | |
---|---|---|
![]() | Itai Ben-Artzi | Critical bug in XbpBitmap:LoadFile() on Thu, 13 Oct 2022 01:45:42 -0700 A file opened with XbpBitmap:LoadFile() remains open and cannot be deleted or accessed for the duration of the entire app. After a file is loaded, it is no longer needed and deletion shall be allowed. |
![]() | Thomas Braun | Re: Critical bug in XbpBitmap:LoadFile() on Thu, 27 Oct 2022 10:36:21 +0200 Itai Ben-Artzi wrote: > A file opened with XbpBitmap:LoadFile() remains open and cannot be > deleted or accessed for the duration of the entire app. After a file > is loaded, it is no longer needed and deletion shall be allowed. I just tried this using the following code and can not confirm this (neither on a local nor on a networked disk). This is my test code: According to your report, it should not be possible to delete the file at the first inkey(0) - but I could delete it and also process explorer showed that the file was closed. oPS := SetAppWindow():presSpace() oBitmap := XbpBitmap():New():create( oPS ) oBitmap:LoadFile("C:\Users\thomas.braun\Pictures\Borat.jpg") ? "Bitmap loaded..." ? oBitmap:xSize ? oBitmap:ySize inkey(0) oBitmap:Destroy() ? "Bitmap:Destroy()..." inkey(0) oBitmap := NIL ? "Bitmap set to NIL..." inkey(0) oPS := NIL So this might be caused by something else... probably you should try to use process explorer and/or process monitor to find out what keeps the file open. I could think of either windows explorer (which is an infamous cause for this kind of problems) or some antivirus program. Thomas |