VA problem in 1.1.29.00

Report problems with documented functionality
serzh82saratov
Posts: 45
Joined: 01 Jul 2017, 03:04

VA problem in 1.1.29.00

18 Jun 2018, 08:22

There was a problem with this code https://autohotkey.com/board/topic/78224-possible-to-monitor-and-pseudo-lock-per-app-volume/?p=497079, more precisely not with it, but with code based on it.
The code works for a long time on previous versions, you can check it from 1.1.28.02, but starting from 1.1.29.00 in ahk x32 win x64 wines does not work.
In 1.1.29.00 in ahk x64 win x64 not problem.
Changes the volume in the window under the cursor.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

serzh82saratov
Posts: 45
Joined: 01 Jul 2017, 03:04

Re: VA problem in 1.1.29.00

18 Jun 2018, 09:20

In SetMute и SetVolume added at the end, "uint", 0 as it was with you, now it works. Is this a bug in previous versions?
User avatar
jeeswg
Posts: 4957
Joined: 19 Dec 2016, 01:58
Location: UK

Re: VA problem in 1.1.29.00

18 Jun 2018, 09:22

Did you test v1.1.29.01?
User avatar
nnnik
Posts: 3193
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: VA problem in 1.1.29.00

18 Jun 2018, 09:44

serzh82saratov wrote:In SetMute и SetVolume added at the end, "uint", 0 as it was with you, now it works. Is this a bug in previous versions?

Potentially - however rather than a bug it was a mistake which leads to undefined behavior.
Prior to this version of AutoHotkey the problematic part behaved as intendet howeever in this new version of AutoHotkey it doesn't.
Recommends AHK Studio
serzh82saratov
Posts: 45
Joined: 01 Jul 2017, 03:04

Re: VA problem in 1.1.29.00

18 Jun 2018, 09:51

jeeswg wrote:Did you test v1.1.29.01?

Yes.
serzh82saratov
Posts: 45
Joined: 01 Jul 2017, 03:04

Re: VA problem in 1.1.29.00

18 Jun 2018, 10:11

Though VA_GUID("") who is returning something, left it.
malcev
Posts: 92
Joined: 12 Aug 2014, 12:37

Re: VA problem in 1.1.29.00

18 Jun 2018, 10:30

I just test it and get results:
If we run this code in ahk 32bit v1.1.29.01
It returns error in this dllcall - msgbox % DllCall(NumGet(NumGet(sav+0)+5*A_PtrSize), "uint", sav, "int", 1) ; SetMute
If we run this code in ahk 64bit v1.1.29.01 it does not return error.
In previous versions before v1.1.28.02 all works OK.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


But this code works without any error:

Code: [Select all] [Download] GeSHi © Codebox Plus

SPI_GETMOUSESPEED = 0x70
msgbox % DllCall("SystemParametersInfo", UInt, SPI_GETMOUSESPEED, UInt, 0, UIntP, OrigMouseSpeed)
msgbox % DllCall("SystemParametersInfo", UInt, SPI_GETMOUSESPEED, UInt, 0, UIntP, OrigMouseSpeed, UInt, 0)
User avatar
jeeswg
Posts: 4957
Joined: 19 Dec 2016, 01:58
Location: UK

Re: VA problem in 1.1.29.00

18 Jun 2018, 11:26

So what has changed in AHK? Is it stricter error handling correctly identifying an error? (When SetMute is used via DllCall with too few parameters.) The quote below perhaps suggests this but doesn't state it explicitly.
Changes & New Features
https://autohotkey.com/docs/AHKL_ChangeLog.htm#v1.1.29.00
Revised exception handling:
•If unhandled, show an error message/call OnError before the stack unwinds (making exceptions consistent with runtime errors).
User avatar
nnnik
Posts: 3193
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: VA problem in 1.1.29.00

18 Jun 2018, 11:40

Do you know assembly and the StdCall calling convention?
Prior to AutoHotkey v1.1.29.0 it seems that AHK had an extra 32 bit 0 on the stack.
Coincidently when the function removed this value from the stack it caused no error.

In AutoHotkey v1.1.29.0 this changed - as to why this is the case I can only speculate.
A new version of visual studio compiler or any kind of change in the compilers parameters might change this.
Additionally changes in other parts of the script might have made it better to compile the DllCall function in a different way.
Recommends AHK Studio

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 3 guests