Modify

Opened 57 minutes ago

Last modified 46 minutes ago

#4060 new Bug

DllStructCreate() issue with handling errors: Error allocating memory

Reported by: mLipok Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.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 (4)

comment:1 Changed 49 minutes ago by mLipok

  • Description modified (diff)

comment:2 Changed 48 minutes ago by mLipok

  • Description modified (diff)

comment:3 Changed 46 minutes ago by mLipok

  • Description modified (diff)

comment:4 Changed 46 minutes ago by mLipok

  • Description modified (diff)

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.

Add Comment

Modify Ticket

Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.