|
BorisU Beginner
Joined: 03 Jan 2009 Posts: 21
|
Posted: Tue Aug 25, 2009 9:58 pm
[3.10a] Log files are not closed properly |
I name logs using the current date. Here is the part of handles dump:
53C: File (R--) C:\Users\BorisU\Documents\My Games\CMUD\c7i.logs\merom-24-08-2009.log
5B8: Section \BaseNamedObjects\RotHintTable
5DC: File (R--) C:\Users\BorisU\Documents\My Games\CMUD\c7i.logs\merom-25-08-2009.log
5FC: File (R-D) C:\Windows\SysWOW64\en-US\duser.dll.mui
600: File (R-D) C:\Windows\SysWOW64\en-US\imageres.dll.mui
618: File (RW-) C:\Users\BorisU\Documents\My Games\CMUD\help\cmudhelp.db
61C: File (R--) C:\Users\BorisU\Documents\My Games\CMUD\c7i.logs\merom-26-08-2009.log
So the #LOG command does not close the previous log when I open the new one. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Aug 26, 2009 4:07 pm |
The #LOG command is calling the Delphi CloseFile routine, which is as much as I can do to close a file handle. I have no idea why the handle is still listed, but the file really is closed. You can try using the:
#LOG off
command to force it to close instead of toggling between logging enabled and disabled. |
|
|
|
BorisU Beginner
Joined: 03 Jan 2009 Posts: 21
|
Posted: Thu Aug 27, 2009 4:02 pm |
I made additional tests:
#LOG d:\aaaaa.txt
-> file aaaaa.txt is open
#LOG d:\bbbbb.txt
-> file aaaaa.txt is still open
-> file bbbbb.txt is open
#LOG off
#LOG d:\ccccc.txt
-> file aaaaa.txt is still open
-> file bbbbb.txt was succesfully closed
-> file ccccc.txt is open
I don't know if it is a bug in CMUD or in Delphi, but it is definitely a bug. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Aug 27, 2009 4:47 pm |
Oh, I see what you are saying. I didn't realize that you were opening a new log file without closing the previous file first. I'll take a look at that and add it to the bug list. For now, use the "#LOG off" to close the current log before opening a new log.
|
|
|
|
|
|