Summary: | Kate crash when writing a "let (...) in" block using Haskell-mode | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Ruben Astudillo <chivo.356> |
Component: | syntax | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | andriusmao, skreech2 |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Text that makes Kate crash
Quick (and possibly dirty) fix |
Confirmed, also on win32. this must be a bug in `kde4-config --prefix`/share/kde4/apps/katepart/script/haskell.js. maybe a loop that's running wild? i'm away until 14 february and won't be able to look at this until after i'm back. if any of you want to look at it, run “kdebugdialog” and enable debug output from “13050 kate (scripts)” and then enable debugging in the js file by setting debugMode to true in line 12. this should help pin-point the problematic area in the file. if you are able to fix it, please attach an updated version of haskell.js. :-) Created attachment 57292 [details]
Quick (and possibly dirty) fix
The loop at line 187 goes infinte.
A quick hack: adding check for positive line number fixes it :)
but I'm not sure if that was the only cause of this problem...
Git commit d11f5b173ff3640b7587cdd79297957d544f8312 by Erlend Hamberg. Committed on 28/02/2011 at 21:07. Pushed by ehamberg into branch 'master'. fix crash in haskell indenter when searching for a ���do���, the search could go above line 1. thanks to Jakub Jar����ek for the patch. BUG: 265145 M +3 -2 part/script/data/haskell.js http://commits.kde.org/kate/d11f5b173ff3640b7587cdd79297957d544f8312 *** Bug 269205 has been marked as a duplicate of this bug. *** |
Created attachment 56770 [details] Text that makes Kate crash Version: SVN (using KDE 4.6.0) OS: Linux before start i apologize for my English. on Kate 3.6 and KDE SC 4.6 while writing in the Haskell-mode a "let in" block, the main windows goes unusable using 100% of a core, this happens specifically at the end of the "let" line when you press enter Reproducible: Always Steps to Reproduce: 1. Open Kate and select Haskell from the Tools -> Mode -> Source Code -> Haskell (I'm translating from the Spanish options were it is "Herramientas -> Modo -> Codigo fuente -> Haskell 2. Copy and paste the following code, (also i am uploading as an attachment) -------------------------------------------------------------- elementAt :: [a] -> Int -> a elemenAt xs num = let halp :: [a] -> Int -> Int -> a halp (x:xs) num meta = if (num /= meta) then (halp xs (num + 1) meta) else (head xs) in (halp xs 1 num) ---------------------------------------------------------------------- 3. Put the cursor at the end of the second line (the one with the "let" word on it) and press enter, it should trigger the bug Actual Results: the Gui goes unusable ,and the process start using 100% of a core Expected Results: it should only start a new line