(Sorry about the summary, the field is length-limited)?
When the editor's MaxScrollPos() is 0, ScintillaCocoa::SetVerticalScrollPos() will happily divide topLine by it, resulting in NaN. Passing that to setVerticalScrollPosition will raise an ObjC exception and crash; the attached patch checks that case and just sets the scroll position to 0 instead.
There may be a similar case in setting the horizontal position, but I haven't confirmed it yet... Also, while I've managed to build the sample, I haven't been able to trigger the crash without the patch; I'm suspecting that it wasn't built with CoreAnimation, but I haven't confirmed it yet.
Log in to post a comment.