@@ -575,6 +575,7 @@ public void Objects_ObjectUpdate(object? sender, OMV.PrimEventArgs args) {
575575 try {
576576 if ( rcontext . TryGetCreateEntityLocalID ( args . Prim . LocalID , out updatedEntity , delegate ( ) {
577577 // code called to create the entry if it's not found
578+ m_log . Log ( KLogLevel . DUPDATEDETAIL , "ObjectUpdate: creating new entity for local ID {0}" , args . Prim . LocalID ) ;
578579 updateFlags |= UpdateCodes . New ;
579580 updateFlags |= UpdateCodes . Acceleration | UpdateCodes . AngularVelocity | UpdateCodes . Velocity ;
580581 return m_InstanceFactory . CreateLLPhysical ( GridClient , args . Prim , rcontext , LLLPAssetContext ) ;
@@ -687,6 +688,7 @@ public void Objects_AttachmentUpdate(object? sender, OMV.PrimEventArgs args) {
687688 UpdateCodes updateFlags = UpdateCodes . FullUpdate ;
688689 IEntity ent ;
689690 if ( rcontext . TryGetCreateEntityLocalID ( args . Prim . LocalID , out ent , ( ) => {
691+ m_log . Log ( KLogLevel . DUPDATEDETAIL , "OnNewAttachment: creating new entity for local ID {0}" , args . Prim . LocalID ) ;
690692 LLEntity newEnt = m_InstanceFactory . CreateLLPhysical ( GridClient , args . Prim , rcontext , LLLPAssetContext ) ;
691693 updateFlags |= UpdateCodes . New ;
692694 string ? attachmentID = "1" ; // default attachment ID
@@ -724,9 +726,15 @@ private void Objects_TerseObjectUpdate(object? sender, OMV.TerseObjectUpdateEven
724726 return ;
725727 }
726728 LLRegionContext rcontext = FindRegion ( args . Simulator ) ;
729+ if ( rcontext == null ) {
730+ m_log . Log ( KLogLevel . DBADERROR , "TerseObjectUpdate: no region context for simulator {0}" , args . Simulator . Name ) ;
731+ return ;
732+ }
733+
727734 OMV . ObjectMovementUpdate update = args . Update ;
728735 m_stats . ObjTerseUpdate . Event ( ) ;
729- IEntity ? updatedEntity = null ;
736+
737+ // IEntity? updatedEntity = null;
730738 UpdateCodes updateFlags = 0 ;
731739 lock ( m_opLock ) {
732740 if ( args . Prim . Acceleration != args . Update . Acceleration ) updateFlags |= UpdateCodes . Acceleration ;
@@ -744,8 +752,9 @@ private void Objects_TerseObjectUpdate(object? sender, OMV.TerseObjectUpdateEven
744752 m_log . Log ( KLogLevel . DBADERROR , "TerseObjectUpdate: received prim with UUID zero" ) ;
745753 return ;
746754 }
747- if ( rcontext . TryGetCreateEntityLocalID ( args . Prim . LocalID , out updatedEntity , delegate ( ) {
755+ if ( rcontext . TryGetCreateEntityLocalID ( args . Prim . LocalID , out var updatedEntity , delegate ( ) {
748756 // code called to create the entry if it's not found
757+ m_log . Log ( KLogLevel . DUPDATEDETAIL , "TerseObjectUpdate: creating new entity for local ID {0}" , args . Prim . LocalID ) ;
749758 updateFlags |= UpdateCodes . New ;
750759 updateFlags |= UpdateCodes . Acceleration | UpdateCodes . AngularVelocity | UpdateCodes . Velocity ;
751760 return m_InstanceFactory . CreateLLPhysical ( GridClient , args . Prim , rcontext , LLLPAssetContext ) ;
0 commit comments