Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
BorisU
Beginner


Joined: 03 Jan 2009
Posts: 21

PostPosted: 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.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
BorisU
Beginner


Joined: 03 Jan 2009
Posts: 21

PostPosted: 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.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net