Compilation error in 64bit Windows 7

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
JamesThomas
Newbie
Newbie
Posts: 6
Joined: Fri Dec 02, 2005 12:00 am
Contact:

Compilation error in 64bit Windows 7

Post by JamesThomas » Wed Aug 04, 2010 8:11 am

Hello,
I'm using v2.0.2179.x in my application.
Recently tried to build my application in a 64 bit Windows 7 OS but the project that used TeeChart gives strange compilation errors.
Error 3 Specific exception: "XmlException" Message: "Type in the data at line 774, position 3, cannot be loaded because it threw the following exception during construction: Object reference not set to an instance of an object. ---> XmlException: Type in the data at line 774, position 3, cannot be loaded because it threw the following exception during construction: Object reference not set to an instance of an object. Line 774, position 3. ---> NullReferenceException: Object reference not set to an instance of an object." C:\Revolution\Windows Build .NET\Revolution\EngineeringUI\CalibrationWizardLiveData.resx EngineeringUI

When I posted this issue on MSDN forum, I was told that the exact cause of the error was
NullReferenceException: Object reference not set to an instance of an object.

at Steema.TeeChart.FrAccessProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at Steema.TeeChart.Chart..ctor()
at Steema.TeeChart.Chart..ctor(SerializationInfo info, StreamingContext context)
d:\projects\vs10\WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx WindowsFormsApplication1
it seems to be a code defect in TeeChart.dll (TeeChart, Version=2.0.2179.21172, Culture=neutral, PublicKeyToken=9c8126276c77bdb7), with reflector, we can view "source code" in TeeChart.dll, FrAccessProvider.GetLicense method looks like:

public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
{
FrAccess access = null;
if (context != null)
{
if (context.UsageMode == LicenseUsageMode.Runtime)
{
string savedLicenseKey = context.GetSavedLicenseKey(type, null);
if ((savedLicenseKey != null) && this.IsRuntimeKeyValid(savedLicenseKey, type))
{
access = new FrAccess(this, savedLicenseKey);
}
}
if (access != null)
{
return access;
}

// NullRefernceException occurs here.
RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Steema Software\TeeChart.Net");
string str2 = (string)key.GetValue("DesignKeyV2", "");
if (((key != null) && (str2 != null)) && this.IsKeyValid(str2, type))
{
access = new FrAccess(this, string.Format("{0} is a licensed component.", type.FullName));
}

if (access != null)
{
context.SetSavedLicenseKey(type, access.LicenseKey);
}
}
return access;
}

On installing TeeChart on the machine, I noticed in the registry that the path to the key is HKEY_LOCAL_MACHINE\SOFTWARE\wow6432node\Steema Software\teeChart.Net\DesignKeyV2

Is the key returned as null, because of the difference in path? I tried to run the latest TeeRegV2.exe also. But to no success.

Could you please help me to resolve this issue.

Thanks.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Compilation error in 64bit Windows 7

Post by Yeray » Fri Aug 06, 2010 2:29 pm

Hi JamesThomas,

Is a new simple application working fine in this 64 bit machine?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply