GNOME Bugzilla – Bug 791042
Critical warnings on startup
Last modified: 2018-01-24 18:42:57 UTC
I'm trying to get Epiphany to work using libhttpseverywhere once again. But I'm seeing a bunch of criticals inside HTTPSEverywhere.Context.init. Here's a backtrace taken with G_DEBUG=fatal-criticals. Notice that Looks like parser.get_root() is returning null in Context.load_rulesets()... I assume that's bad.
+ Trace 238207
i observed that passing a) empty files b) files consisting only of whitespace cause these errors in json-glib i added a check for file sizes of 0 bytes. if this happens, they are yield a simple warning, too. see commit 7264476 for this. all other checks i would have to perform to mitigate the critical would require me to read the file before passing it, doubling the time reading from disk. i'd rather hand this issue upstream to json-glib where this could probably be handled better. for libhttpseverywhere (and epiphany) it is now to decide how chances are that this happens in reallife and how bad it would be. the case we are checking for is an update that went wrong. either it unpacked no data. 0-length rulefiles are now checked correctly for. a corrupted download may put some incorrectly decoded data into the file which will also trigger a warning. i think unpacking a string that consists only of whitespace from corrupted data is not likely.
(In reply to grindhold from comment #1) > i think unpacking a string that consists only > of whitespace from corrupted data is not likely. Yeah, I wouldn't worry about that. The question is: why was libhttpseverywhere creating zero-byte files? :/
ultimately fixed as of f45b0dc