Modify

Opened 3 months ago

Last modified 8 weeks ago

#4060 assigned Bug

DllStructCreate() issue with handling errors: Error allocating memory

Reported by: mLipok Owned by: Jon
Milestone: Component: AutoIt
Version: 3.3.18.0 Severity: None
Keywords: Cc:

Description (last modified by mLipok)

According to the HelpFile:
https://www.autoitscript.com/autoit3/docs/functions/DllStructCreate.htm

Return Value
Success:	a variable for use with DllStruct calls.
Failure:	sets the @error flag to non-zero.
@error:	1 = Variable passed to DllStructCreate was not a string.
2 = There is an unknown Data Type in the string passed.
3 = Failed to allocate the memory needed for the struct, or Pointer = 0.
4 = Error allocating memory for the passed string.

In this repro script:

#AutoIt3Wrapper_UseX64=Y
DllStructCreate("byte[123456789097]")
ConsoleWrite('TESTING : ERR=' & @error & ' EXT=' & @extended & @CRLF)

Issue/Question 1: in x32 AutoIt version
Why AutoIt fires MsgBox error and quit proceesing rest of the script, instead of simply setting @error = 3 (eventually @error = 4) ?

Issue/Question 2: in x64 AutoIt version
Why AutoIt does not set @error = 3 (eventually @error = 4) ?

Related discussion:
https://www.autoitscript.com/forum/topic/154081-avoid-autoit-error-message-box-in-unknown-errors/page/5/#findComment-1548049

https://www.autoitscript.com/forum/topic/154081-avoid-autoit-error-message-box-in-unknown-errors/page/5/#findComment-1548054

Attachments (0)

Change History (6)

comment:1 by mLipok, 3 months ago

Description: modified (diff)

comment:2 by mLipok, 3 months ago

Description: modified (diff)

comment:3 by mLipok, 3 months ago

Description: modified (diff)

comment:4 by mLipok, 3 months ago

Description: modified (diff)

comment:5 by J-Paul Mesnage, 2 months ago

Owner: set to Jon
Status: newassigned

Fix sent to Jon

comment:6 by mLipok, 8 weeks ago

Version: 3.3.14.03.3.18.0

Modify Ticket

Action
as assigned The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.