gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [版本 10.0.26200.7171]
### WSL Version
WSL 版本: 2.6.1.0 内核版本: 6.6.87.2-1 WSLg 版本: 1.0.66 MSRDC 版本: 1.2.6353 Direct3D 版本: 1.611.1-81528511 DXCore 版本: 10.0.26100.1-240331-1435.ge-release Windows: 10.0.26200.7171
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
Linux version 6.6.87.2-microsoft-standard-WSL2 (root@439a258ad544) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025
### Distro Version
22.04
### Other Software
### Repro Steps
cc-switch
(cc-switch:647): Gtk-CRITICAL **: 08:45:31.860: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
(cc-switch:647): Gtk-CRITICAL **: 08:45:31.860: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
### Expected Behavior
正常显示GUI
### Actual Behavior
cc-switch
(cc-switch:647): Gtk-CRITICAL **: 08:45:31.860: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
(cc-switch:647): Gtk-CRITICAL **: 08:45:31.860: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
### Diagnostic Logs
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report only identifies WSL 2 on Ubuntu 22.04, WSLg, and a cc-switch GTK assertion; no repository file or test is named. Begin by reproducing cc-switch in this environment and collecting diagnostic logs, then trace the relevant WSLg startup path. Done means the assertion is explained and the GUI displays normally without the repeated critical messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100