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

Incorrect font paths in preferences crash rather than gracefully degrading #707

Open
quantumdude836 opened this issue Mar 24, 2024 · 1 comment
Labels
bug Something isn't working core Core application logic

Comments

@quantumdude836
Copy link

quantumdude836 commented Mar 24, 2024

Version 0.1-dev+b589830, Windows 10

When trying to add a new waveform via Add -> Import -> WAV and selecting a WAV file, ngscopeclient crashes with a SIGSEGV.

Traced it down to a null pointer dereference in WaveformGroup::RenderTimeline; specifically, the default timeline font preference (in my case, "Alef Bold", the first alphabetically in my system's installed fonts list) is not found by the main window's font manager (which only seems to list builtin DejaVu Sans fonts).

Furthermore, when trying to change the font (Appearances -> Timeline -> X axis font), I noticed duplicate entries for DejaVu Sans fonts (since I also have the font family installed natively); selecting the first of each duplicate still causes a crash, and I'm unable to select the second.

@quantumdude836
Copy link
Author

Did some experimenting/debugging...

Looks like I still had some stale preferences (in %APPDATA%) from an older build that had the builtin fonts pointing to a different directory. After I removed the stale files, the default font winds up as "DejaVu Sans" which avoids the original crash.

However, on a debug build, I still get an assert if I select an installed font, probably because ImFontAtlas::AddFontFromFileTTF is only given the file name, not the full path. Not sure if that should be opened as a separate issue.

@azonenberg azonenberg changed the title SIGSEGV when adding waveform import Incorrect font paths in preferences crash rather than gracefully degrading Mar 25, 2024
@azonenberg azonenberg added bug Something isn't working core Core application logic labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Core application logic
Projects
None yet
Development

No branches or pull requests

2 participants