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

Multiple failures if a timezone is not configured on a system or if tzdata not installed #1291

Open
fedegiova opened this issue Jul 31, 2024 · 0 comments
Labels

Comments

@fedegiova
Copy link

lnav version
v0.12.2 is the latest

Describe the bug
I found that on an embedded system if the tzdata is not installed lnav will fail in the following ways:

  • : command to enter the prompt will close the application
  • opening any logs that require time conversion will close the application as well

I've traced them to exceptions thrown by the data::tz library, and I've also tried to handle them, but since I'm not sure if this software will possibly work without such a basic data (without producing misleading results) my proposal is to just make it a definitive error and close the application. This is partially handled by catching the exception log_error("failed to setup tz: %s", e.what()); at lnav.cc but since the log file is huge it's easy to miss it. It'll be probably better to just exit and ask the user to fix its broken system.

Also the CMake recipe is missing an add_definitions(-DUSE_OS_TZDB=1 -DHAS_REMOTE_API=0) that's present in the makefile one.

Thank you for your work.

@fedegiova fedegiova added the bug label Jul 31, 2024
tstack added a commit that referenced this issue Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant