mIRC Homepage
Hello,

I am not 100% sure that this is an mIRC bug, because i am using an Windows 10 yet and i had not the time to test it into an other machines, but as i saw is that if i enter an incorrect loop the mIRC will stuck as supposed and if i will press the Ctrl+Break it will get back normal, but here is something strange that if i enter an loop and i will count up to 10 and double or triple click into the mIRC and the mIRC will get into the Not Responding mode then if i will press the Ctrl+Break button the mIRC will ignore it and will not break out in result to force the mIRC to stuck, i had take an small video to try to explain this strange issue.

mIRC 7.41 beta3
Video: https://goo.gl/Ppe506

- Thanks!
That's not, strictly speaking, a mIRC bug. What's happened is that Windows itself has detected that mIRC has gone into a not-responding state, and when that happens with any application, the app doesn't respond to any keypresses. Depending on what caused the app to go into the not-responding state, sometimes waiting for the app to respond will work, and you can regain control; other times, you'll have to terminate the app.

It's possible, but not determinable from the video, that a bug in mIRC is what caused mIRC to go not-responding; more likely, your script probably looped fast enough to prevent the Windows message-passing mechanism from "getting a word in edgewise", and Windows detected that as "mIRC has stopped responding".

The Windows detection mechanism involved actually existed as far back as XP, but has become more sensitive to "race" conditions over time. I suspect that your test would be detected in Windows 8.1 and 8, very likely in 7, possibly in Vista, and likely NOT in XP.
I can't be for certain but I do not think this is a windows issue. After talking with west and a few others in IRC and then testing, the results are fairly similar up until west's win10 exanoke(I haven't testing on win10 yet):

Win XP, Win Vista, Win 7, Win 8, Win 8.1 break from the loop as expected, even if windows has put the program into 'not responding' mode:

Test code: //while ($true) noop

Tried starting loop and immediately pressing crlt+break AND starting loop, waiting 10s, clicking inside the mIRC window, waiting ~10s then ctrl+break'ing.

Neither fail to exit the loop from winxp through win8.1





I experience a similar issue (if not the same one) under windows 8.1 (mIRC 7.41). I don't know if it's a Win8.1/10 specific issue or not because I haven't checked this version of mIRC on my Win7 machine, but I did not experience the issue with previous versions of mIRC in Windows 7.


//while (1) /

Typing the above sends mIRC into a breakable loop (as expected).
Pressing ctrl+break immediately will break out of the loop (as expected).
However, if I wait until mIRC is shown as unresponsive then ctrl+break will NOT work. In previous versions of Windows and mIRC this was not the case for me.

I have found that mIRC will respond again to ctrl+break during this "(Not Responding)" state if any other window is made active. So clicking on the task bar, your web browser, the desktop, etc. will cause ctrl+break to work again as long as you don't click back to mIRC first.
Thanks for your bug report. I was able to reproduce this issue under Windows 10.

As far as I can tell, this is due to a change in how Windows 10 handles applications that it thinks are frozen. If an application looks frozen, Windows 10 blocks any direct input to it. However, if you switch to another application and type Control+Break, mIRC is able to see it as the Control+Break key combination is processed by mIRC regardless of which application it is typed into.

I have found a solution that makes Windows think that mIRC is not frozen during a script loop (by making mIRC peek window messages without removing them) and this prevents Windows from marking the application as "not responding" and/or blocking input. However, this method also prevents you from Alt+Tabbing to mIRC during the script loop. The reason is that Windows assumes that mIRC is not frozen and can therefore display its own GUI. When Windows thinks an application is frozen, it displays a copy of the GUI when you Alt+Tab to it.

That said, using this new method makes more sense as it correctly lets Windows know that mIRC is not actually frozen and is currently processing a script loop. This change will be in the next version.
© mIRC Discussion Forums