|
Joined: Nov 2021
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2021
Posts: 33 |
ON *:EXIT:{ .save -rv $+(",$readini(mirc.ini,rfiles,n1),") }
Try the Command below and see. Open and Close mIRC and view the Editor or Variable File.
NOTE: I use this command because mIRC often does not save the variables file when closing the application.
Whenever he goes crazy he inserts the combinations below above.
[variables] Content-Type: text/html; charset= Content-Type: text/xml; charset=u n0= n1=u n2= n3=u
|
|
|
|
Joined: Jul 2006
Posts: 4,180
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,180 |
Note that you should be using the 'n' switch of $readini, otherwise you could be exploited here if section 'rfiles' item 'n1' contains something dangerous to evaluate.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 5,477
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,477 |
Thanks for your bug report. I have not been able to reproduce this issue here so far. Please type the following command into mIRC and post your results: //echo -a $os $version $beta $md5($mircexe,2) $file($mircexe).sig $alias(0) $script(0) $dll(0) $com(0) In order to help track down this issue, please also try the following: 1. Install a clean copy of mIRC in a new, empty folder, with no scripts or addons. 2. Run mIRC. 3. Create several variables, eg. using a simple script: //var %n = 1 | while (%n < 10) { set %v $+ %n %n | inc %n } 4.Add this code to a remote script: ON *:EXIT:{ .save -rv $+(",$readini(mirc.ini,rfiles,n1),") } 5. Exit mIRC. If you follow the above steps, with a clean install of mIRC, do you see the issue?
|
|
|
|
Joined: Nov 2021
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2021
Posts: 33 |
Executing the //echo command:
10 7.77 a0cd1346a897850388deed95e204da64 ok 1 16 0 0
I installed a clean version and the problem did not occur. What could be happening?
NOTE: Additional variables were created.
|
|
|
|
Joined: Jul 2006
Posts: 4,180
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,180 |
To find the issue you can try:
1) use your current mIRC install and -Unload all your scripts but a single script file containing the on exit event, can you reproduce? -If you can't, reload one script at a time until you can. If you end up reproducting after reloading one of your script, then that script would be causing it somehow. -If you can reproduce immediately without reloading any script, then other scripts file aren't causing it.
2) if you can reproduce immediately without reloading any script from 1) then you could try to reproduce on 7.76, 7.75, etc until you can't reproduce anymore, and then it should indicate that some bugs were introduced in the mIRC version after the one you can't reproduce on.
3) If you can reproduce on 7.76 7.75 etc and you're have tested 10+ older versions, it may indicate some mirc.ini corruption (possibly other mIRC INI files).
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Nov 2021
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2021
Posts: 33 |
The JSONTomIRC.mrc script contains the ON EXIT event. I disabled it and it stopped giving the error, but then I turned it on and it didn't give any more errors even when it was turned on. Of all my scripts, this was the only one that had the event.
Very strange...
Anyway, I started using the /saveini command.
|
|
|
|
Joined: Jul 2006
Posts: 4,180
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,180 |
Jsonformirc.mrc, the .mrc file which comes with the json4mirc addon does have an on exit event, the only thing that event does is call the following alias: alias JSONShutDown {
;; Insure the alias was called as a command
if ($isid) {
return
}
;; Close all json instances
JSONClose -w *
;; Close the JSON engine and shell coms
if ($com(SReject/JSONForMirc/JSONEngine)) {
.comclose $v1
}
if ($com(SReject/JSONForMirc/JSONShell)) {
.comclose $v1
}
;; Free the hashtable
if ($hget(SReject/JSONForMirc)) {
hfree $v1
}
} You said 'Whenever' in your original post, indicating that you have reproduced this many times, are you saying you can no longer reproduce the issue at all? If you can no longer reproduce, could it be that you must be using the json4mirc addon in some ways before you can reproduce?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Nov 2021
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2021
Posts: 33 |
I just disabled JSONTomIRC.mrc's ON EXIT and strangely it stopped giving an error and even turning on this same event it no longer gave an error. I didn't do tireless testing, but I tested. As I said before, I started using /saveini. I just know that it was very strange and it occurred on two different computers. I tested it on two.
|
|
|
|
Joined: Jul 2006
Posts: 4,180
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,180 |
Right. If there's an issue, using /saveini over /save isn't guaranteeing anything. From your description of things, there could be an issue with the on exit event in mIRC, possibly related to memory management or com object stuff.. But without a list of steps to reproduce, it can be difficult to track down There's something that might help figuring this out, it's your file output: [variables] Content-Type: text/html; charset= Content-Type: text/xml; charset=u n0= n1=u n2= n3=u I would imagine that /save -rv is emptying the file before writing an hardcoded "[variables]\r\n" string to it, and then using a loop, writes the "nX=<data>" part, which means after [variables], the next lines can only be starting with 'n', which is not the case in your output, which makes me thinks it's not mIRC but a custom script writing to the file.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Nov 2021
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2021
Posts: 33 |
There is definitely something and it is cumulative. Whenever I closed mIRC and opened the two lines were added. I think the best way might be to have some scripts with the ON EXIT event testing perhaps the same /save -rv command.
[variables] Content type: text/html; charset= Content-Type: text/xml; charset=u n0= n1=u n2= n3=u nX=... nY=....
|
|
|
|
Joined: Dec 2002
Posts: 5,477
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,477 |
The JSONTomIRC.mrc script contains the ON EXIT event. I tested several scripts, including JSONTomIRC.mrc, added several on EXIT events, and have not been able to reproduce any issues so far. We need to be able to reproduce your issue in order to determine what is causing it. My guess is that the issue is not related to JSONTomIRC.mrc or to the on EXIT event but is due to one of your other scripts which is corrupting memory in some way. This then goes on to affect other features. I notice that in previous posts, you have had issues with vars.ini, as well as memory issues with /sockread. Since we are seeing a "Content-Type: text/html; charset=", is it possible that one of your network-related scripts is causing the issue? You would need to install a clean copy of mIRC in an empty folder, with no scripts or addons and then add scripts one at a time, run mIRC, run one script, use /saveini, and check the vars.ini file. One of your scripts, when it is run, is causing the issue. Once you have narrowed down which script is causing the issue, you can then add debugging to the script, eg. make it stop at different points, use /saveini, and check vars.ini again. This should gradually enable you to narrow it down to a specific line/alias/identifier.
Last edited by Khaled; 15/08/24 07:14 PM.
|
|
|
|
Joined: Nov 2021
Posts: 33
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2021
Posts: 33 |
I made the error stop. The /save -rv command was called on an alias from time to time, in addition to the ON EXIT one. My bot has an RSS script that is running all the time calling your entire list in sequence, opening and closing in a loop. Today there are a total of more than 100 RSS.
I noticed that mIRC was getting lost at some point when /save -rv was called when RSS sockets were active. With them turned off, the problem no longer occurs. The question remains why there is no error in the variable editor?
I believe that because I use dynamic variables, such as: % [ $+ [ $+($sockname,.temp.mark) ] ]
This example is one of several other variables.
After I left the bot saving only in ON EXIT with the RSS Sockets turned off before exiting, the problem no longer occurred. When I posted the question here and tested it on different computers, there was another mIRC open alongside running the RSS sockets. And perhaps the memory is being shared in both and it gave the ON EXIT error.
NOTE: I don't have any routine that saves, checks or does anything in vars.ini. I just use /save -rv vars.ini
|
|
|
|
|