mIRC Home    About    Download    Register    News    Help

Topic Options
#253017 - 21/05/15 07:24 PM Ctrl+Break does not working under Not Respoding..
westor Online
Hoopy frood

Registered: 27/12/08
Posts: 1510
Loc: Greece
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!
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#253022 - 21/05/15 11:51 PM Re: Ctrl+Break does not working under Not Respoding.. [Re: westor]
FreeTrav Offline
Ameglian cow

Registered: 19/09/11
Posts: 32
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.


Edited by FreeTrav (21/05/15 11:54 PM)

Top
#253025 - 22/05/15 08:46 PM Re: Ctrl+Break does not working under Not Respoding.. [Re: FreeTrav]
FroggieDaFrog Online
Hoopy frood

Registered: 16/04/10
Posts: 905
Loc: USA
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







Edited by FroggieDaFrog (22/05/15 08:47 PM)
_________________________
I am SReject
My Stuff

Top
#253026 - 22/05/15 09:14 PM Re: Ctrl+Break does not working under Not Respoding.. [Re: FreeTrav]
Yawhatnever Offline
Pikka bird

Registered: 01/06/12
Posts: 14
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.

Top
#253038 - 23/05/15 02:17 PM Re: Ctrl+Break does not working under Not Respoding.. [Re: westor]
Khaled Offline


Planetary brain

Registered: 04/12/02
Posts: 4297
Loc: London, UK
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.

Top