1.1.27 crashes Topic is solved

Report problems with documented functionality
guest3456
Posts: 2422
Joined: 09 Oct 2013, 10:31

1.1.27 crashes

26 Dec 2017, 00:31

running the Example.ahk unit tests from the /doc/ subfolder of this repo:

https://github.com/Uberi/Yunit

windows crash on v1.1.27
works successfully on 1.1.26.01

can narrow it down just to the GUI output by changing the top lines of Example.ahk to this:

Code: Select all

#Include ..\Yunit.ahk
#Include ..\Window.ahk

Yunit.Use(YunitWindow).Test(NumberTestSuite, StringTestSuite)

lexikos
Posts: 6176
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: 1.1.27 crashes

26 Dec 2017, 06:07

You can add #NoEnv as a workaround for now.
guest3456
Posts: 2422
Joined: 09 Oct 2013, 10:31

Re: 1.1.27 crashes

26 Dec 2017, 06:59

lexikos wrote:You can add #NoEnv as a workaround for now.
thanks yeah adding NoEnv to YUnit.ahk fixes it in v1. fyi, it still crashes on v2 Yunit branch w/ a82 too since NoEnv isn't availalble there

lexikos
Posts: 6176
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: 1.1.27 crashes

26 Dec 2017, 17:53

No, it crashes for a different reason.

The first bug occurs if you use pre-increment/decrement with a potential environment variable, such as ++myvar. It does not occur in v2, which handles variables the same as if #NoEnv was in effect.

The second bug occurs if you use throw, because of an erroneous line that was added by automatic merge with v1. The heap is corrupted by throw, but you may not see the effect immediately.

There is a third bug relating to the first one which affects v1 and v2. If you use ++MyClass.x with #Warn, you will get a warning because ++ only looks to the next token for its target variable. Fixing this means delaying the check to a later stage, which incidentally also fixes the first bug.
User avatar
Nextron
Posts: 1222
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: 1.1.27 crashes

27 Dec 2017, 07:31

The first bug occurs if you use pre-increment/decrement with a potential environment variable, such as ++myvar.
You can add #NoEnv as a workaround for now.
Thanks, good to know! I did identify the pre-increment as a culprit (and was in the process of replacing them in my script), but wasn't able to reliably reproduce crashes because I didn't made the link to #NoEnv yet.
lexikos
Posts: 6176
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: 1.1.27 crashes  Topic is solved

30 Dec 2017, 21:48

Fixed in v1.1.27.01.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 3 guests