Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-581

NullReferenceException from log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.1.0
    • Component/s: Other
    • Labels:
    • Environment:
      Windows Server 2012R
    • Flags:
      Patch, Important

      Description

      Hello,

      Below is the full exception stack. Exception happens because entryValue is null, so attempt to get IsSerializable attribute from GetType() was failing.

      Updated file is attached, this works for us now. Let me know if you have questions.

      Thank you,
      Vlad

      System.NullReferenceException: Object reference not set to an instance of an object.

      Server stack trace:
      at System.Object.GetType()
      at log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(SerializationInfo info, StreamingContext context)
      at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
      at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
      at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
      at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
      at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.SerializeResponse(IServerResponseChannelSinkStack sinkStack, IMessage msg, ITransportHeaders& headers, Stream& stream)
      at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nachbarslumpi Dominik Psenner
                Reporter:
                vlad_lee Vlad Lee
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: