Opened 15 years ago

Closed 15 years ago

#387 closed Bug (Fixed)

Change DllCallbackFree() to check handle validation or erase it

Reported by: MsCreatoR <mscreator@…> Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: DllCallbackFree Crash Cc:


From the help file:

If handle is invalid, an AutoIt runtime error will be thrown, and the script will terminate!

First of all, i think none of built-in functions should not to hard crash the script.
But if it's really inevitably, those functions should (optional?) recieve handle ByRef, and change the $handle to 0 after it's releasing the CallBack. Something like this:

Func _DllCallbackFree(ByRef $Handle)
	If $Handle > 0 Then
		$Handle = 0
	Return -1

Because for now there is a chance that our script can crash when it's not supose to (in the middle of some task).


Attachments (0)

Change History (5)

comment:1 Changed 15 years ago by TicketCleanup

  • Milestone Future Release deleted
  • Version deleted

Automatic ticket cleanup.

comment:2 Changed 15 years ago by Jon

I don't understand.

comment:3 Changed 15 years ago by Valik

  • Type changed from Feature Request to Bug
  • Version set to

Jon, from the sounds of it, this is the same thing you used to have in place when an invalid file handle was passed to FileClose(). Remember how it used to throw up an error and stop the script? Remember how I bitched about that?

Oh, and this crashes AutoIt. Stupid, yes, but I was trying to generate something simple to reproduce the bug and ended up with a hard-crash:


Incidentally, flagging this as a bug, not a feature request.

comment:4 Changed 15 years ago by Jon

Oh I see. K, I've removed the message for this and DllClose() as well.

comment:5 Changed 15 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version:

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

as closed The owner will remain Jon.

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

Note: See TracTickets for help on using tickets.