Summary: | [unit test] crash in KateViewInternal::viewLineOffset() | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Dominik Haumann <dhaumann> |
Component: | part | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | christoph |
Priority: | NOR | Keywords: | testcase |
Version: | Git | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.11 | |
Sentry Crash Report: | |||
Attachments: | file to reproduce the crash |
Description
Dominik Haumann
2013-01-23 15:19:04 UTC
Created attachment 76667 [details]
file to reproduce the crash
reproduce as follows:
1. open kwrite, resize window to 1280x1000 pixel
2. open test file "crash.cpp"
3. <cursor down><cursor down><ctrl+shift+end><ctrl+shift+cursor-up>
4. <ctrl+pos1>
5. <ctrl+shift+minus>
6. undo, redo, undo
The last undo crashes Kate Part.
If it does not crash Kate, try this:
- enable dynamic word wrap
- make sure the width of the view is wide enough so that no line is dynamically wrapped
- make sure the height of the window is small enough, so that the vertical scrollbar is active
- vary the width / height of kwrite, then try step 1-6 again.
Git commit 30acc3aaaf10b42167dfb9144938f6a82b88384f by Dominik Haumann. Committed on 24/01/2013 at 15:14. Pushed by dhaumann into branch 'master'. add unit test for crash 313769 enable dynamic word wrap 1. open kwrite, resize window to 900x1000 pixel 2. open test file "data/bug313769.cpp" 3. <cursor down><cursor down><ctrl+shift+end><ctrl+shift+cursor-up> 4. <ctrl+pos1> 5. <ctrl+shift+minus> 6. undo, redo, undo M +11 -0 part/tests/CMakeLists.txt A +95 -0 part/tests/bug313769.cpp [License: LGPL (v2+)] A +40 -0 part/tests/bug313769.h [License: LGPL (v2+)] A +74 -0 part/tests/data/bug313769.cpp [License: UNKNOWN] * The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/kate/30acc3aaaf10b42167dfb9144938f6a82b88384f Could you try to update this unit test for the new folding code? Git commit 078f0bc871cd77cf91f99803247e47eda899202b by Dominik Haumann. Committed on 11/04/2013 at 21:46. Pushed by dhaumann into branch 'master'. enable folding unit test again With the previous folding code, this lead to a crash due to invalid KateViewLine access. What to do, remove unit test? M +8 -8 tests/CMakeLists.txt M +13 -8 tests/bug313769.cpp http://commits.kde.org/kate/078f0bc871cd77cf91f99803247e47eda899202b To me it looks like the the expression in the assert statement Q_ASSERT(thisLine.virtualLine() == (int) doc()->getVirtualLine(virtualCursor.line())); now is true, implying that previously we the folding very likely lead to this mismatch. Should we even remove the unit test, as we actually do not really know what it now tests? ;) |