[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] "memory access violation" in win32 0.42 when cancel
From: |
Timothy Brownawell |
Subject: |
Re: [Monotone-devel] "memory access violation" in win32 0.42 when canceling blocked `mtn diff --external` using Ctrl+C |
Date: |
Wed, 07 Jan 2009 23:51:01 +0000 |
On Wed, 2009-01-07 at 09:57 -0800, Zack Weinberg wrote:
> On Wed, Jan 7, 2009 at 5:58 AM, Marcin W. Dąbrowski <address@hidden> wrote:
> > Hi all.
> >
> >>> Can you reproduce what the OP reported?
> >> Unfortunately no (and yes ... see the end)
> >
> > +1 from here.
> >
> > And maybe some additional comment. I'm having this behaviour
> > on 0.41 as well, and in every situation involving Ctrl-C.
>
> At least part of the problem is that we ought to be calling
> SetConsoleCtrlHandler in win32/main.cc but we're not. I'm not sure
> why this causes us to wind up in the SEH unhandled exception filter
> with a nonsense exception code -- the default Ctrl-C handler
> supposedly just kills the process without printing anything.
>
> I don't know why this seems to be interacting with the process
> handling code (win32/process.cc) except that I don't like the looks of
> the fiddling around with standard handles for I/O redirection that it
> does. We should be using the optional arguments to CreateProcess that
> do that instead. But that might not be what's wrong.
>
> I seem to be the person who ends up writing low-level Windows code
> despite that I know about this only what I read in MSDN and don't have
> a Windows development environment. I would really rather not do it
> this time -- it looks like something that needs actual testing.
I tried using SetConsoleCtrlHandler() with an ExitProcess() in the
handler. This actually resulted in still having an access violation,
which was after the call to ExitProcess(). Not sure what this means...