1

Topic: First-chance exception 0x8001010D on !quit

The output below is the full output when calling !quit

ParseBangCommand(00000000, "!quit", "");
Left main message loop. Last message: 0x0012 (0, 0)
The thread 'DDEService' (0x10e0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x178c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x14bc) has exited with code 1 (0x1).
First-chance exception at 0x7c812afb in litestep.exe: 0x8001010D: Det går inte att göra ett utgående anrop eftersom programmet gör ett indatasynkront anrop.
In DLLCanUnloadNow
The thread 'Win32 Thread' (0x130c) has exited with code 0 (0x0).
'litestep.exe': Unloaded 'C:\WINDOWS\system32\webcheck.dll'
'litestep.exe': Unloaded 'C:\WINDOWS\system32\mlang.dll'
'litestep.exe': Unloaded 'C:\WINDOWS\system32\ieframe.dll'
The thread 'RecoveryThread' (0x1784) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x12a0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1390) has exited with code 0 (0x0).
In DLLMain, DLL_PROCESS_DETACH
The thread 'Win32 Thread' (0x17f0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x12c0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1428) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1748) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x594) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xdfc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x151c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x152c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x11e4) has exited with code 0 (0x0).
The program '[0x16B8] litestep.exe: Native' has exited with code 0 (0x0).

The English translation of the error message is

An outgoing call cannot be made since the application is dispatching an input-synchronous call.

This happen every time I call !quit. The output above is with an empty step.rc file. Can anyone else reproduce this? Any idea how to get rid of it?

2

Re: First-chance exception 0x8001010D on !quit

if you have an empty step.rc, how are you calling !quit?

3

Re: First-chance exception 0x8001010D on !quit

Run dialog: C:\Program\LiteStep\litestep.exe !quit

4

Re: First-chance exception 0x8001010D on !quit

I assume it is the litestep instance receiving the !quit that is crashing and not the one that is passing the !quit?

5

Re: First-chance exception 0x8001010D on !quit

Yes, your assumption is correct. I get the same exception when I have lsxcommand loaded and issue the !quit through lsx.

6

Re: First-chance exception 0x8001010D on !quit

If you can reproduce this in a debugger, it should be straight forward to figure out what thread is crashing.  Otherwise - I wonder if you have some global hooks installed on your system that are messing with things.

7

Re: First-chance exception 0x8001010D on !quit

Don't you get the same exception when quiting litestep?

I'll try setting a breakpoint on the exception when I get the time. Might not be until thursday or friday this week.

8

Re: First-chance exception 0x8001010D on !quit

I'm on linux at work, and my windows machine at home died recently and I haven't had time to get it back online with my recent travels - I expect to get a new machine in the next week or two, so it'll be a bit yet before I can test this.  I can't find an XP machine to test on at the moment.

9

Re: First-chance exception 0x8001010D on !quit

I get an exception too. But mine looks different hmm

ParseBangCommand(00000000, "!quit", "");
Left main message loop. Last message: 0x0012 (0, 0)
The thread 'Win32 Thread' (0x112c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x11c4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xe08) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x9c4) has exited with code 0 (0x0).
First-chance exception at 0x74f2b9bc in litestep.exe: 0x0000071A: The remote procedure call was cancelled.
The thread 'RecoveryThread' (0xf9c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xa78) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1074) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xed8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x12a8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xf2c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xe64) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1090) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2d4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1200) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1068) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x12dc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xb94) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1094) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x124c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xf14) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1314) has exited with code 0 (0x0).
The program '[4456] litestep.exe: Native' has exited with code 0 (0x0).

Done with an empty step.rc, win7 64x, ls0.25.0

10

Re: First-chance exception 0x8001010D on !quit

I just did a quick run through the debugger.

It's the for_each line that generates the error.

HRESULT CLiteStep::_StopServices()
{
    for_each(m_Services.begin(), m_Services.end(), mem_fun(&IService::Stop));
    return S_OK;
}

The m_Services vector contains two services, DDEService and TrayService. It's when stopping the TrayService I get the error. Debugging the TrayService I see the error being generated when executing the m_ssoVector.back()->Exec line the second time.

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//
// unloadShellServiceObjects
//
// Shut down the COM based shell services.
//
//
void TrayService::unloadShellServiceObjects()
{
    while (!m_ssoVector.empty())
    {
        m_ssoVector.back()->Exec(&CGID_ShellServiceObject, OLECMDID_SAVE,
            OLECMDEXECOPT_DODEFAULT, NULL, NULL);
        
        m_ssoVector.back()->Release();
        m_ssoVector.pop_back();
    }
}

The m_ssoVector vector contains five IOleCommandTarget pointers that all point to IUnknowns. So I don't yet know what the second one is.

11 (edited by Tobbe 2011-12-21 08:05:36 am)

Re: First-chance exception 0x8001010D on !quit

Other shells seems to be doing something like this:

for (int i = 0; i < service_objects.size(); i++) {
    service_objects[i]->Exec(&CGID_ShellServiceObject,
    3, // stop
    0,
    NULL, NULL);

    service_objects[i]->Release();
}

Maybe that's the exact same thing we do. I don't know the values of the OLECMDID_SAVE and OLECMDEXECOPT_DODEFAULT constants.

EDIT:
Yeah, they're the same, see OLECMDID enumeration and OLECMDEXECOPT enumeration

EDIT 2:
From http://web.archive.org/web/200812110844 … stray.html

"Windows' intrinsic system tray applications (most notably Network Connections)" ... "These applications are now packaged into COM objects" ... "Load each one and then query it for an IOleCommandTarget interface. Then call the Exec method of that interface passing in CGID_ShellServiceObject as the command group and 2 as the command identifier" ... "When you are about to shutdown call Exec again and just replace the 2 with a 3"

Written by Kevin Schaffe, aka Maduin

12 (edited by Acidfire 2011-12-21 16:51:53 pm)

Re: First-chance exception 0x8001010D on !quit

My m_ssoVector only contains one pointer to IUnknown, but the result is the same.

Calling QueryStatus on it yields no results (empty response).

Here is the code I used to test: http://paste2.org/p/1833288