fix(crash): the crash window's middle button reads "Log folder", drawn whole on a scaled screen #1062
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1062
Loading…
Reference in a new issue
No description provided.
Delete branch "d4nkn3ss/Longshot:fix/crash-window-button-label"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: fix · Risk: low · Tested on: Windows 11, RTX 3080 · Needs: Linux, any GPU
Why
On a scaled Windows screen the crash window's middle button reads "pen the log fold": its label, "Open the log folder", is cut at both ends. A player who just had a crash sees a broken window. SDL's message box gives every button the width the longest label needs, and it measures that label narrower than it draws it. Changing the helper's DPI awareness made no difference (tried; see #1058). Fixes #1058.
How to reproduce
Seen on: Windows 11, RTX 3080 (NVIDIA 621.14), a 4K screen with display scaling on
Settings and switches: none
Steps: show the crash window:
longshot --crash-show <record> <game folder> <log> <options>with a crash record in<game folder>/bug-reports/pending, or start after a crashExpected: three buttons, each label whole
Actual: "Report", "pen the log fold", "Close"
What changed
The middle button's label is "Log folder", which is drawn whole at the same scale. It does the same thing as before.
host/hos_crash_dialog.cshow():{"Report", "Log folder", "Close"}, with a comment saying why the labels stay short. The file's header comment follows.docs/common-issues.mdanddocs/development.mdname the button as it now reads.tests/test_crash_buttons.py(new): readsshow()'s three labels and wants each at 12 characters or fewer. It fails on main.tests/test_crash_dialog.py: one assertion message names the button anew (its check is unchanged).Measurements
Verdict: fixed: the button reads "Log folder", whole, where main shows "pen the log fold".
Hardware: Windows 11 Pro 26300, RTX 3080 10 GB (NVIDIA 621.14), i9-12900K, 64 GB, a 4K screen with display scaling (the window 2844 px wide)
Scene: the crash window, shown with
--crash-showfrom a scratch game folder's crash record and logMethod: each build's
longshot.exe, its window captured (the window's rectangle only)Baseline: main's side is main @ 1764fed2's build; this PR is on main @
bbe421f5.git diff 1764fed2 bbe421f5 -- host/hos_crash_dialog.cis empty.How to reproduce: the steps above on a scaled screen
1764fed2a1f80028Flags and settings
None
Testing
Tested:
a1f80028) and of main's, as above.python -I -B tests/run_all.pyfrom PowerShell with llvm-mingw from the Longshot Builder: 603 passed, 19 failed, 42 skipped. The 19 fail on main too:test_auto_handheld,test_bug_report_defaults,test_crash_dialog(on Windows; #1012),test_crt_options,test_fsr_uniform_ownership,test_guest_imported,test_import_reach,test_linux_preflight,test_make_game_cache,test_missing_nup,test_pads_after_menu,test_parallel_init_order,test_pending_guest_import,test_release,test_replay_write_order,test_run_all_changed,test_tested_configurations,test_vk_occlusion_queriesandtest_walk_key.Not tested: Linux's message box (SDL there too), and an unscaled Windows screen, where the old label already fit.
Must be tested:
python -I -B tests/run_all.py test_crash_buttons test_crash_dialog, expecting both to pass (by hand: the checks' lines)Risks
What could break: nothing but the label: the button does the same thing.
Turning it off: revert the commit.
Compatibility: The crash window's middle button reads "Log folder".
Issues
Fixes #1058
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
Tested in game: Windows 11, RTX 3080 (NVIDIA 621.14), 4K screen with display scaling: the crash window of this build's longshot.exe (
a1f80028) via --crash-show shows Report, Log folder, Close whole; main's cuts the middle one to 'pen the log fold'WIP: fix(crash): the crash window's middle button reads "Log folder", drawn whole on a scaled screento fix(crash): the crash window's middle button reads "Log folder", drawn whole on a scaled screenCode-only review of
a1f80028c0; informational findings, with final approval left to another reviewer.No introduced correctness defect found. The change preserves the button IDs, Report/Close behavior, the log-folder action and the native fallback; it only shortens the displayed label and updates its documentation.
The author reports a successful before/after check on scaled Windows 11. The remaining Linux checks explicitly listed under Must be tested still need results. Please also attach the already captured before/after window images to the description, as required for this visible change. The new character-count check catches restoration of the old label, but cannot establish rendered width across fonts or display scales; its 12-character limit is a source guard, not a general clipping guarantee.
Merge coordination: PR 141 and PR 983 replace this dialog's button array with reporting options. Preserve the short log-folder label and adapt this new source-extraction check when integrating either replacement.
Read the complete diff, dialog dispatch/fallback, existing action test, new label check and overlapping dialog changes. No tests, builds or application runs performed.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.