VirtualBox

Changeset 92254 in vbox for trunk/src


Ignore:
Timestamp:
Nov 7, 2021 9:34:47 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148094
Message:

FE/Qt: Ignore UIKeyboardHandler::winKeyboardEvent calls when cleaning up so we don't re-instantiate the extra data manager. Possible regression of r114596?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r90689 r92254  
    13111311bool UIKeyboardHandler::winKeyboardEvent(UINT msg, const KBDLLHOOKSTRUCT &event)
    13121312{
    1313     /* Check what related machine-view was NOT unregistered yet: */
     1313    /* Check that related machine-view was NOT unregistered yet: */
    13141314    if (!m_views.contains(m_iKeyboardHookViewIndex))
     1315        return false;
     1316
     1317    /* HACK ALERT! Check that we're not in cleanup, as we're using gEDataManger
     1318       to get host key combinations and it as probably been cleaned up already.
     1319       We don't want to cause it to re-instantiate, with all the COM traffic
     1320       that might involve.  Sample assertion stack (IPRT not windbg, sorry):
     1321
     1322       !!Assertion Failed!!
     1323       Expression: mRC != RPC_E_CANTCALLOUT_ININPUTSYNCCALL
     1324       Location  : E:\vbox\svn\trunk\out\win.amd64\debug\obj\UICommon\include\COMWrappers.cpp(3857) class QVector<class QString> __cdecl CVirtualBox::GetExtraDataKeys(void)
     1325       Stack     :
     1326       00007fff39aa6634 VBoxRT.dll!RTAssertMsg1+0x274 (rva:0x246634)
     1327         [E:\vbox\svn\trunk\src\VBox\Runtime\common\misc\assert.cpp:159]
     1328       00007fff39aa542f VBoxRT.dll!RTAssertMsg1Weak+0x2f (rva:0x24542f)
     1329         [E:\vbox\svn\trunk\src\VBox\Runtime\common\misc\RTAssertMsg1Weak.cpp:40 (+0x0)]
     1330       00007fff36e5c00f UICommon.dll!CVirtualBox::GetExtraDataKeys+0x23f (rva:0x3fc00f)
     1331         [E:\vbox\svn\trunk\out\win.amd64\debug\obj\UICommon\include\COMWrappers.cpp:3857]
     1332       00007fff36ac2cc9 UICommon.dll!UIExtraDataManager::prepareGlobalExtraDataMap+0xb9 (rva:0x62cc9)
     1333         [E:\vbox\svn\trunk\src\VBox\Frontends\VirtualBox\src\extradata\UIExtraDataManager.cpp:4845]
     1334       00007fff36ac2bf8 UICommon.dll!UIExtraDataManager::prepare+0x28 (rva:0x62bf8)
     1335         [E:\vbox\svn\trunk\src\VBox\Frontends\VirtualBox\src\extradata\UIExtraDataManager.cpp:4833 (+0x0)]
     1336       00007fff36ab1896 UICommon.dll!UIExtraDataManager::instance+0x66 (rva:0x51896)
     1337         [E:\vbox\svn\trunk\src\VBox\Frontends\VirtualBox\src\extradata\UIExtraDataManager.cpp:2011 (+0x0)]
     1338       00007ff771b05b06 VirtualBoxVM.exe!UIKeyboardHandler::winKeyboardEvent+0xe6 (rva:0x35b06)
     1339         [E:\vbox\svn\trunk\src\VBox\Frontends\VirtualBox\src\runtime\UIKeyboardHandler.cpp:1324]
     1340       00007ff771b059ec VirtualBoxVM.exe!UIKeyboardHandler::winKeyboardProc+0x4c (rva:0x359ec)
     1341         [E:\vbox\svn\trunk\src\VBox\Frontends\VirtualBox\src\runtime\UIKeyboardHandler.cpp:1304]
     1342       00007fff763311f2 USER32.dll!GetDlgCtrlID+0x232 (rva:0x211f2)
     1343       00007fff7639ac89 USER32.dll!CreateSystemThreads+0xa29 (rva:0x8ac89)
     1344       00007fff76b30ba4 ntdll.dll!KiUserCallbackDispatcher+0x24 (rva:0xa0ba4)
     1345       00007fff749b1064 win32u.dll!NtUserPeekMessage+0x14 (rva:0x1064)
     1346       00007fff7631a553 USER32.dll!PeekMessageW+0x1e3 (rva:0xa553)
     1347       00007fff7631a4b3 USER32.dll!PeekMessageW+0x143 (rva:0xa4b3)
     1348       00007e11000270dc ConEmuHk64.dll!SetLoadLibraryCallback+0xc3ac (rva:0x270dc)
     1349       00007fff759be71b combase.dll!CoRegisterPSClsid+0x82b (rva:0x6e71b)
     1350       00007fff759be685 combase.dll!CoRegisterPSClsid+0x795 (rva:0x6e685)
     1351       00007fff759bcec1 combase.dll!Ordinal87+0x2851 (rva:0x6cec1)
     1352       00007fff759bcbbb combase.dll!Ordinal87+0x254b (rva:0x6cbbb)
     1353       00007fff75994956 combase.dll!RoGetApartmentIdentifier+0x55f6 (rva:0x44956)
     1354       cccccccccccccccc  */
     1355    if (UICommon::instance()->isCleaningUp())
    13151356        return false;
    13161357
     
    13181359     * captured, but is being released under the capture. Detect this situation
    13191360     * and do not pass on the key press to the virtual machine. */
     1361/** @todo r=bird: Why do this complicated test before the simple m_fIsKeyboardCaptured one? */
    13201362    uint8_t what_pressed =      (event.flags & 0x01)
    13211363                             && (event.vkCode != VK_RSHIFT)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette