Our website uses cookies to enhance your browsing experience.
Accept
to the top
close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
>
Examples of errors detected by the V309…

Examples of errors detected by the V3090 diagnostic

V3090. Unsafe locking on an object.


Old NASA World Wind (C#)

V3090 Unsafe locking on an object of type 'String'. GPSTrackerPlugin.APRS.cs 256


private int APRSParse(....)
{
  int iRet=-1;
  try
  {
    lock("ExternDllAccess")
    {
      //Call the APRS DLL
      iRet=APRSParseLinePosStat(sString,
                                ref aprsPosition,
                                ref aprsStatus);
    }
  }
  catch(Exception)
  {
    iRet=-1;
  }
  return iRet;
}

Similar errors can be found in some other places:

  • V3090 Unsafe locking on an object of type 'String'. GPSTrackerPlugin.File.cs 226
  • V3090 Unsafe locking on an object of type 'String'. GPSTrackerPlugin.File.cs 244
  • V3090 Unsafe locking on an object of type 'String'. GPSTrackerPlugin.File.cs 370
  • And 12 additional diagnostic messages.

Mono

V3090 Unsafe locking on a type. All instances of a type will have the same 'Type' object. corlib-net_4_x UnixRegistryApi.cs 245


public RegistryKey Ensure (....)
{
  lock (typeof (KeyHandler)){
    ....
  }
}

Similar errors can be found in some other places:

  • V3090 Unsafe locking on a type. All instances of a type will have the same 'Type' object. corlib-net_4_x UnixRegistryApi.cs 261
  • V3090 Unsafe locking on a type. All instances of a type will have the same 'Type' object. corlib-net_4_x UnixRegistryApi.cs 383
  • V3090 Unsafe locking on a type. All instances of a type will have the same 'Type' object. corlib-net_4_x UnixRegistryApi.cs 404
  • And 8 additional diagnostic messages.

Mono

V3090 Unsafe locking on a type. All instances of a type will have the same 'Type' object. System.Runtime.Remoting-net_4_x HttpRemotingHandlerFactory.cs 61


void ConfigureHttpChannel (HttpContext context)
{
  lock (GetType())
  {
    ....
  }
}

Mono

V3090 Unsafe locking on an object of type 'String'. System.Web-net_4_x ProfileBase.cs 95


const string Profiles_SettingsPropertyCollection =
               "Profiles.SettingsPropertyCollection";
....
static void InitProperties ()
{
  ....
  lock (Profiles_SettingsPropertyCollection) {
  if (_properties == null)
    _properties = properties;
  }
}

Logify Alert Clients

V3090 Unsafe locking on a type. All instances of a type will have the same 'Type' object. TempDirectoryExceptionReportSender.cs 33


protected override bool SendExceptionReportCore(....) {
  ....
  lock (typeof(OfflineDirectoryExceptionReportSender)) {
  ....
}

Emby

V3090 Unsafe locking on a type. All instances of a type will have the same 'Type' object. Lmhosts.cs 49


public class Lmhosts
{
  public static NbtAddress GetByName(string host)
  {
    lock (typeof(Lmhosts))
    {
      return GetByName(new Name(host, 0x20, null));
    }
  }

  internal static NbtAddress GetByName(Name name)
  {
    lock (typeof(Lmhosts))
    {
      ....
    }
  }
}

Similar errors can be found in some other places:

  • V3090 Unsafe locking on a type. All instances of a type will have the same 'Type' object. Lmhosts.cs 57