naemon / naemon-livestatus

Naemon - Livestatus Eventbroker Module
GNU General Public License v2.0
26 stars 30 forks source link

fix g_tree_foreach: assertion `tree != NULL' failed #103

Closed sni closed 1 year ago

sni commented 1 year ago

When requesting logs without specifing columns, the result contains hostlists. But since not all log entries do have hosts, this leads to a g_tree_foreach for a null tree. Checking the tree before calling g_tree_foreach fixes this issue.

might be related to #29 and #28

sni commented 1 year ago

do have any idea what's wrong with the unit tests? Seems unrelated to this PR.

jacobbaungard commented 1 year ago

Yes it looks unrelated. I think the ruby gem: nokogiri:1.6.0 doesn't work with Ruby 3 which seems to be the default ruby version on Ubuntu22 (the tests goes for ubuntu-latest - the latest successful tests ran with Ubuntu20 but this one goes with 22). Quickest way to get it passing is probably to downgrade to Ubuntu20 for now.

It would of course be nice to upgrade our dependencies to work on Ubuntu22 - I am already off for the holidays, but could take a look in the new year.

sni commented 1 year ago

enjoy your vacation, no need to rush things here :-)

sni commented 1 year ago

switched to ubuntu 20.04 for now. We can fix that in a separate PR