Opened 15 years ago
Closed 13 years ago
#1319 closed Bug (Fixed)
AutoIt3.exe always exists after closing script with RichEdit
Reported by: | BugFix | Owned by: | trancexx |
---|---|---|---|
Milestone: | 3.3.9.1 | Component: | AutoIt |
Version: | 3.3.1.6 | Severity: | None |
Keywords: | Cc: |
Description
Hi,
i've used in SciTE the following script with Windows XP Home SP2. At first with Beta 3.1.1.5 .
After ending exists furthermore process AutoIt3.exe with an CPU load of 98 %.
Then i've updated to Beta 3.3.1.6 with same effect.
#include <EditConstants.au3> #include <GuiRichEdit.au3> $Form1 = GUICreate("Form1", 400, 500, 300, 220) $Edit = _GUICtrlRichEdit_Create($Form1, "", 10, 10, 380, 360, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL)) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = -3
Attachments (0)
Change History (11)
comment:1 Changed 15 years ago by anonymous
comment:2 Changed 15 years ago by ProgAndy
this is a workaround working on xp:
;#BETA #include <EditConstants.au3> #include <GuiRichEdit.au3> OnAutoItExitRegister("KillRichEdit") $Form1 = GUICreate("Form1", 400, 500, 300, 220) $Edit = _GUICtrlRichEdit_Create($Form1, "", 10, 10, 380, 360, BitOR($ES_MULTILINE, $ES_AUTOVSCROLL)) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = -3 Func KillRichEdit() _GUICtrlRichEdit_Destroy($Edit) EndFunc
comment:3 Changed 15 years ago by ProgAndy
Found the error:
I think it is __GCR_SetOLECallback($hRichEdit) wich is called in _GUICtrlRichEdit_Create.
When AutoIt is being closed, the callbacks or the dllstructs are freed before the RichEdit was destroyed. The Richedit tries to call the release function of the "object", but since it does not exist anymore, this leads to unexpected behaviour.
It should be documented that you have to use _GUICtrlRichEdit_Destroy on exit. Also, the COM-Object should not be initialised for each richedit. Sometimes a RichEdit without image-support is needed. I propose to remove __GCR_SetOLECallback from the create function and document instead that you have to call an other function for image support.
comment:4 Changed 15 years ago by Valik
This ticket is referenced in revision: [5442]
comment:5 Changed 15 years ago by Jpm
- Resolution set to Fixed
- Status changed from new to closed
- Version changed from 3.3.1.6 to 3.3.2.0
comment:6 Changed 15 years ago by TicketCleanup
- Milestone set to Future Release
Automatic ticket cleanup.
comment:7 Changed 15 years ago by Valik
- Milestone Future Release deleted
- Resolution Fixed deleted
- Status changed from closed to reopened
- Version changed from 3.3.2.0 to 3.3.1.6
If I wanted this ticket closed I would have closed this ticket.
comment:8 Changed 15 years ago by anon
I propose to remove GCR_SetOLECallback from the create function and document instead that you have to call an other function for image support.
I agree, I haven't done thorough testing, but calling GCR_SetOLECallback() after the control is created works just as well. And it runs just as good without it.
_GUICtrlRichEdit_EnableOLE($fEnabled = True)
Could be used to enable the ole (image etc support)
comment:9 Changed 15 years ago by Jpm
- Owner set to Valik
- Status changed from reopened to assigned
comment:10 Changed 15 years ago by Jpm
Not sure to understand what must be done in _GUICtrlRichEdit_EnableOLE( False) after usage of a successful _GUICtrlRichEdit_EnableOLE( True)
comment:11 Changed 13 years ago by trancexx
- Milestone set to 3.3.9.1
- Owner changed from Valik to trancexx
- Resolution set to Fixed
- Status changed from assigned to closed
Fixed by revision [6805] in version: 3.3.9.1
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.
Nearly the same on Windows 7. But on seven the Script just fatal exit:
!>17:57:55 AutoIT3.exe ended.rc:-1073741819
No CPU load.