EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElPOP3Client.Active: NullReferenceException

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
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:
if (!client.IsDisposed && client.Active)

Note: client itself is not null !

System.NullReferenceException was unhandled
  Message=Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
       bei SBSimpleSSL.TElCustomSimpleSSLClient.GetActive()
       bei SBSimpleSSL.TElCustomSimpleSSLClient.get_Active()
Posted: 03/02/2015 07:40:24
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

Sometimes I'm getting a NullReferenceException

Is this problem reproducible with our sample? If yes then what are the steps to reproduce it.
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 ?
Posted: 03/02/2015 08:49:45
by Vsevolod Ievgiienko (Team)

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.



Topic viewed 563 times

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


Back to top

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

Got it!