Skip to content

Log replay crashes if a struct or protobuf is set to null #261

@Kevok93

Description

@Kevok93

Describe the bug
If at any point an @AutoLogged object contains a struct or protobuf field who is set to null, then the generated @AutoLogged fromLog() will attempt to call LogTable.get(key, null). When this happens, LogTable.get() will check the typestring from the table, and if it is struct: or proto:, call null.getClass() to determine the type of the struct or protobuf, and crash.

To Reproduce

Twist2d data = null;
var table = new LogTable(0);
table.put("test", Twist2d.proto, data);
table.get("test", data);

Expected behavior
LogTable.get(key, null) should not crash

Version (required):
26.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions