KDevelop crashes in Kasten2::ByteArrayView::init when trying to open an empty file, after clicking away the alert this file cannot be opened. Reproducible: Always Steps to Reproduce: 1. Open a project that contains an empty file. 2. Double-click that file in the Project toolview 3. Accept the dialog warning that the file cannot be opened Actual Results: crash Expected Results: No crash, and maybe a window on the empty file, ready to fill it. This is the backtrace I get: ``` #0 0x0000000123cd0594 in Kasten2::ByteArrayView::init () #1 0x0000000123cd0b7b in Kasten2::ByteArrayView::ByteArrayView () #2 0x0000000123c91087 in KDevelop::OktetaView::OktetaView (this=0x13d9f7050, document=<value temporarily unavailable, due to optimizations>, viewProfileSynchronizer=0x13e64d440) at /Volumes/Debian/MP6/var/macports/build/_Volumes_Debian_MP6_site-ports_kde_kdevelop-git/kdevelop-git/work/kdevelop-git-4.7.0/utils/okteta/oktetaview.cpp:39 ```
NB: the file in question is called Info.plist.template.orig, and was created by applying a patch to a project open in a running KDevelop session. Empty files created through KDevelop do not cause a crash.
Reproducible in 5.0?
No, not even with 4.7.3 in fact. Or it depends on the type of the empty file, which sadly I didn't record in my initial report.