DevExpress.XtraGrid.GridControl Threw an Exception

I just downloaded the latest release and now cannot run SqlCompare and SqlDataCompare without getting this error.


An unhandled exception ('System.TypeInitializationException') occurred in RedGate.SqlDataCompare.UI.exe [272].

From SqlDataCompare: Additional information: The type initializer for '_122' threw an exception.

From SqlCompare: Additional information: The type initializer for 'DevExpress.XtraGrid.GridControl' threw an exception.


Note I am a DeveloperExpress Subscriber and already have the latest version of Developer Express already installed on my development machine.

Aside from a few bugs that I hoped were fixed in the new release, they worked fine before downloading the latest release.

Now I am wondering if my DevExpress stuff is still correctly installed.

How do I fix this?

Regards,

Dave

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello David,

    The last time I saw this error occur, I believe that the problem was that the 'Times New Roman' font was not installed on the system.

    http://www.red-gate.com/messageboard/vi ... php?t=3131

    Can you please have a look at your installed fonts? Thanks!
  • I've got the same issue. I upgraded yesterday to 5.3.2 and now I'm getting a type initializer error on the DevExpress XtraGrid. Times New Roman is installed. I'm running on Vista Ultimate.
    David Neal
    MCSD, MCSE, MCDBA
    http://www.ChristianASP.NET/
  • I'm having this same problem. Any answers?
  • I contacted support, and after a few troubleshooting steps, here's the reply I received:
    I have been unable to find any solution as to why you are getting this error. I have contacted development about the problem, and they will let me know as soon as they have some information.

    I will close this call for now, but I will let you know as soon as I hear anything.
    David Neal
    MCSD, MCSE, MCDBA
    http://www.ChristianASP.NET/
  • Thank you for posting that reply in this forum. It gives us awareness of it, provides a chance for us to respond and let's us take steps to prevent it from happening again

    I wanted to let you know that the exception with DevExpress.XtraGrid.GridControl is being actively investigated by both the technical support team and our developers.

    We hope to be able to provide a solution to this problem soon. The details of the solution will be posted in this forum as soon as we can and we will also contact customers directly who logged a call with us regarding this error.

    Your co-operation and patience in this matter is very much appreciated and I am very sorry that the response you received from support was worded in that way.
  • By the way, I rebuilt my Windows XP machine and installed the latest 5.3 bundle, and also received a similar message on application startup. I uninstalled and found an old copy of the 5.2 bundle on our company network and that works.
    David Neal
    MCSD, MCSE, MCDBA
    http://www.ChristianASP.NET/
  • Thanks David, that extra information is very useful.

    I will make sure everyone involved in providing the resolution is aware of it.
  • Hey guys... on a hunch I decided to reinstall 5.3 on my XP machine. This time it works. The difference is one of two things:

    1) I didn't have .NET Framework 1.1 installed before, but this time I do

    2) I didn't have any saved projects to display before, but this time I do

    Hope this helps!
    David Neal
    MCSD, MCSE, MCDBA
    http://www.ChristianASP.NET/
  • Good news about your XP machine!

    Not sure I understand why those two things should make a difference but I'm glad it worked for you. It will be interesting to see what the rest of the team make of it.

    Would you be able to install 5.2 on your Vista PC and see if that works?
  • SQL Bundle 5.2 has the same issue on Vista.

    The (lack of the) .NET Framework 1.1 is the issue. I bravely installed the .NET Framework 1.1 on my Vista machine and now SQL Compare and Data Compare are working!
    David Neal
    MCSD, MCSE, MCDBA
    http://www.ChristianASP.NET/
  • David,
    I'm glad you have managed to sort the problem out and are now working!

    Interestingly, my own Vista installation doesn't have .Net Framework 1.1 installed and I don't get the error and the vast majority of our customers do not seem to experience this problem either and I know some of them are Vista users.

    We will be investigating this issue further to fully understand why this should make a difference and issue an official solution. I am certain the information you have given here, has speeded the process up no end.

    Thank you so much for all of your help, it really is appreciated!
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I disassembled the UI assembly, and found that _122 seems to have a lot of methods relating to 'licensing' I wonder if the error relates to a failure to get a licence for the third-party components?

    SQL Data Compare is built against .NET Framework 1.1, so maybe what had happened is that when XtraGrid component got called, it found a version built for .NET 2.0 (perhaps in your GAC?) and loaded this version instead of the one that shipped with Data Compare and this had caused a licensing issue.

    This is my assumption. What we really need is for one of our developers to have a proper look at it.
  • I noticed that my Red-Gate tools were loading the DevExpress binaries from the GAC and not from the application directory. Both assembly copies were version 6.3.1.0; I'm not sure if and why there is a difference internally between the DevExpress assemblies loaded in the GAC and those installed with Red-Gate products but once I removed the 6.3.1.0 assemblies from the GAC all of the applications in the Red-Gate suite that were having problems work perfectly.
    Please note that this is by design as the .NET Framework will search the GAC for an assembly (By strong name and version) and if it located it will be used... if it isn't located in the GAC; the framework will begin probing (as defined at http://msdn2.microsoft.com/en-us/library/yx7xezcf.aspx) and will locate the correct assembly in the app or probing path.
    I've never seen this cause a problem in the past as one would assume that two binaries with the same strong name and version should be identical... but I didn't dig any deeper.

    hth,
    bR
  • Thanks for the heads up Brian,

    We will get someone to look into this and try and understand what's going on.

    - James
    James Moore
    Head of DBA Tools
    Red Gate Software Ltd
  • Hi there,

    I think I understand what is going wrong here and it looks like DevExpress are to blame. They have released .NET 1.1 and .NET 2.0 builds of their 6.3 components. These completely different binaries have identical versioning information.

    When you run SQL Compare on a machine that only has .NET 2.0 installed it attempts to load in the .NET 2.0 versions of the dlls from the GAC. This causes the crash.

    I will chase this up with DevExpress. Apologies for the inconvience.

    Tom Harris

    Red Gate Software

    // Assembly DevExpress.XtraGrid.v6.3, Version 6.3.1.0


    Location: C:\Program Files\Developer Express .NET 2005 v6.3\Sources\DevExpress.DLL\DevExpress.XtraGrid.v6.3.dll
    Name: DevExpress.XtraGrid.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4
    Type: Library


    // Assembly DevExpress.XtraGrid.v6.3, Version 6.3.1.0


    Location: C:\Program Files\Developer Express .NET v6.3\Sources\DevExpress.DLL\DevExpress.XtraGrid.v6.3.dll
    Name: DevExpress.XtraGrid.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4
    Type: Library
  • I was experiencing exactly the same issue. I do not have the DevExpress controls installed, but I was still getting the TypeInitializationException on Vista Ultimate. I installed the 1.1 redist and everything works fine now.

    Aaron Prenot
  • I loaded .Net 1.1 and Compare and DataCompare work fine now. Thanks for the tip.

    Chris
  • This issue should have been resolved by the SQL Compare 6 Beta, which is available here:

    http://www.red-gate.com/MessageBoard/vi ... php?t=4836

    Regards,

    Jonathan
    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
Sign In or Register to comment.