fix: DeviceCatalog/DevList/UpdateDeviceList empty device table when packaged as part of a bundled distribution - #82
Open
hangzqcom wants to merge 1 commit into
Open
Conversation
hangzqcom
force-pushed
the
fix/tac-config-root-alpaca-fallback
branch
from
September 4, 2026 17:55
c7e2ab1 to
6f0f941
Compare
hangzqcom
requested review from
Biswajit Roy (Biswajee),
Arkojit Sen (arko816) and
Adnan Syed (asyed-qcom)
September 4, 2026 18:29
…ackaged as part of a bundled distribution applicationDataPath() only checked a single hardcoded ProgramData folder name (kAppName, i.e. the standalone TAC installer's own product name) as its fallback when the bin-relative "../../../../configurations/" path doesn't exist. Downstream distributions that bundle TAC together with other components under a different product folder name (installing devicelist.json under C:\ProgramData\Qualcomm\<BundleName>\configurations\ instead) hit this fallback and found nothing, leaving DeviceCatalog.exe's device table completely empty with no error feedback, and causing DevList.exe/UpdateDeviceList.exe to print "Failed to open C:/ProgramData/Qualcomm//configurations/devicelist.json". The bin-relative primary lookup was also fragile: it resolved relative to the process's current working directory at launch rather than the executable's own directory, which only worked by coincidence for specific dev-build launch layouts. Fix: 1. Anchor the bin-relative resolution to QCoreApplication::applicationDirPath() instead of the process's CWD. 2. After checking the standalone installer's own ProgramData folder (unchanged, exact prior behavior preserved), generically scan sibling folders under the shared Qualcomm ProgramData root for one that actually contains devicelist.json, without hardcoding any specific downstream distribution's product name. This directly ports the same fallback-scanning pattern already used successfully by the sibling EPM repository's epmConfigRoot() for the equivalent problem. Verified locally: - Standalone dev-tree build: table still resolves the bin-relative path correctly, unchanged from before this fix. - Isolated deployment simulating a bundled-distribution install layout (binaries copied to a directory with no nearby configurations folder, devicelist.json staged under a sibling ProgramData product folder with an arbitrary name different from kAppName): DeviceCatalog.exe's table correctly resolves and populates purely via the generic scan, confirmed by temporarily removing every other known ProgramData candidate folder to prove the resolution genuinely depends on nothing but the presence of devicelist.json under some sibling folder, not any hardcoded name. - DevList.exe under the same isolated deployment now prints the full device catalog instead of failing to open the file. Signed-off-by: Hang Zhao (QCT) <hangz@qti.qualcomm.com>
hangzqcom
force-pushed
the
fix/tac-config-root-alpaca-fallback
branch
from
September 5, 2026 21:49
6f0f941 to
dd9a7e6
Compare
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.
Problem
DeviceCatalog.exe's device table renders completely empty (0 rows, only columnheaders) when this repository is distributed as part of a larger bundled
distribution that installs it under a different product folder name than the
standalone installer. The same root cause also produces the console warning
Failed to open C:/ProgramData/Qualcomm//configurations/devicelist.jsonfromDevList.exeandUpdateDeviceList.exe.Root cause
src/libraries/qcommon-console/ConsoleApplicationEnhancements.cpp::applicationDataPath()only checked a single hardcoded ProgramData folder name (
kAppName, i.e. thestandalone installer's own product name) as its fallback when the bin-relative
"../../../../configurations/"path doesn't exist. A downstream distribution thatbundles this repository together with other components under a different product
folder name (staging
devicelist.jsonunderC:\ProgramData\Qualcomm\<BundleName>\configurations\instead) hits this fallbackand finds nothing.
USBDescriptors::load()fails silently when the file can't beopened (it records an internal
_lastErrorbut callers such asDeviceCatalog.cppnever surface it), so the table is simply left empty with noerror shown to the user.
The bin-relative primary lookup was also fragile: it resolved relative to the
process's current working directory at launch rather than the executable's own
directory, which only worked by coincidence for specific dev-build launch
layouts.
Fix
Rewrites
applicationDataPath()to:QCoreApplication::applicationDirPath()(not process CWD)looking for a sibling
configurationsfolder — fixes the launch-methodfragility.
exact prior behavior preserved), generically scan sibling folders under the
shared Qualcomm ProgramData root for one that actually contains
devicelist.json, without hardcoding any specific downstream distribution'sproduct name.
This directly ports the same fallback-scanning pattern already used successfully
by the sibling EPM repository's
epmConfigRoot()for the equivalent problem.Zero behavior change for the standalone installer path (the standalone
kAppNamecandidate is preserved unchanged and checked first); this is a pureadditive fix for any bundled-distribution deployment path.
Verification performed
build.bat— all targets compiled cleanly, no warningsintroduced.
DeviceCatalog.exedirectly from the dev buildtree — table populated, confirming the bin-relative path is unaffected.
configurationsfolder (simulating a bundled-distribution install layout),staged
devicelist.jsonunder an arbitrarily-named sibling ProgramDataproduct folder (a name unrelated to
kAppName), and confirmedDeviceCatalog.exe's table correctly resolves and populates purely via thegeneric scan.
some other hardcoded path) by temporarily removing every other known
ProgramData candidate folder from the test machine before re-running the
above check.
DevList.exeunder the same isolated deployment now prints the fulldevice catalog instead of failing to open the file.
confirmed
DeviceCatalog.exe, launched from the real installed productlocation, shows a fully populated device table.
No changes were made to any packaging/build tooling outside this repository —
the fix is entirely contained in this one function.