mIRC Homepage

/write broken?

Posted By: _CyRuSS_

/write broken? - 02/09/03 03:28 PM

Since i've upgraded to mIRC 6.1 i've been getting alot of /write errors that I was never getting before, from 3 different places in 2 scripts. The error doesn't always happen, sometimes it suceeds in writing, the other times I get this error...

* /write: unable to open file (line xx, scriptname.mrc)

/write -ds
/write -il1

are the ones triggering these errors, but other parameters, or no parameters may trigger it also for all I know, the error doesn't come up all the time, but I've got alot of them spewed in my Status Window, the file is writable and exists, and I've never had any problems before the upgrade.

mIRC 6.10,
Win XP Pro SP1
Posted By: LocutusofBorg

Re: /write broken? - 02/09/03 04:18 PM

Same OS, same code, no problem. I would almost think the file you are writing to is write protected, but I suppose you checked that?
Posted By: _CyRuSS_

Re: /write broken? - 02/09/03 04:50 PM

Yes i have, it was working fine in mirc 6.03 forever, then when i installed 6.1, everything was fine for about a day, then i noticed these errors, sometimes the /write is successful, sometimes it isn't and it gives that error, this is on 2 different scripts with 3 different files, and different parameters.

Also a friend of mine said he got the errors too

i could do a /write now and tell you it works fine, but if i keep doing it, after a while i will get the error, or something.
Posted By: WatchMinister

Re: /write broken? - 03/09/03 01:04 AM

Same thing here, but with hash table writing instead of /write.
Posted By: Doomstars

Re: /write broken? - 03/09/03 01:18 AM

It's a coincidence. I get the same type of errors I believe with mIRC 6.03. I think it has to do with how fast you're writing to a file. I could be wrong.
Posted By: _CyRuSS_

Re: /write broken? - 03/09/03 01:26 AM

What isn't working in the hash tables? is it the /hsave command that is giving you the same error?

Also, Another friend of mine has just told me he is now getting the same errors, he said it took a while, after the script had been running a while writing away etc.., then the errors came.

Weird that, thats how it happened for me too, worked fine for like a day, then the errors started coming. So thats 3 people now, excluding WatchMinister's hash table problem. So there must definatly be a bug in /write frown

Back to v6.03 I go.
Posted By: Adrenalin

Re: /write broken? - 03/09/03 11:38 AM

6.10 - must be a beta version ..
Posted By: Tat

Re: /write broken? - 03/09/03 10:55 PM

My guess is after switching a lot of the write stuff over to actually using streams like in C++, as mIRC is written in C++, he made some mistake that allows for the stream not to close correctly. The file is still open when something else tries to write in it, and because Windows protects the file from being accessed no further writes can be done. Which explains why when the error hits once it hits a lot of times. The file gets locked open.
Posted By: BlackDrag

Re: /write broken? - 05/09/03 03:53 AM

The same thing happened to me after leaving mIRC up for several hours (more than a day). I knwo others who have experienced thsi problem. Don't think it's coincidence.

Posted By: Khaled

Re: /write broken? - 08/09/03 01:06 PM

I would need to see a short, simple example script (of a few lines) that reproduces this problem for you.
Posted By: _CyRuSS_

Re: /write broken? - 08/09/03 03:33 PM

Well it doesn't have to be a script, even putting "//write -l1 somefile.txt this is a test" into the command line, it will write it first, create the file, but then I get the "* /write: unable to open file" error if I try again. (and the file isn't write protected).

"/write somefile.txt this is another test" works fine, but whenever I use parameters it gives the error.

But the best thing is, it doesn't happen when you first run mIRC, it works fine, let it run for a day or 2, writing away, then the errors start appearing. My mIRC is currently up 2 days 15 hours, and i am repeatidly getting the errors.

Maybe try letting a timer run for a cpl of days and then you will see the errors.

/timer 0 60 /write -il1 somefile.txt this is a test

Posted By: iwanpompier

Re: /write broken? - 10/09/03 05:19 PM

yeah i have this same bug i made this litle alias thing to test after how many times it stopes working
test {
  var %1 1
  while (1) {
    write -l2 test.txt bugtest
    .timertest 1 1 echo -a It Stoped Working After %1 Tries.
    inc %1

the result for me is everytime 32767 Tries
and its more then that the write -l stopes working but you wont be abel to save even script changes just try that and then change stuff in your script then close mirc and open it again and you will see it has not saved it.
Posted By: _CyRuSS_

Re: /write broken? - 10/09/03 05:44 PM

Yes same for me.

I changed the alias after I did it, restarted mIRC, you're right it does not show the changes... but if you open the script in notepad you will see the changes were saved, just mirc is choosing to not load them, and is still using the old script.... dunno how it's managed that since it got restarted.

<scratches head>

I'd say it is a filehandle problem maybe, mIRC not closing the file after it writes to it, so it just keeps creating new file handles until it chokes? I dunno confused
Posted By: iwanpompier

Re: /write broken? - 10/09/03 06:00 PM

yeah i see what happends when you open the script file after you have changed it when that error hapend it adds another section in the script file so when it happends it only uses the second section and when you restartd mirc it uses the first one and deletes the second one when you make changes in it

my remote.ini file is also messed up it has alot of teh same section in it with the same varibles in all of them
Posted By: _CyRuSS_

Re: /write broken? - 10/09/03 06:07 PM

Yep this has happened to me several times recently, now I know that the /write bug is the cause of thus other bug! crazy
© 2019 mIRC Discussion Forums