EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElPOP3Client.Active: NullReferenceException

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#32405
Posted: 03/02/2015 07:28:18
by Ako Dpeps (Basic support level)
Joined: 02/25/2015
Posts: 13

Sometimes I'm getting a NullReferenceException when calling (TElPOP3Client) client.Active:
Code
if (!client.IsDisposed && client.Active)
{
  client.Close(false);
}

Note: client itself is not null !

Code
System.NullReferenceException was unhandled
  HResult=-2147467261
  Message=Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
  Source=SecureBlackbox.SSLClient
  StackTrace:
       bei SBSimpleSSL.TElCustomSimpleSSLClient.GetActive()
       bei SBSimpleSSL.TElCustomSimpleSSLClient.get_Active()
#32408
Posted: 03/02/2015 07:40:24
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Quote
Sometimes I'm getting a NullReferenceException

Is this problem reproducible with our sample? If yes then what are the steps to reproduce it.
#32411
Posted: 03/02/2015 08:39:27
by Ako Dpeps (Basic support level)
Joined: 02/25/2015
Posts: 13

when client.Destroy() has been called before and then Active is called it crashes. But IsDisposed should return true if Destroy() has been called ?
#32412
Posted: 03/02/2015 08:49:45
by Vsevolod Ievgiienko (EldoS Corp.)

You should free objects using Dispose method and then its better to set references to null and check this later when reference is re-used.

Reply

Statistics

Topic viewed 447 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!