1

Topic: Error opening Observations window

One of our users experiences an error "System Error. Code: 5. Access is denied." when opening the Observations (Survey) window (see error message below).  It doesn't always happen and, after selecting "Continue application", R6 seems to continue working with no obvious ill affects.  Any idea what the problem is?

Thanks
Andy

----------------------------------------------------------------------------------

date/time         : 2019-12-12, 05:29:39, 400ms
computer name     : LWTRDS01
wts client name   : LYNDSEY-PC
user name         : lcox
registered owner  : Windows User
operating system  : Windows 2008 R2 x64 Service Pack 1 build 7601
system language   : English
system up time    : 1 day 1 hour
program up time   : 1 hour 41 minutes
processors        : 4x Intel(R) Xeon(R) CPU E5506 @ 2.13GHz
physical memory   : 27726/32758 MB (free/total)
free disk space   : (C:) 315.77 GB (R:) 406.73 GB
display mode      : 1920x1080, 16 bit
process id        : $2830
allocated memory  : 63.83 MB
command line      : RecorderApp.exe /133422
executable        : RecorderApp.exe
exec. date/time   : 2017-12-14 20:09
version           : 6.28.0.287
compiled with     : Delphi 7
madExcept version : 3.0n
callstack crc     : $77e51504, $0c3db259, $0c3db259
exception number  : 1
exception class   : EOSError
exception message : System Error. Code: 5. Access is denied.

main thread ($228c):
00412e99 RecorderApp.exe SysUtils                     RaiseLastOSError
00412ec7 RecorderApp.exe SysUtils                     Win32Check
004e70b9 RecorderApp.exe Controls                     TMouse.GetCursorPos
006b3560 RecorderApp.exe Sources              561 +17 TSources.FsgInternalRefsClick
006b49ee RecorderApp.exe Sources              937  +6 TSources.SetEditMode
007ae552 RecorderApp.exe IndOrg              1319 +36 TfrmIndOrg.EnableDetails
007b9953 RecorderApp.exe IndOrg              4029  +1 TfrmIndOrg.ApplySecurity
00a7117a RecorderApp.exe ApplicationSettings 3559  +5 TApplicationSettings.ApplySecurityChange
00a717bf RecorderApp.exe ApplicationSettings 3684 +17 TApplicationSettings.SetHasUncommittedUpdates
00a8752e RecorderApp.exe CRReportSQL         1625  +3 TBatchUpdateFile.PopulateTable
00a85c40 RecorderApp.exe CRReportSQL         1191  +6 TBaseXmlQueryFile.BuildReport
00a855a8 RecorderApp.exe CRReportSQL         1076 +19 TBaseXmlQueryFile.BuildTable
00a06ac5 RecorderApp.exe BatchUpdates         151 +29 TBatchUpdate.RunBatchUpdate
00a9590b RecorderApp.exe FormActions         2046  +3 TdmFormActions.InitBatchUpdate
00a5fe50 RecorderApp.exe Maintbar            1935  +3 TfrmMain.BatchUpdateClick
004eed6e RecorderApp.exe Menus                        TMenuItem.Click
004f000b RecorderApp.exe Menus                        TMenu.DispatchCommand
004f0dc2 RecorderApp.exe Menus                        TPopupList.WndProc
004f0d11 RecorderApp.exe Menus                        TPopupList.MainWndProc
00430c3c RecorderApp.exe Classes                      StdWndProc
74d57bd5 USER32.dll                                   DispatchMessageA
004fe313 RecorderApp.exe Forms                        TApplication.ProcessMessage
004fe34a RecorderApp.exe Forms                        TApplication.HandleMessage
004fe57a RecorderApp.exe Forms                        TApplication.Run
00aaad2e RecorderApp.exe RecorderApp          416 +79 initialization
7689343b kernel32.dll                                 BaseThreadInitThunk

Andy Foy, Ecologist & IT consultant
Andy Foy Consulting

2

Re: Error opening Observations window

Hi

Looking at the error reports this doesn't seem to be related to the Observation windows, but suggests that a file can't be accessed (at least temporarilY). This may be a .dll

Being intermittent, it will be difficult to track down. I suggest a record is made every time it occurs and the error reports saved. If a pattern can be identified, then some temporary code changes can be made to identify exactly what is happening.

Mike Weideli
Littlefield Consultancy - IT Consultants

3

Re: Error opening Observations window

Thanks Mike. I'll ask them to keep logging the errors and see if there is any kind pattern.

Andy Foy, Ecologist & IT consultant
Andy Foy Consulting

4

Re: Error opening Observations window

Hi Mike

The same user has had two more "Access is denied" errors (see below), the first when first logging into Recorder6 and the second when trying to add an individual to the Run By section of a survey.  This does seem to be a temporary problem as it usually works second time around.  Do you have any ideas what might be going wrong?

Thanks
Andy

Logging into Recorder6
-------------------------------

date/time         : 2020-01-06, 05:04:03, 331ms
computer name     : LWTRDS01
wts client name   : LYNDSEY-PC
user name         : lcox
registered owner  : Windows User
operating system  : Windows 2008 R2 x64 Service Pack 1 build 7601
system language   : English
system up time    : 26 days 1 hour
program up time   : 36 seconds
processors        : 4x Intel(R) Xeon(R) CPU E5506 @ 2.13GHz
physical memory   : 27619/32758 MB (free/total)
free disk space   : (C:) 314.38 GB (R:) 404.56 GB
display mode      : 1920x1080, 16 bit
process id        : $3494
allocated memory  : 50.67 MB
command line      : RecorderApp.exe /852982
executable        : RecorderApp.exe
exec. date/time   : 2017-12-14 20:09
version           : 6.28.0.287
compiled with     : Delphi 7
madExcept version : 3.0n
callstack crc     : $77e51504, $76efe80b, $76efe80b
exception number  : 1
exception class   : EOSError
exception message : System Error. Code: 5. Access is denied.

main thread ($38d4):
00412e99 RecorderApp.exe SysUtils             RaiseLastOSError
00412ec7 RecorderApp.exe SysUtils             Win32Check
004e70b9 RecorderApp.exe Controls             TMouse.GetCursorPos
006b3560 RecorderApp.exe Sources      561 +17 TSources.FsgInternalRefsClick
006b49ee RecorderApp.exe Sources      937  +6 TSources.SetEditMode
007ae552 RecorderApp.exe IndOrg      1319 +36 TfrmIndOrg.EnableDetails
007ae143 RecorderApp.exe IndOrg      1219 +39 TfrmIndOrg.PerformNodeChange
007ae2e5 RecorderApp.exe IndOrg      1254  +5 TfrmIndOrg.tvChange
005ffc1d RecorderApp.exe RapTree     4840  +1 TCustomRapidTree.Change
005fe5ce RecorderApp.exe RapTree     4190 +28 TCustomRapidTree.SelectCell
005ec087 RecorderApp.exe exgrid      2680  +4 TCustomExGrid.MoveCurrent
005eb322 RecorderApp.exe exgrid      2241  +3 TCustomExGrid.FocusCell
005ffca8 RecorderApp.exe RapTree     4863  +2 TCustomRapidTree.FocusCell
005fa074 RecorderApp.exe RapTree     2028  +8 TCustomRapidTree.SetSelection
00602d05 RecorderApp.exe RapTree     6767 +19 TFlyNodes.AlphaSort
005f98c0 RecorderApp.exe RapTree     1765  +6 TCustomRapidTree.SetSortType
007b7ba9 RecorderApp.exe IndOrg      3638  +8 TfrmIndOrg.PerformSort
007b7970 RecorderApp.exe IndOrg      3605 +13 TfrmIndOrg.SetIndividualSort
007ac678 RecorderApp.exe IndOrg       732 +21 TfrmIndOrg.SetupObjects
007abca1 RecorderApp.exe IndOrg       602  +5 TfrmIndOrg.Create
00a91345 RecorderApp.exe FormActions  577 +44 TdmFormActions.DisplayForm
00a914ad RecorderApp.exe FormActions  639  +1 TdmFormActions.actNamesExecute
0042ff87 RecorderApp.exe Classes              TBasicAction.Execute
004e8599 RecorderApp.exe ActnList             TContainedAction.Execute
004e923b RecorderApp.exe ActnList             TCustomAction.Execute
00a5b692 RecorderApp.exe Maintbar     508  +8 CheckAndOpen
00a5ba50 RecorderApp.exe Maintbar     540 +11 TfrmMain.OpenScreens
00a5bc80 RecorderApp.exe Maintbar     584  +1 TfrmMain.WMLastSessionWindows
004dd148 RecorderApp.exe Controls             TControl.WndProc
004e01a7 RecorderApp.exe Controls             TWinControl.WndProc
004f7c75 RecorderApp.exe Forms                TCustomForm.WndProc
004dfe24 RecorderApp.exe Controls             TWinControl.MainWndProc
00430c3c RecorderApp.exe Classes              StdWndProc
74d57bd5 USER32.dll                           DispatchMessageA
004fe313 RecorderApp.exe Forms                TApplication.ProcessMessage
004fe34a RecorderApp.exe Forms                TApplication.HandleMessage
004fe57a RecorderApp.exe Forms                TApplication.Run
00aaad2e RecorderApp.exe RecorderApp  416 +79 initialization
7689343b kernel32.dll                         BaseThreadInitThunk

--------------------------------------------------------------------------------------------------------------

Adding an individual to a survey Run By
-----------------------------------------------------

date/time         : 2020-01-06, 07:34:19, 163ms
computer name     : LWTRDS01
wts client name   : LYNDSEY-PC
user name         : lcox
registered owner  : Windows User
operating system  : Windows 2008 R2 x64 Service Pack 1 build 7601
system language   : English
system up time    : 26 days 3 hours
program up time   : 2 hours 29 minutes
processors        : 4x Intel(R) Xeon(R) CPU E5506 @ 2.13GHz
physical memory   : 27634/32758 MB (free/total)
free disk space   : (C:) 314.52 GB (R:) 395.76 GB
display mode      : 1920x1080, 16 bit
process id        : $1cc8
allocated memory  : 78.20 MB
command line      : RecorderApp.exe /2294646
executable        : RecorderApp.exe
exec. date/time   : 2017-12-14 20:09
version           : 6.28.0.287
compiled with     : Delphi 7
madExcept version : 3.0n
callstack crc     : $77e51504, $d330e4b9, $d330e4b9
exception number  : 1
exception class   : EOSError
exception message : System Error. Code: 5. Access is denied.

main thread ($227c):
00412e99 RecorderApp.exe SysUtils                     RaiseLastOSError
00412ec7 RecorderApp.exe SysUtils                     Win32Check
004e70b9 RecorderApp.exe Controls                     TMouse.GetCursorPos
006b3560 RecorderApp.exe Sources              561 +17 TSources.FsgInternalRefsClick
006b49ee RecorderApp.exe Sources              937  +6 TSources.SetEditMode
007ae552 RecorderApp.exe IndOrg              1319 +36 TfrmIndOrg.EnableDetails
007ae143 RecorderApp.exe IndOrg              1219 +39 TfrmIndOrg.PerformNodeChange
007ae2e5 RecorderApp.exe IndOrg              1254  +5 TfrmIndOrg.tvChange
005ffc1d RecorderApp.exe RapTree             4840  +1 TCustomRapidTree.Change
005fe5ce RecorderApp.exe RapTree             4190 +28 TCustomRapidTree.SelectCell
005ec087 RecorderApp.exe exgrid              2680  +4 TCustomExGrid.MoveCurrent
005eb322 RecorderApp.exe exgrid              2241  +3 TCustomExGrid.FocusCell
005ffca8 RecorderApp.exe RapTree             4863  +2 TCustomRapidTree.FocusCell
005fa074 RecorderApp.exe RapTree             2028  +8 TCustomRapidTree.SetSelection
00602d05 RecorderApp.exe RapTree             6767 +19 TFlyNodes.AlphaSort
005f98c0 RecorderApp.exe RapTree             1765  +6 TCustomRapidTree.SetSortType
007b7ba9 RecorderApp.exe IndOrg              3638  +8 TfrmIndOrg.PerformSort
007b7970 RecorderApp.exe IndOrg              3605 +13 TfrmIndOrg.SetIndividualSort
007ac678 RecorderApp.exe IndOrg               732 +21 TfrmIndOrg.SetupObjects
007abca1 RecorderApp.exe IndOrg               602  +5 TfrmIndOrg.Create
00a91345 RecorderApp.exe FormActions          577 +44 TdmFormActions.DisplayForm
00a914ad RecorderApp.exe FormActions          639  +1 TdmFormActions.actNamesExecute
0042ff87 RecorderApp.exe Classes                      TBasicAction.Execute
004e8599 RecorderApp.exe ActnList                     TContainedAction.Execute
004e923b RecorderApp.exe ActnList                     TCustomAction.Execute
007e048b RecorderApp.exe SurveyDetails       1140  +2 TfrmSurveyDetails.eSurveyRunByGetData
0066a4d2 RecorderApp.exe AddinLinkedControls  165  +2 TAddinLinkedEdit.ButtonClick
004dd2e0 RecorderApp.exe Controls                     TControl.Click
004d23e8 RecorderApp.exe StdCtrls                     TButton.Click
004d24dc RecorderApp.exe StdCtrls                     TButton.CNCommand
004dd148 RecorderApp.exe Controls                     TControl.WndProc
004e01a7 RecorderApp.exe Controls                     TWinControl.WndProc
004d22ac RecorderApp.exe StdCtrls                     TButtonControl.WndProc
004dcf18 RecorderApp.exe Controls                     TControl.Perform
004e02df RecorderApp.exe Controls                     DoControlMsg
004e0937 RecorderApp.exe Controls                     TWinControl.WMCommand
004dd148 RecorderApp.exe Controls                     TControl.WndProc
004e01a7 RecorderApp.exe Controls                     TWinControl.WndProc
00430c3c RecorderApp.exe Classes                      StdWndProc
004dfe24 RecorderApp.exe Controls                     TWinControl.MainWndProc
00430c3c RecorderApp.exe Classes                      StdWndProc
74d596cf USER32.dll                                   SendMessageW
74d6a9ba USER32.dll                                   CallWindowProcA
004e028b RecorderApp.exe Controls                     TWinControl.DefaultHandler
004dd6e8 RecorderApp.exe Controls                     TControl.WMLButtonUp
004dd148 RecorderApp.exe Controls                     TControl.WndProc
004e01a7 RecorderApp.exe Controls                     TWinControl.WndProc
004d22ac RecorderApp.exe StdCtrls                     TButtonControl.WndProc
004dfe24 RecorderApp.exe Controls                     TWinControl.MainWndProc
00430c3c RecorderApp.exe Classes                      StdWndProc
74d57bd5 USER32.dll                                   DispatchMessageA
004fe313 RecorderApp.exe Forms                        TApplication.ProcessMessage
004fe34a RecorderApp.exe Forms                        TApplication.HandleMessage
004fe57a RecorderApp.exe Forms                        TApplication.Run
00aaad2e RecorderApp.exe RecorderApp          416 +79 initialization
7689343b kernel32.dll                                 BaseThreadInitThunk

Andy Foy, Ecologist & IT consultant
Andy Foy Consulting

5

Re: Error opening Observations window

The thing they all have in common is that they are trying to get the Mouse cursor position reagrding accessing Sources Internal Files.  You can see this in the error report whcih shows the procedures being run at the time the error occurred. Win32Check returns an error in it fails which is what I think you are seeing.  I will do a  bit of research on this. I have found this which may be a clue http://www.delphipages.com/forum/showth … p?t=199502     

main thread ($227c):
00412e99 RecorderApp.exe SysUtils                     RaiseLastOSError
00412ec7 RecorderApp.exe SysUtils                     Win32Check
004e70b9 RecorderApp.exe Controls                     TMouse.GetCursorPos


Looks like this may be something to do with internal files.  The code appears to be accessing Sources which includes finding internal files. Have the sources on the windows being opened have any references to internall files ?  I suspect this is the code causing the problem (From procedure TSources.FsgInternalRefsClick(Sender:TObject))  If this is the case then it could be the Shell to the internal file. 

with FsgInternalRefs do begin
    lCell := ScreenToClient(Mouse.CursorPos);
    MouseToCell(lCell.X, lCell.Y, lCell.X, lCell.Y);
    // When goRowSelect in options, Col always = 0
    if (lCell.X = 0) and (lCell.Y > 0) and (Cells[lCell.X, lCell.Y] <> '') then
      ShellFile(Cells[lCell.X, lCell.Y]);
  end;

Mike Weideli
Littlefield Consultancy - IT Consultants

6

Re: Error opening Observations window

Thanks Mike.  When you say "internal files" do you mean just documents within R6 or do you mean files on a local drive or network?  There are links to files on the PC/network that no longer exist so we'll try removing them to see if that resolves the problem.

I also found this link https://stackoverflow.com/questions/201 … tcursorpos with a possible fix if it's a cursor issue.

Andy Foy, Ecologist & IT consultant
Andy Foy Consulting

7

Re: Error opening Observations window

Hi

It could be the Cursor. What version are the user on. Might be worth just adding a bit of code into this area to see just what is going on. I can change 6.28 and 6.30, but not any other versions. The routine causing the problem is called immediately you open anything with a Source. I would agree with you that it is probably the ScreenToClient(Mouse.CursorPos) call causuing the problem. This is used throughout R6, so not sure what we can do about it.

Mike Weideli
Littlefield Consultancy - IT Consultants

8

Re: Error opening Observations window

Hi Mike

We're still on 6.28, so if adding a bit of code isn't too much trouble that would be great!

Many thanks
Andy

Andy Foy, Ecologist & IT consultant
Andy Foy Consulting

9

Re: Error opening Observations window

Actually we're planning to move to 6.30 soon, so if it's just as easy to add a bit of code to that then it might be more useful.

Andy Foy, Ecologist & IT consultant
Andy Foy Consulting