Hello!

We have a VBScript that uses "editor.openFile()" and ocasionally it throws a
Access Violation. The error is sporadic and we couldn't find a fixed way to
simulate it, but it occurs with some frequency, to the point that it is annoying
to the developers, as it makes the whole execution unstable, and PSPad has to be
restarted. 

The code (VBScript) that throws the first access violation is the call to
"novo.openFile()" in the following script:



   set novo = newEditor()
   novo.openFile(fileName)
   novo.caretY(linha + 50)



(viz http://i.imgur.com/lzR0vQk.png )

The full stack of the error:

Exception description:


Access violation at address 00513D39 in module 'PSPad.exe'. Read of address
00000017.

Exception class: EAccessViolation
Exception address: 00513D39
--------------------------------------------------------------------------------
--------------------
Stack list, generated 03/09/2015 16:27:38
[00513D39] SynEdit.TCustomSynEdit.NotifyHookedCommandHandlers (Line 10227,
"SynEdit.pas" + 8) + $10
[005B8F86] SynAutoCorrect.TCustomSynAutoCorrect.KeyboardHandler (Line 564,
"SynAutoCorrect.pas" + 23) + $1D
[0050FA72] SynEdit.TCustomSynEdit.DoOnProcessCommand (Line 7920, "SynEdit.pas" +
4) + $11
[0050D26A] SynEdit.TCustomSynEdit.CommandProcessor (Line 7001, "SynEdit.pas" +
7) + $E
[0050A053] SynEdit.TCustomSynEdit.WMKillFocus (Line 5329, "SynEdit.pas" + 2) +
$C
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0050C212] SynEdit.TCustomSynEdit.WndProc (Line 6285, "SynEdit.pas" + 22) + $4
[0048C7F0] Controls.TWinControl.MainWndProc (Line 6237, "Controls.pas" + 3) +
$6
[0042B64C] Classes.StdWndProc + $14
[0049C8EF] Forms.TCustomForm.SetWindowFocus + $23
[0049C978] Forms.TCustomForm.SetActive + $5C
[0049D14B] Forms.TCustomForm.WMActivate + $17
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048C7F0] Controls.TWinControl.MainWndProc (Line 6237, "Controls.pas" + 3) +
$6
[0048C805] Controls.TWinControl.MainWndProc (Line 6240, "Controls.pas" + 6) +
$0
[0042B64C] Classes.StdWndProc + $14
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0049B08D] Forms.TCustomForm.WndProc + $421
[00421534] Classes.TThreadList.UnlockList + $4
[004332F4] Graphics.FreeMemoryContexts + $98
[0048C7F0] Controls.TWinControl.MainWndProc (Line 6237, "Controls.pas" + 3) +
$6
[0042B64C] Classes.StdWndProc + $14
[0049DC4A] Forms.TCustomForm.CMShowingChanged + $426
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0049B08D] Forms.TCustomForm.WndProc + $421
[004898E4] Controls.TControl.Perform (Line 4552, "Controls.pas" + 5) + $C
[0048C6C7] Controls.TWinControl.UpdateShowing (Line 6193, "Controls.pas" + 16) +
$C
[0048C732] Controls.TWinControl.UpdateControlState (Line 6211, "Controls.pas" +
7) + $1C
[0048E4BE] Controls.TWinControl.CMVisibleChanged (Line 7305, "Controls.pas" + 3)
+ $2
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0049B08D] Forms.TCustomForm.WndProc + $421
[0049B6E4] Forms.TCustomForm.GetMonitor + $4C
[004898E4] Controls.TControl.Perform (Line 4552, "Controls.pas" + 5) + $C
[004885E7] Controls.TControl.SetVisible (Line 3734, "Controls.pas" + 5) + $D
[0049AB82] Forms.TCustomForm.SetVisible + $3A
[0049E063] Forms.TCustomForm.Show + $7
[0049E22F] Forms.TCustomForm.ShowModal + $123
[00718822] uException.TExceptionDialog.ShowException (Line 633, "uException.pas"
+ 16) + $7
[004BFE6C] JclDebug.TJclModuleInfoList.IsSystemModuleAddress (Line 1272,
"JclDebug.pas" + 0) + $0
[004C3FC5] JclDebug.ValidCodeAddr (Line 4819, "JclDebug.pas" + 3) + $1
[004C4718] JclDebug.TJclStackInfoList.ValidCallSite (Line 5449, "JclDebug.pas" +
9) + $5
[007197CE] PSPad.PSPad (Line 90, "" + 52) + $7
[004C4607] JclDebug.TJclStackInfoList.TraceStackRaw (Line 5372, "JclDebug.pas" +
32) + $7
[00421534] Classes.TThreadList.UnlockList + $4
[004C3C52] JclDebug.TJclGlobalStackList.FindObject (Line 4631, "JclDebug.pas" +
16) + $3
[00421534] Classes.TThreadList.UnlockList + $4
[004C3BA4] JclDebug.TJclGlobalStackList.AddObject (Line 4591, "JclDebug.pas" +
12) + $3
[004C40F1] JclDebug.JclCreateStackList (Line 4934, "JclDebug.pas" + 2) + $7
[004C409A] JclDebug.DoExceptionStackTrace (Line 4874, "JclDebug.pas" + 20) + $C
[004C40A2] JclDebug.DoExceptionStackTrace (Line 4874, "JclDebug.pas" + 20) +
$14
[004C4F0A] JclDebug.DoExceptNotify (Line 5893, "JclDebug.pas" + 6) + $A
[004BEB6F] JclHookExcept.TNotifierItem.DoNotify (Line 272, "JclHookExcept.pas" +
5) + $D
[00718125] uException.TExceptionDialog.ExceptionHandler (Line 453,
"uException.pas" + 7) + $4
[004A1AE1] Forms.TApplication.HandleException + $61
[0048C82B] Controls.TWinControl.MainWndProc (Line 6243, "Controls.pas" + 9) +
$A
[0048D935] Controls.TWinControl.DoEnter (Line 6861, "Controls.pas" + 1) + $14
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[005B1E55] TntComCtrls.TTntCustomStatusBar.WndProc (Line 3970, "TntComCtrls.pas"
+ 16) + $26
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0050C212] SynEdit.TCustomSynEdit.WndProc (Line 6285, "SynEdit.pas" + 22) + $4
[0048BD85] Controls.TWinControl.Broadcast (Line 5895, "Controls.pas" + 3) + $11
[005B8F86] SynAutoCorrect.TCustomSynAutoCorrect.KeyboardHandler (Line 564,
"SynAutoCorrect.pas" + 23) + $1D
[0050FA72] SynEdit.TCustomSynEdit.DoOnProcessCommand (Line 7920, "SynEdit.pas" +
4) + $11
[0050D26A] SynEdit.TCustomSynEdit.CommandProcessor (Line 7001, "SynEdit.pas" +
7) + $E
[0050A0D8] SynEdit.TCustomSynEdit.WMSetFocus (Line 5353, "SynEdit.pas" + 1) +
$C
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0048F113] Controls.TWinControl.GetClientRect (Line 7832, "Controls.pas" + 1) +
$9
[0049B08D] Forms.TCustomForm.WndProc + $421
[004FB859] TntControls.TWinControlTrap.WindowProc (Line 666, "TntControls.pas" +
19) + $5
[004898E4] Controls.TControl.Perform (Line 4552, "Controls.pas" + 5) + $C
[0049C861] Forms.TCustomForm.SetFocusedControl + $229
[0049C8B4] Forms.TCustomForm.SetFocusedControl + $27C
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0050C212] SynEdit.TCustomSynEdit.WndProc (Line 6285, "SynEdit.pas" + 22) + $4
[0048C7F0] Controls.TWinControl.MainWndProc (Line 6237, "Controls.pas" + 3) +
$6
[0042B64C] Classes.StdWndProc + $14
[0049C8EF] Forms.TCustomForm.SetWindowFocus + $23
[0049C596] Forms.TCustomForm.SetActiveControl + $82
[0049C968] Forms.TCustomForm.SetActive + $4C
[0049D367] Forms.TCustomForm.WMMDIActivate + $2B
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0049B08D] Forms.TCustomForm.WndProc + $421
[004FB859] TntControls.TWinControlTrap.WindowProc (Line 666, "TntControls.pas" +
19) + $5
[0048C7F0] Controls.TWinControl.MainWndProc (Line 6237, "Controls.pas" + 3) +
$6
[0042B64C] Classes.StdWndProc + $14
[004FB4B4] TntControls.TWinControlTrap.Win32Proc (Line 554, "TntControls.pas" +
12) + $19
[0042B64C] Classes.StdWndProc + $14
[004FB6B4] TntControls.TWinControlTrap.DefWin32Proc (Line 605, "TntControls.pas"
+ 25) + $19
[0042B64C] Classes.StdWndProc + $14
[0048CC57] Controls.TWinControl.DefaultHandler (Line 6369, "Controls.pas" + 23)
+ $17
[0049C50A] Forms.TCustomForm.DefaultHandler + $5A
[004F7F3C] TntForms.TTntForm.DefaultHandler (Line 390, "TntForms.pas" + 12) +
$4
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0049B08D] Forms.TCustomForm.WndProc + $421
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[004332F4] Graphics.FreeMemoryContexts + $98
[0049B08D] Forms.TCustomForm.WndProc + $421
[004FB859] TntControls.TWinControlTrap.WindowProc (Line 666, "TntControls.pas" +
19) + $5
[0048C7F0] Controls.TWinControl.MainWndProc (Line 6237, "Controls.pas" + 3) +
$6
[0042B64C] Classes.StdWndProc + $14
[004FB4B4] TntControls.TWinControlTrap.Win32Proc (Line 554, "TntControls.pas" +
12) + $19
[0042B64C] Classes.StdWndProc + $14
[0049DBB5] Forms.TCustomForm.CMShowingChanged + $391
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0049B08D] Forms.TCustomForm.WndProc + $421
[0050C212] SynEdit.TCustomSynEdit.WndProc (Line 6285, "SynEdit.pas" + 22) + $4
[004898E4] Controls.TControl.Perform (Line 4552, "Controls.pas" + 5) + $C
[004FB859] TntControls.TWinControlTrap.WindowProc (Line 666, "TntControls.pas" +
19) + $5
[004898E4] Controls.TControl.Perform (Line 4552, "Controls.pas" + 5) + $C
[0048C6C7] Controls.TWinControl.UpdateShowing (Line 6193, "Controls.pas" + 16) +
$C
[0048C732] Controls.TWinControl.UpdateControlState (Line 6211, "Controls.pas" +
7) + $1C
[0048E4BE] Controls.TWinControl.CMVisibleChanged (Line 7305, "Controls.pas" + 3)
+ $2
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0049B08D] Forms.TCustomForm.WndProc + $421
[0049F217] Forms.TScreen.GetMonitor + $B
[004FB859] TntControls.TWinControlTrap.WindowProc (Line 666, "TntControls.pas" +
19) + $5
[004898E4] Controls.TControl.Perform (Line 4552, "Controls.pas" + 5) + $C
[004885E7] Controls.TControl.SetVisible (Line 3734, "Controls.pas" + 5) + $D
[0049AB82] Forms.TCustomForm.SetVisible + $3A
[0049A201] Forms.TCustomForm.DoCreate + $71
[00499EA1] Forms.TCustomForm.AfterConstruction + $11
[0040430B] System.@AfterConstruction + $7
[004F7CB4] TntForms.TTntForm.Create (Line 321, "TntForms.pas" + 17) + $3D
[006D32A5] uMain.TfPSPad.CreateChild (Line 2440, "uMain.pas" + 5) + $D
[006D82DF] uMain.TfPSPad.OpenSynEditFile (Line 4000, "uMain.pas" + 21) + $4
[006C564E] uScripts.TEditor.OpenFile (Line 485, "uScripts.pas" + 9) + $19
[006B3D61] lvkRTTIDispatch.TlvkRTTIDispatch.Invoke (Line 773,
"lvkRTTIDispatch.pas" + 111) + $19
[004098A5] FmpSysMm.FmpSysFreeMem (Line 81, "FmpSysMm.pas" + 1) + $0
[004028B9] System.@FreeMem + $5
[00404DBD] System.@LStrArrayClr + $21
[006B3758] lvkRTTIDispatch.TlvkRTTIDispatch.GetIDsOfNames (Line 549,
"lvkRTTIDispatch.pas" + 4) + $1E
[00404EEF] System.@LStrFromPWCharLen + $1B
[0040555B] System.@WStrFromPCharLen + $1B
[00404EEF] System.@LStrFromPWCharLen + $1B
[0040407A] System.TObject.GetInterface + $7E
[00404048] System.TObject.GetInterface + $4C
[0040407A] System.TObject.GetInterface + $7E
[0048C7F0] Controls.TWinControl.MainWndProc (Line 6237, "Controls.pas" + 3) +
$6
[0048C805] Controls.TWinControl.MainWndProc (Line 6240, "Controls.pas" + 6) +
$0
[0042B64C] Classes.StdWndProc + $14
[00401FC9] System.DecommitFree + $99
[00402041] System.InsertFree + $61
[006C0F6A] lvkActiveScript.TlvkActiveScript.Call (Line 2151,
"lvkActiveScript.pas" + 45) + $22
[006C11AE] lvkActiveScript.TlvkActiveScript.Call (Line 2190,
"lvkActiveScript.pas" + 1) + $10
[006ECA52] uMain.TfPSPad.ScriptMenuClick (Line 11375, "uMain.pas" + 12) + $2D
[004A87FE] Menus.TMenuItem.Click + $A6
[004A9BBA] Menus.DoClick + $EE
[004A9CD2] Menus.TMenu.IsShortCut + $B2
[0049E7FA] Forms.TCustomForm.IsShortCut + $56
[004A171E] Forms.TApplication.IsShortCut + $4E
[004A1013] Forms.TApplication.WndProc + $48B
[0042B64C] Classes.StdWndProc + $14
[004A9905] Menus.Find + $79
[0048557A] Controls.SendAppMessage (Line 1816, "Controls.pas" + 2) + $9
[0048E7C3] Controls.TWinControl.IsMenuKey (Line 7446, "Controls.pas" + 16) + $C
[0048E971] Controls.TWinControl.CNSysKeyDown (Line 7510, "Controls.pas" + 4) +
$4
[00489B14] Controls.TControl.WndProc (Line 4645, "Controls.pas" + 53) + $6
[004F8A20] TntForms.GetMessageForNT (Line 777, "TntForms.pas" + 10) + $9
[0048CB73] Controls.TWinControl.WndProc (Line 6342, "Controls.pas" + 33) + $4
[0050C212] SynEdit.TCustomSynEdit.WndProc (Line 6285, "SynEdit.pas" + 22) + $4
[0048C7F0] Controls.TWinControl.MainWndProc (Line 6237, "Controls.pas" + 3) +
$6
[0042B64C] Classes.StdWndProc + $14
[004A165B] Forms.TApplication.IsKeyMsg + $77
[004A17A2] Forms.TApplication.ProcessMessage + $66
[004A17F6] Forms.TApplication.HandleMessage + $A
[004A1A16] Forms.TApplication.Run + $96
[007197CE] PSPad.PSPad (Line 90, "" + 52) + $7
--------------------------------------------------------------------------------
--------------------
Program  : C:\PSPAD\PSPad.exe  4.6.0 (2669)
System   : Windows 7 Professional x64, Version: 6.1, Build: 1DB1, Service Pack
1
Processor: Intel,         Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3390 MHz MMX
Display  : 1920x1080 pixels, 32 bpp
--------------------------------------------------------------------------------
--------------------
Active Controls Hierarchy:
TPSSynEdit "Editor1"
TfChildEdit "fChildEdit_3"
--------------------------------------------------------------------------------
--------------------


-- 
<http://forum.pspad.com/read.php?4,65788,65788>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem