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

Crash on interface scale adjustment #28354

Closed
lexcyn opened this issue Sep 5, 2024 · 6 comments
Closed

Crash on interface scale adjustment #28354

lexcyn opened this issue Sep 5, 2024 · 6 comments
Labels

Comments

@lexcyn
Copy link

lexcyn commented Sep 5, 2024

Steps to reproduce

Build Telegram from source (in this case I am building the ARM64 version in Windows)
Go into Settings
Adjust default interface scale

Expected behaviour

Scale should change and ask you to restart the client

Actual behaviour

Telegram crashes with the following error
Screenshot 2024-09-04 225050

Attached log.txt
log.txt

Operating system

Windows 11 24H2 (ARM64)

Version of Telegram Desktop

5.4.6

Installation source

Other (unofficial) source

Crash ID

No response

Logs

No response

@lexcyn lexcyn added the bug label Sep 5, 2024
@lexcyn
Copy link
Author

lexcyn commented Sep 5, 2024

Note that the last working version is 5.4.4.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Sep 5, 2024

log.txt won't really help here... You got a breakpoint so you need Visual Studio's debugger to find where that variable resides at.

@lexcyn
Copy link
Author

lexcyn commented Sep 5, 2024

log.txt won't really help here... You got a breakpoint so you need Visual Studio's debugger to find where that variable resides at.

Seems like an issue with QT 6.8 in qdrawhelper.cpp, specifically the ARM NEON instructions:

#elif defined(__ARM_NEON__)
        const int16x8_t colorMask = vdupq_n_s16(0x00ff);
        const int16x8_t invColorMask = vmvnq_s16(colorMask);
        const int16x8_t v_256 = vdupq_n_s16(256);
        const int16x8_t v_disty = vdupq_n_s16(disty4);
        const int16x8_t v_disty_ = vshlq_n_s16(v_disty, 4);
        int32x4_t v_fdx = vdupq_n_s32(fdx*4);

        int32x4_t v_fx = vmovq_n_s32(fx);
        v_fx = vsetq_lane_s32(fx + fdx, v_fx, 1);
        v_fx = vsetq_lane_s32(fx + fdx * 2, v_fx, 2);
        v_fx = vsetq_lane_s32(fx + fdx * 3, v_fx, 3);

        const int32x4_t v_ffff_mask = vdupq_n_s32(0x0000ffff);
        const int32x4_t v_fx_r = vdupq_n_s32(0x0800);

        while (b < boundedEnd - 3) {
            uint32x4x2_t v_top, v_bot;

            int x1 = (fx >> 16);
            fx += fdx;
            v_top = vld2q_lane_u32(s1 + x1, v_top, 0); < this is the break point
            v_bot = vld2q_lane_u32(s2 + x1, v_bot, 0);

@john-preston
Copy link
Member

@lexcyn Good thing we don't have an official native ARM build =)

@lexcyn
Copy link
Author

lexcyn commented Sep 5, 2024

@lexcyn Good thing we don't have an official native ARM build =)

True, but I'm trying my best to see an ARM build happen :) Since the issue falls on QT I will close this bug and report it on the QT bug tracker. Too bad though, with QT 6.7.2 it was working (currently running 5.4.4 arm build with no issues)

Created https://bugreports.qt.io/browse/QTBUG-128667

@lexcyn lexcyn closed this as completed Sep 5, 2024
@ilya-fedin
Copy link
Contributor

I wonder if anyone would spot that before Qt's final release if tdesktop hasn't updated to the beta version (this happens not always)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants