mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2004
Posts: 1
F
Free Offline OP
Mostly harmless
OP Offline
Mostly harmless
F
Joined: Nov 2004
Posts: 1
While adding a temporary icon to a Dialog, before later replacing it with a changed icon, the following Alias was used:

Code:
ALIAS smallBMP {
  ; Creates 1 small bmp icon for pre-loading into the Dialog - so that the icon can be changed later 
  if ($window(@small.bmp.icon)) { window -c @small.bmp.icon }
  window -pfh @small.bmp.icon 0 0 1 1
  drawrect -f @small.bmp.icon $color(background) 1 0 0 1 1
  var %c = $+(",$scriptdir,small.bmp,")
  drawsave @small.bmp.icon %c
  window -c @small.bmp.icon
}


After it was added, and the Dialog opened, it was found that mIRC versions 6.35 and earlier would randomly crash.
Oddly, the easiest way to crash mIRC was to run this alias, and then open one of the help files by typing /help
or by opening ircintro.chm

Both the help file, mirc.chm or ircintro.chm, and mIRC.exe would crash and close.
Very odd behaviour indeed.

As it was wanted that the script would run in versions 6.01 upwards, this bug was painstakingly traced out, and then narrowed down to this event occurring:

Code:
  drawsave @small.bmp.icon %c
  window -c @small.bmp.icon


It is assumed that somehow if the window is closed as the draw save is taking place, some kind of memory error occurs (as evidenced by various different crash reports).

It might be that in version 7.1, the save happens faster than the close, so that the bug does not show up generally, but it might at some later point.

The workaround for now has been to close to window with a timer:

Code:
.timer 1 1 window -c @small.bmp.icon

Perhaps, to ensure this behaviour does not inadvertently crop up again, it could be investigated and solved.

Thanks
Free` #mIRC


Free is free
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks for the bug report, there are have been thousands of changes to mIRC since v6.01, which was released in 2002, and there have been changes to both /window and /drawsave since then. As far as I can tell this issue is not reproducable in recent versions of mIRC.


Link Copied to Clipboard