Why this Critical Error on DropFiles ? Topic is solved

Report problems with documented functionality
User avatar
FredOoo
Posts: 186
Joined: 07 May 2019, 21:58
Location: Paris

Why this Critical Error on DropFiles ?

Post by FredOoo » 01 Oct 2020, 09:33

May be something trivial I don't see ?

Code: Select all

#SingleInstance force
MainWin := CMainWin.new()

class CMainWin extends Gui
{
    __new(){
        super.__new('+Resize', "DropFiles", this)
        this.add("Edit","vEdit")
        this.onEvent('Size', "Win_Size")
        this.onEvent('DropFiles', "Win_DropFiles")
        this.show('h300 w300')
    }
    Win_Size( MinMax, Width, Height ){
        this.ToolTip ">Win_Size"
        if !MinMax
            this['Edit'].move(,, Width - this.marginX*2 )
    }
    Win_DropFiles( Ctrl, FileArray, X, Y ){
        this.ToolTip ">Win_DropFiles`n" FileArray[1] ; ★ Critical Error: Invalid memory read/write.
    }
    ToolTip( txt,sec:=4,num:=1){
        ToolTip( txt,,,num )
        SetTimer(()=>ToolTip(,,,num), -sec*1000)
    }
}
(Alan Turing) « What would be the point of saying that A = B if it was really the same thing? »
(Albert Camus) « Misnaming things is to add to the misfortunes of the world. »

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Why this Critical Error on DropFiles ?

Post by swagfag » 01 Oct 2020, 12:07

its an ahk bug
doesnt account for when the event sink is the gui itself(thus indexing into the wrong parameter and attempting to ->Release() something it was never meant nor able to, eg the X coordinate param)

lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: Why this Critical Error on DropFiles ?

Post by lexikos » 09 Oct 2020, 03:45

To whoever marked the topic as solved: best not to do that yet, if you want the bug to be fixed. ;)

lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: Why this Critical Error on DropFiles ?  Topic is solved

Post by lexikos » 06 May 2021, 17:03

Fixed by v2.0-133.

User avatar
FredOoo
Posts: 186
Joined: 07 May 2019, 21:58
Location: Paris

Re: Why this Critical Error on DropFiles ?

Post by FredOoo » 27 Apr 2022, 23:18

Great !
I’ll try it.
I’m working now for few days with the beta3
(Alan Turing) « What would be the point of saying that A = B if it was really the same thing? »
(Albert Camus) « Misnaming things is to add to the misfortunes of the world. »

Post Reply

Return to “Bug Reports”