Menu

#2076 Handle "Access is denied" in TClipboard.Open

Fixed
nobody
None
Default
Enhancement
2012-04-01
2010-07-08
Anonymous
No

Originally created by: sagara1...@gmail.com

operating system  : Windows 7 build 7600
system language   : Russian
system up time    : 8 hours 56 minutes
program up time   : 35 seconds
processors        : 3x AMD Phenom(tm) II X3 720 Processor
physical memory   : 600/2047 MB (free/total)
free disk space   : (C:) 6.64 GB
display mode      : 1920x1080, 32 bit
process id        : $16b0
allocated memory  : 76.02 MB
executable        : heidisql.exe
exec. date/time   : 2010-05-24 15:32
version           : 5.1.0.3343
compiled with     : Delphi 2010
madExcept version : 3.0k
callstack crc     : $6292ccc2, $47a2e8e6, $47a2e8e6
exception number  : 1
exception class   : EClipboardException
exception message : Cannot open clipboard: Access is denied.

main thread ($1510):
004d88b0 +0084 heidisql.exe Clipbrd            TClipboard.Open
0059e02d +0051 heidisql.exe SynEdit  1297  +10 TCustomSynEdit.DoCopyToClipboard
0059e1ee +00aa heidisql.exe SynEdit  1345  +12 TCustomSynEdit.CopyToClipboard
005ac7a5 +23a1 heidisql.exe SynEdit  7657 +680 TCustomSynEdit.ExecuteCommand
005aa270 +005c heidisql.exe SynEdit  6904  +10 TCustomSynEdit.CommandProcessor
0059fa3b +007f heidisql.exe SynEdit  2071  +20 TCustomSynEdit.KeyDown
0054a77a +0092 heidisql.exe Controls           TWinControl.DoKeyDown
0054a7a6 +000a heidisql.exe Controls           TWinControl.WMKeyDown
0054451c +02d4 heidisql.exe Controls           TControl.WndProc
00548de4 +0568 heidisql.exe Controls           TWinControl.WndProc
005a8e40 +0080 heidisql.exe SynEdit  6197  +22 TCustomSynEdit.WndProc
00548484 +002c heidisql.exe Controls           TWinControl.MainWndProc
00499df4 +0014 heidisql.exe Classes            StdWndProc
76ef8e97 +000a USER32.dll                      DispatchMessageW
00573dd5 +011d heidisql.exe Forms              TApplication.ProcessMessage
00573e1a +000a heidisql.exe Forms              TApplication.HandleMessage
00574145 +00c9 heidisql.exe Forms              TApplication.Run
007359ed +00d9 heidisql.exe heidisql   67  +18 initialization
76df1192 +0010 kernel32.dll                    BaseThreadInitThunk

thread $1b08 (TWorkerThread):
77665e8a +0a ntdll.dll                          NtWaitForSingleObject
75841796 +66 KERNELBASE.dll                     WaitForSingleObjectEx
76deeffe +3e kernel32.dll                       WaitForSingleObjectEx
76deefad +0d kernel32.dll                       WaitForSingleObject
005d096d +19 heidisql.exe   VirtualTrees        TWorkerThread.Execute
00460747 +2b heidisql.exe   madExcept           HookedTThreadExecute
00497922 +42 heidisql.exe   Classes             ThreadProc
00406818 +28 heidisql.exe   System       548 +0 ThreadWrapper
00460629 +0d heidisql.exe   madExcept           CallThreadProcSafe
00460693 +37 heidisql.exe   madExcept           ThreadExceptFrame
76df1192 +10 kernel32.dll                       BaseThreadInitThunk
>> created by main thread ($1510) at:
005d0862 +16 heidisql.exe   VirtualTrees        TWorkerThread.Create

thread $1828:
77665e9a +0a ntdll.dll     NtWaitForWorkViaWorkerFactory
76df1192 +10 kernel32.dll  BaseThreadInitThunk

thread $1bd8:
77665e9a +0a ntdll.dll     NtWaitForWorkViaWorkerFactory
76df1192 +10 kernel32.dll  BaseThreadInitThunk

thread $1500:
77665e6a +0a ntdll.dll     NtWaitForMultipleObjects
76df1192 +10 kernel32.dll  BaseThreadInitThunk

thread $1018:
77664c3a +0a ntdll.dll       NtDelayExecution
75841870 +4f KERNELBASE.dll  SleepEx
75841813 +0a KERNELBASE.dll  Sleep
76df1192 +10 kernel32.dll    BaseThreadInitThunk

thread $18c:
77665e9a +0a ntdll.dll     NtWaitForWorkViaWorkerFactory
76df1192 +10 kernel32.dll  BaseThreadInitThunk

thread $c30:
77665e6a +000a ntdll.dll       NtWaitForMultipleObjects
7584686c +0000 KERNELBASE.dll  WaitForMultipleObjectsEx
76def145 +0089 kernel32.dll    WaitForMultipleObjectsEx
76ef90b8 +a43f USER32.dll      MsgWaitForMultipleObjectsEx
76ef59f9 +001a USER32.dll      MsgWaitForMultipleObjects
76df1192 +0010 kernel32.dll    BaseThreadInitThunk

thread $c64:
77665e9a +0a ntdll.dll     NtWaitForWorkViaWorkerFactory
76df1192 +10 kernel32.dll  BaseThreadInitThunk

Related

Tickets: #2810

Discussion

  • Anonymous

    Anonymous - 2010-07-08

    Originally posted by: a...@anse.de

    Access denied? Never heard that. Is your Windows user name somehow restricted?

    Status: NeedInfo

     
  • Anonymous

    Anonymous - 2012-01-25

    Originally posted by: imre.lo...@gmail.com

    Hello,

    I started gettgin these fairly regularly lately
    but only when i have MS Office running that manages clipboard.

    Heres the possible solution:
    http://stackoverflow.com/questions/1859102/how-can-i-fix-cannot-open-clipboard-access-denied-errors

     
  • Anonymous

    Anonymous - 2012-01-25

    Originally posted by: a...@anse.de

    Good hint, thanks for the link. I could try that:

    while not Success do
    try
      //Set the clipboard
      Success := True;
    except
      on Exception do
      begin
        Inc(RetryCount);
        if RetryCount < 3 then
          Sleep(RetryCount * 100)
        else
          raise MyException.Create('Cannot set clipboard');
      end;
    end;

    The crux is that this is not in HeidiSQL itself, but in SynEdit. There is still some sporadic activity in the SynEdit project but I highly guess they are not fixing bugs anymore, so I'll give it a try and keep the fix in Heidi's copy of SynEdit sources.

    Summary: Handle "Access is denied" in TClipboard.Open
    Status: Accepted