You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some corner cases, DefaultStore.GetBlock<T>() can return null while DefaultStore.ContainsBlock() returns true. For example, the following error log was caused due to this corner case:
System.NullReferenceException: Object reference not set to an instance of an object.
at Libplanet.Blocks.BlockMarshaler.MarshalBlock[T](Block`1 block) in C:\libplanet\Libplanet\Blocks\BlockMarshaler.cs:line 149
at Libplanet.Net.Swarm`1.TransferBlocks(GetBlocks getData) in C:\libplanet\Libplanet\Net\Swarm.MessageHandlers.cs:line 252
at Libplanet.Net.Swarm`1.ProcessMessageHandler(Object target, Message message) in C:\libplanet\Libplanet\Net\Swarm.MessageHandlers.cs:line 70
at Libplanet.Net.Transports.NetMQTransport.<>c__DisplayClass59_0.<ReceiveMessage>b__0() in C:\libplanet\Libplanet\Net\Transports\NetMQTransport.cs:line 576
The exception was thrown from the line 252 of the below code:
In some corner cases,
DefaultStore.GetBlock<T>()
can returnnull
whileDefaultStore.ContainsBlock()
returnstrue
. For example, the following error log was caused due to this corner case:The exception was thrown from the line 252 of the below code:
libplanet/Libplanet/Net/Swarm.MessageHandlers.cs
Lines 249 to 252 in 25c385d
It shows there is a case where
_store.ContainsBlock(hash)
returnstrue
while_store.GetBlock<T>(..., hash)
returnsnull
.Although I experienced this case with
DefaultStore
, it can be a bug ofBaseStore
, orRocksDBStore
may have a similar bug too.The text was updated successfully, but these errors were encountered: