Summary: | Crash when opening PHP file | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-ktexteditor | Reporter: | Kai Uwe Broulik <kde> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | christoph, vkrause |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/syntax-highlighting/9cfb8fa9a684917362b6a5ca99e099f5a4353ae6 | Version Fixed In: | |
Sentry Crash Report: |
Description
Kai Uwe Broulik
2018-08-20 14:14:27 UTC
It's an assert in debug builds three lines up already: ASSERT: "it != m_formatsIdToIndex.end()" in file /k/kde5/src/ktexteditor/src/syntax/katehighlight.cpp, line 258 That means a Format arrives that was not seen for the definition and all its included ones. I thought this was fixed during Akademy. But yeah, it crashs even with the unit test input :/ I register in the constructor only ids: id 1 id 2 id 3 id 4 id 5 id 6 id 7 id 8 id 9 id 10 id 11 id 12 id 56 id 57 id 58 id 59 id 60 id 142 id 143 id 144 id 145 id 146 id 147 id 148 id 149 id 150 id 151 id 152 id 153 id 154 id 155 id 156 id 157 id 158 id 159 id 160 id 161 id 162 id 163 id 164 id 165 id 166 id 167 id 168 id 169 id 170 id 171 id 172 id 173 id 174 id 175 id 176 id 177 id 178 id 179 id 180 id 181 id 182 id 183 id 184 id 185 id 186 id 187 id 188 id 35 id 36 id 37 id 38 id 39 id 40 id 41 id 42 id 43 id 44 id 45 id 46 id 47 id 48 id 49 id 50 id 51 id 52 id 53 id 54 id 55 id 120 id 121 id 122 id 123 id 124 id 125 id 126 id 127 but we get (gdb) print format.id() $3 = 15 Have a fix. Request here https://phabricator.kde.org/D14952 Git commit 9cfb8fa9a684917362b6a5ca99e099f5a4353ae6 by Christoph Cullmann. Committed on 20/08/2018 at 16:59. Pushed by cullmann into branch 'master'. Fix includedDefinitions, handle definition change in context switch AcceptedPublic Fix includedDefinitions, handle definition change in context switch. They were missing, see PHP/HTML. I cleaned up the code a bit to just use QVector, no need for a queue, the order is anyways arbitrary (but stable). Differential Revision: https://phabricator.kde.org/D14952 M +10 -5 autotests/syntaxrepository_test.cpp M +19 -15 src/lib/definition.cpp https://commits.kde.org/syntax-highlighting/9cfb8fa9a684917362b6a5ca99e099f5a4353ae6 |