Modify ↓
#2198 closed Bug (No Bug)
DllStructGetData causes crash
Reported by: | JFX | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.8.1 | Severity: | None |
Keywords: | Cc: |
Description
DllStructGetData sometimes crashes on a wchar Structure.
Only happens on the first run, never in a loop.
Also happens rarely so push F5 a "few" times.
$ret = DllCall("shell32.dll", "ptr", "CommandLineToArgvW", "wstr", $CmdLineRaw, "int*", 0) If @error Or Not $ret[0] Then Exit 1 $tPtr = DllStructCreate("ptr", $ret[0]) $retarr = DllStructGetData($tPtr, 1) $tBuffer = DllStructCreate("wchar[4095]", $retarr) ;crash occurs here $aRet = DllStructGetData($tBuffer, 1) DllCall("kernel32.dll", "ptr", "LocalFree", "ptr", $ret[0])
Attachments (0)
Change History (2)
comment:1 Changed 13 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
comment:2 Changed 13 years ago by JFX
hmm was just a small reproduce form this one here:
So I assume the DllStructCreate("wchar[4095]", $retarr) is the wrong thing here?
I should never create a (w)char struct in a place, were i don't know what it contains?
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
Your code is garbage. We cannot protect you from writing shitty code.