Lua trying to get length of nil because apps correctly sent nil data to signal that they don't have the asset, but ffi rewrite totally forgot to check that. Solution: use a separate method on lua side to signal that app doesn't have the asset.
assertion crashes if asset requests an offset+length that is > total_size. Solution: Respond with an error instead of crashing
Found it!