Fix VM startup and camera capture from the v20 laptop pass - #130
Merged
Merged
Conversation
The camera chardev passed reconnect=1, which current QEMU rejects, so every launch died at startup before the guest booted. Use reconnect-ms. The Media Foundation capture resolved MFEnumDeviceSources from mfplat.dll alone and let LazyProc.Call panic when it was missing; on current Windows the export lives in mf.dll. Resolve the entry points across mfplat.dll, mf.dll and mfcore.dll and return an error instead of crashing. Also log the direct-drop path on the VM window so a future pass can tell whether drops reach the launcher.
CI on Windows caught that MFSetAttributeSize and MFSetAttributeRatio are inline helpers in mfapi.h, not mfplat.dll exports, so there is nothing to resolve for them. Pack the pair and set the UINT64 attribute directly through IMFAttributes::SetUINT64.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v0.0.20-preview laptop pass found defects that stop the app working on a clean machine, plus a diagnostic gap. This fixes them.
reconnect=1. QEMU deprecatedreconnectin 9.2 and dropped it, so both the bundled WINQ-EMU runtime and the stock QEMU 11 fallback reject it withInvalid parameter 'reconnect'and QEMU exits before the guest boots. It now passesreconnect-ms=1000.MFEnumDeviceSourceswas bound tomfplat.dll, andLazyProc.Callpanics when an export is missing. On the tested Windows build that export lives inmf.dll, so the first real camera attempt took the whole app down. Capture now resolves its Media Foundation entry points acrossmfplat.dll,mf.dllandmfcore.dll, and reports a missing export as an error instead of panicking.MFSetAttributeSizeandMFSetAttributeRatio, which are inline helpers inmfapi.hrather than DLL exports. Windows CI caught it: they resolve to nothing, so the first camera attempt would have panicked even with the right DLL. They now pack the pair and callIMFAttributes::SetUINT64directly.WM_DROPFILESreaches the launcher at all.Why the rest of the handoff list is not here
Several items in the report look like they come from the local QEMU shim used on the laptop, not from the source. That shim wraps the real binary as
*.real.exe, so the SDL window belongs to a different process than the launcher'sqemuPid. That breaks the title enforcer's pid match, which would in turn explain the un-renamed window title, the stock QEMU icon, the splash never auto-hiding (the enforcer is what closes it), and drops never being enabled on the window. Those need a re-test without the shim before changing code.The LAN firewall profile and the settings behavior are as designed: public networks need the Settings toggle, and the settings dialog persists on Save, so closing it with X discards changes. Glad to take any of those on separately.
Test plan
go test ./...(Linux)go vet ./...andGOOS=windows go vet -unsafeptr=false ./...GOOS=windows go buildof the launcherTestBuildQemuArgsUsesReconnectMSForTheCameraChardevcovers the chardev optiongo test ./...) resolves the Media Foundation exports on windows-latest