Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the crash on application launch under Windows #1252

Merged
merged 2 commits into from
Nov 22, 2024
Merged

Conversation

veloman-yunkan
Copy link
Collaborator

@veloman-yunkan veloman-yunkan commented Nov 21, 2024

Fixes #1235

Other noticed issues (that should be fixed in separate PRs):

It looks like the bug was not triggerred under Linux due to a different
order of function calls (because of some peculiarity of concurrent
execution and/or signal processing).
The bug itself happens due to initialization&update of MultiZimButton (via
established signal/slot connections) at a time when the main application
window hasn't yet been shown and the dimensions of various widgets are
bogus. The end result is that a too narrow menu leads to the elided text
string being empty which was outside of the assumptions of the
getElidedText() function.
Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't built/tested but LGTM ; thank you

Copy link
Collaborator

@ShaopengLin ShaopengLin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The chopped change isn't a hack as it is indeed something we need to handle. Not sure why they would leave it as undefined behaviour tho...

Note: The behavior is undefined if len is negative or greater than size().

@kelson42
Copy link
Collaborator

Please open the two issues, IMHO they are both blockerw for 2.5.0.

@veloman-yunkan
Copy link
Collaborator Author

The chopped change isn't a hack as it is indeed something we need to handle.

@ShaopengLin That fix is a hack since its only purpose is to prevent a crash. It doesn't make any sense to elide text in such a way.

@veloman-yunkan
Copy link
Collaborator Author

Please open the two issues, IMHO they are both blockerw for 2.5.0.

Done (#1253, #1254)

@kelson42 kelson42 merged commit 955c1d5 into main Nov 22, 2024
6 checks passed
@kelson42 kelson42 deleted the fix_for_issue_1235 branch November 22, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2024-11-05 nightly is broken on windows
4 participants