cinderblocks / libremetaverse

An fork of the libopenmetaverse library striving for performance improvements and up-to-date compatibility with SL/OS/Halcyon
BSD 3-Clause "New" or "Revised" License
60 stars 40 forks source link

_packetInbox unexpectedly null under certain sequence of events #80

Closed aiwaiwa closed 1 week ago

aiwaiwa commented 1 year ago

This is observed after a (vaguely observed) failed teleport event and an attempt to log out when the network seems to already log out the avatar. The evidence of this is a log message Ignoring RequestLogout(), client is already logged out that precedes the outcome below in the NetworkManager public void Shutdown(DisconnectType type, string message).

image

Knowing how flimsy the logging out and teleporting is, I wonder if this can be somehow addressed internally in the library, or rather it would be advisable to intercept the error on a higher level?

The stack seems to begin with the Logout():

    LibreMetaverse.dll!OpenMetaverse.NetworkManager.Shutdown(OpenMetaverse.NetworkManager.DisconnectType type, string message) Line 856 C#
>   LibreMetaverse.dll!OpenMetaverse.NetworkManager.Logout() Line 729   C#
cinderblocks commented 1 week ago

Just going to ignore the exception. If the packetInbox is already destroyed and we're shutting down, it's a non-issue, teardown fragility aside. Resolved with def5ea19