Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed when using precise scrolling #46

Closed
alexey-lysiuk opened this issue Nov 22, 2014 · 3 comments
Closed

Assertion failed when using precise scrolling #46

alexey-lysiuk opened this issue Nov 22, 2014 · 3 comments

Comments

@alexey-lysiuk
Copy link

By opening any large enough file and using precise scrolling, the HexFiend breaks with this:
Assertion failed: (range.location >= 0), function -[HFController setDisplayedLineRange:], file HFController.m, line 288.

The problem is that the value of HFController.lineHeight is zero, and it is used as a divisor in [HFController scrollWithScrollEvent] at line 1197, leading to NaN passed as parameter to [HFController scrollByLines].

I am using Debug configuration, compiled with Xcode 6.1 and running on OS X 10.10.

@alexey-lysiuk
Copy link
Author

Call stack:

HexFiend`-[HFController setDisplayedLineRange:](self=0x0000000163f39f00, _cmd=0x000000010014344b, range=<unavailable>) + 93 at HFController.m:288
HexFiend`-[HFController scrollByLines:](self=0x0000000163f39f00, _cmd=0x00007fff966204c9, lines=NaN) + 525 at HFController.m:1167
HexFiend`-[HFController scrollWithScrollEvent:](self=0x0000000163f39f00, _cmd=0x0000000100144239, scrollEvent=0x000000016f6c6f60) + 553 at HFController.m:1199
HexFiend`-[HFTextRepresenter scrollWheel:](self=0x0000000163eadfb0, _cmd=0x00007fff8bd5f83c, event=0x000000016f6c6f60) + 58 at HFTextRepresenter.m:225
HexFiend`-[HFRepresenterTextView scrollWheel:](self=0x0000000163ecfe50, _cmd=0x00007fff8bd5f83c, event=0x000000016f6c6f60) + 58 at HFRepresenterTextView.m:1933
AppKit`-[NSWindow _reallySendEvent:] + 4211
AppKit`-[NSWindow sendEvent:] + 368
AppKit`-[NSApplication sendEvent:] + 2009
AppKit`-[NSApplication run] + 711
AppKit`NSApplicationMain + 1832

@kainjow
Copy link
Member

kainjow commented Nov 26, 2014

I see this. The question is why is lineHeight 0? Something seems broken here.

@kainjow
Copy link
Member

kainjow commented Nov 26, 2014

Should be fixed in 710c985. Please verify.

@kainjow kainjow closed this as completed Nov 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants