{"record":{"id":"d5c1dbf81e4ea16d","repo":"SubtitleEdit/subtitleedit","slug":"operation-is-not-supported-on-this-platform-d5c1db","errorCode":null,"errorMessage":"Operation is not supported on this platform.","messagePattern":"Operation is not supported on this platform\\.","errorType":"exception","errorClass":"PlatformNotSupportedException","httpStatus":null,"severity":"error","filePath":"src/ui/Logic/Download/Qwen3AsrCppDownloadService.cs","lineNumber":84,"sourceCode":"            return useVulkan ? WindowsVulkanUrl : WindowsUrl;\n        }\n\n        if (OperatingSystem.IsLinux())\n        {\n            if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)\n            {\n                return LinuxArm64Url; // no Vulkan build for ARM64\n            }\n\n            return useVulkan ? LinuxVulkanUrl : LinuxUrl;\n        }\n\n        if (OperatingSystem.IsMacOS())\n        {\n            return RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? MacArmUrl : MacX64Url;\n        }\n\n        throw new PlatformNotSupportedException();\n    }\n}\n","sourceCodeStart":66,"sourceCodeEnd":87,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Logic/Download/Qwen3AsrCppDownloadService.cs#L66-L87","documentation":"PlatformNotSupportedException with no message, thrown by Qwen3AsrCppDownloadService.GetUrl when the OS is neither Windows nor macOS - i.e. effectively unreachable on the supported Linux path which is handled above this fallthrough.","triggerScenarios":"Reached only after the Windows and Linux (x64/arm64, Vulkan/CPU) and macOS branches all fail to return. This is a defensive fallthrough for unrecognized platforms.","commonSituations":"Exotic OS, misreported platform in a container, or a future code edit that adds an OS branch without removing the fallthrough. On supported OSes it should not fire.","solutions":["Verify the host is Windows, Linux, or macOS.","Update the runtime for reliable OS detection.","If a new platform is intentionally supported, add a returning branch in GetUrl.","Report a bug if a supported OS still reaches the throw."],"exampleFix":"// before\nthrow new PlatformNotSupportedException();\n\n// after\nthrow new PlatformNotSupportedException(\n    $\"Qwen3-ASR (cpp) has no build for OS={RuntimeInformation.OSDescription}.\");","handlingStrategy":"validation","validationCode":"if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS())\n{\n    throw new InvalidOperationException($\"Unsupported OS for Qwen3-ASR: {RuntimeInformation.OSDescription}\");\n}","typeGuard":null,"tryCatchPattern":"try { url = service.GetUrl(...); }\ncatch (PlatformNotSupportedException) { /* engine not available on this OS; disable in UI */ }","preventionTips":["Gate the Qwen3-ASR option by supported OS in the UI.","Keep the runtime current for accurate OS detection.","Name the unsupported platform in a user-facing message."],"tags":["platform","platformnotsupported","qwen3-asr","csharp"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}