pencil2d / pencil

Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
http://pencil2d.org
GNU General Public License v2.0
1.48k stars 273 forks source link

app crashes when opening settings #1850

Closed sfepa closed 4 months ago

sfepa commented 5 months ago

Issue Summary

Pencil2d crashes when trying to open settings menu

### Actual Results - ### Expected Results - ### Steps to reproduce Start the program --> Edit --> Settings -->... ### System Information + Pencil2D Version: 0.7.0.911 + Operating System: Fedora Linux 40 , KDE Plasma 6.1 (Wayland) + RAM Size: 16Gb + Graphics Tablet: HUION GT220 v2
MrStevns commented 5 months ago

Thanks for the report sfepa

Would you be able to provide a stacktrace of the crash too?

I don't have a Fedora image running currently but I tested it on another linux distribution and it works as expected for me.

J5lx commented 4 months ago

This issue appears to be caused by translations in certain languages such as German, Czech or Bulgarian when running on Wayland. I haven’t nailed it down 100%, but what I assume happens is that if certain translations are too long, it messes with the layout of the preferences dialog and causes its minimum width to exceed its maximum width. Current versions of Qt are capable of dealing with this type of situation, but the older version bundled in our AppImages sends these invalid size constraints directly to the Wayland compositor, which then results in a protocol error (“xdg_toplevel@34: error 2: minimum width can't be bigger than the maximum width”) and causes the program to abort.

I can’t say for sure which string(s) are problematic, but I have a certain feeling they might be from the shortcuts page (screenshot made with newer version of Qt):

Screenshot_20240627_091717

Aside from the crash, some other pages also look kinda broken because of this (note the window in the following screenshot is horizontally unresizable):

Screenshot_20240627_092221

While investigating this issue, I also noticed an unrelated problem with the restart dialog when changing the language, which is now completely empty when the new language does not have a translation for that string :grimacing:

Screenshot_20240627_092704

sfepa commented 4 months ago

It seems that language is indeed the cause of this problem. The program was launched with a translation into Russian (which is strange, the system language is English), and I just wanted to change the language. Now I downloaded the old version of the program, changed the language in it, and restarted the new one, everything works fine.