Opened 17 years ago
Closed 16 years ago
#387 closed Bug (Fixed)
Change DllCallbackFree() to check handle validation or erase it
Reported by: | MsCreatoR <mscreator@…> | Owned by: | Jon |
---|---|---|---|
Milestone: | 3.2.13.4 | Component: | AutoIt |
Version: | 3.2.12.1 | Severity: | None |
Keywords: | DllCallbackFree Crash | Cc: |
Description
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 DllCallbackFree($Handle) $Handle = 0 Return EndIf Return -1 EndFunc
Because for now there is a chance that our script can crash when it's not supose to (in the middle of some task).
Thanks.
Attachments (0)
Change History (5)
comment:1 Changed 17 years ago by TicketCleanup
- Milestone Future Release deleted
- Version 3.2.12.0 deleted
comment:2 Changed 16 years ago by Jon
I don't understand.
comment:3 Changed 16 years ago by Valik
- Type changed from Feature Request to Bug
- Version set to 3.2.12.1
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:
DllCallbackFree(32)
Incidentally, flagging this as a bug, not a feature request.
comment:4 Changed 16 years ago by Jon
Oh I see. K, I've removed the message for this and DllClose() as well.
comment:5 Changed 16 years ago by Jon
- Milestone set to 3.2.13.4
- Owner set to Jon
- Resolution set to Fixed
- Status changed from new to closed
Fixed in version: 3.2.13.4
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.
Automatic ticket cleanup.