Warn on null pointer in callback in Font.cpp - #2191
Conversation
|
hm yeah can you catch where in the library the problem is coming from? https://github.com/Chlumsky/artery-font-format/blob/af79386abe0857fe1c30be97eec760dbd84022c5/artery-font/serialization.hpp#L109 maybe something about the footer? I think we’re safe to just ignore possibly related to https://github.com/overte-org/overte/pull/937/changes#r1567943126 |
Dang, I was hoping you'd know something about this, because I hate everything about this library. It's all in a header, there's that #define mess, no comments and no documentation I can find. How did you figure out how to use this thing? Is there docs somewhere? I don't think it's the footer, because in what circumstances would |
haha trial and error and luck. iirc I had found some other projects that used it and based our solution off of those, but the versions were all slightly different and there was some weirdness with Qt yeah you're right that doesn't make sense. must be one of the other fields for whatever reason. I'll try to investigate more at some point but I think this solution is totally sufficient |
This was found by the address sanitizer, see below:
I added some debug info, which results in this pattern of calls:
Turns out passing a 0 as the first argument to memset isn't supposed to be done.
I'm not sure if this is a bug in the library or an indication of something special that should be reacted to in a special manner. Maybe an "end" indication. If that's it, then we should just remove the logged warning.
@HifiExperiments I think you should have a better idea of how this is supposed to work, your feedback would be great.