Bug 500068 - Kate crashes on return key in Ruby Highlight mode
Summary: Kate crashes on return key in Ruby Highlight mode
Status: RESOLVED UPSTREAM
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: unspecified
Platform: macOS (DMG) macOS
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-14 14:00 UTC by ronaldotto
Modified: 2025-02-24 08:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Crash report produced (50.84 KB, text/plain)
2025-02-14 14:00 UTC, ronaldotto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ronaldotto 2025-02-14 14:00:21 UTC
Created attachment 178362 [details]
Crash report produced

SUMMARY

In Kate 25.3.70:
If I set the syntax highlight mode to Ruby, Kate crashes as soon as I hit the ENTER key during entering text. 

Color theme: ayu Light (However the bug does not seem to depend on the theme)
Application Style and Window Color Scheme set to Default

STEPS TO REPRODUCE
1. Create a new file.
2. Enter a few lines of Ruby code, for instance "require 'xyz'"
3. Save the file under a name with the extension .rb; this makes the Highligher assume Ruby code, and the text entered so far is syntax coloured.
4. Add new text. Type the RETURN key to open a new line.


OBSERVED RESULT
 Kate crashes reproducibly on my Intel-based Macbook.


EXPECTED RESULT
No crash. New line should be inserted into document.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 12.7.3
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Waqar Ahmed 2025-02-14 15:55:49 UTC
Its crashing inside Qt 6.10. We can't do anything about this. Qt 6.10 is unreleased so there will be some instabilities.

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   ???                           	       0x1147c2000 ???
1   QtQml                         	       0x105bcede4 0x1059e0000 + 2026980
2   QtQml                         	       0x105b0902b 0x1059e0000 + 1216555
3   QtQml                         	       0x105aab2a6 QJSValue::callAsConstructor(QList<QJSValue> const&) const + 422
4   libKF6TextEditor.6.10.0.dylib 	       0x10293e26c 0x10288c000 + 729708
5   libKF6TextEditor.6.10.0.dylib 	       0x10293ecbb KateScriptDocument::anchor(int, int, QChar) + 43
Comment 2 Christoph Cullmann 2025-02-14 16:03:03 UTC
Mnn, not sure about that , is that not just KF 6.10? Still, the crash seems to be in the QJSEngine, don't think we can fix that ourself.
Comment 3 Waqar Ahmed 2025-02-14 16:15:01 UTC
Oh indeed. mixed up the version with KF. Its Qt 6.8 it seems.

Also, can't reproduce that on linux at least.
Comment 4 Waqar Ahmed 2025-02-14 16:29:12 UTC
We dont have macOS testing... so things suck a little bit.
Comment 5 Jyrki Gadinger 2025-02-24 08:33:52 UTC
From what I can tell this is https://bugreports.qt.io/browse/QTBUG-131957, which really only affects Qt 6.8.1 on Intel macs (interestingly enough this works fine with Rosetta2, so to reproduce that you need to run it on a real one...)

fwiw, this affects **all** applications using the JS engine on macOS with 6.8.1.  Seems it's fixed with 6.8.2, but the Craft binary cache doesn't have it yet ...