mIRC Homepage
Posted By: Wagoo 7.1 log bug - last line not written to disk - 11/10/10 02:24 PM
I'm seeing a bug where the last line in the buffer of a channel or query window is not being flushed to disk. Instead the previous line is the last line in the log file.

I'm using:
Automatically log: both
Reload logs: both
Lock log files
Include network
Timestamp logs: [HH:nn]

Seeing on both my normal install, and a vanilla 7.1 install.
Posted By: 5618 Re: 7.1 log bug - last line not written to disk - 11/10/10 02:38 PM
First question: does this still happen on the mIRC v7.12 beta?
Just tested, I get the same behaviour with a vanilla install of 7.12beta with the default settings.
I have noticed something similar to this actually. I especially notice this in query windows which reload logs. I have to close and re-open a query window several times (3 or so) before I finally see the actual last line being reloaded. If I then repeat the close/re-open process the log keeps reloading perfectly as it should. So apparently it is being written to disk for me but not reloaded properly... I just tried to reproduce this with a few open query windows I had but of course everything works perfect now. :P
Maybe this is related somehow...
Thanks for the bug report, unfortunately I have not been able to reproduce this issue here so far. How are you checking whether all of the lines have been written to the file? I tested using the following steps:

1. Place mirc.exe from v7.12 in an empty folder.
2. Place an empty mirc.ini in the same folder.
3. Run the mirc.exe file.
4. Fill in my nicknames.
5. Connect to a server using /server irc.efnet.org
6. Open a query window using //query $me
7. Send several messages in that window.

After each sent message, I open the log file with a text editor, and all of the lines are there.
Were you using the latest public beta version v7.12 when you saw this issue?
Hmm, I haven't noticed that. If I close a query window the last line is then written to the log along with the "Session Close:" line.

However if mIRC was killed or the OS crashed etc these last lines would never get a chance to write..
Khaled: I first noticed the issue on 7.1, was able to replicate it on 7.12beta (just downloaded today) in an empty install folder (portable install if it makes a difference, OS is XP).

I just did the same test as you (on EFnet, was using DALnet before):

Code:
Session Start: Mon Oct 11 17:51:32 2010
Session Ident: testotron
01[17:51] <testotron> this is the first line
[17:51] <testotron> this is the first line
01[17:51] <testotron> this is the last line


And in a channel:

Code:
Session Start: Mon Oct 11 17:52:48 2010
Session Ident: #randomchan
03[17:52] * Now talking in #randomchan
03[17:52] * irc.he.net sets mode: +nt


Where as there is "<@testotron> this is the last line.." as the last line in the chan window.

I'm using "tail" in this case, however also checked just opening the logs with notepad.exe with the same result.
I'm seeing the same behaviour on a new install of 7.12beta on a separate machine (Vista x64) also.

Didn't install as portable this time, however mIRC wasn't installed on this machine previously so blank config anyway.
Thanks, I was able to reproduce the issue. The text is being saved correctly however it may not have been written immediately since mIRC was using file buffering which left it up to Windows to flush the text to the file (for better performance). Previous versions of mIRC may or may not have used buffering depending on the feature. I will see if I can disable buffering for the next version.
Cheers, that makes sense. smile
© mIRC Discussion Forums