Archived Forum Post

Index of archived forum posts

Question:

App Crashes on First Use of Chilkat object

Aug 14 '15 at 15:54

A similar question has been asked before, but no resolution was found. I am experiencing the same issue now and I can't get it figured out. An app runs fine on my dev PC but not on the PC on which I want to run it.

My C# WinForms app (created in VSE2013) compiles and runs fine on my dev PC. It is a 64-bit machine, but the build settings specify a target platform of x86, as the target machine is 32-bit. Target platform is also set as .NET 4.5 and I am using the x86 version of ChilkatDotNet45.dll (v9.5.0.51, 6.07MB, md5 0F7634BA09509B953969366E2F030D31). The target machine's "program and features" indicates that it has .NET 4.5 and VC++ redist 2008 9.0.21022/2008 9.0.30729.6161/2013 12.0.30501 all installed.

The program executes normally until it reaches the line: Chilkat.Crypt2 crypt = new Chilkat.Crypt2();

When it reaches that line, there is a delay and then a message box pops up to say that "appName has stopped working." Within the problem details, it says:

<EventType>CLR20r3</EventType>
<Parameter0>appName.exe</Parameter0>
<Parameter1>1.0.0.0</Parameter1>
<Parameter2>55cd12b8</Parameter2>
<Parameter3>appName</Parameter3>
<Parameter4>1.0.0.0</Parameter4>
<Parameter5>55cd12b8</Parameter5>
<Parameter6>11</Parameter6>
<Parameter7>96</Parameter7>
<Parameter8>System.IO.FileNotFoundException</Parameter8>

Previously, you had stated that you thought that CLR20r3 referred to .NET 2, but it has since been revealed that this is a generic message for most of the recent .NET releases.

Does anyone have any insight on why this is happening and what can be done to overcome it?


Accepted Answer

Thanks for the reply TracyP. I've answered a couple of your question below in case it might be relevant for future users, but they turn out to be irrelevant here. This is a case of operator (facepalm) error on version control with the CK libraries.

Per the .NET 4.5 32-bit download page:

  • The 1st download depends on the VC++ 2012 runtime (see Common Error #2) and may be used in both VS2012 and VS2013.
  • The 2nd download depends on the VC++ 2013 runtime (see Common Error #2) and may be used in VS2013.

The Windows error message that I received (included in OP) was thoroughly unhelpful in determining that the issue seems to have been "Common Error #2".

I apparently lost track of which one I downloaded. The problem was that I needed to install VC++ redist 2012 and not 2013. I'm not sure why I would have downloaded the 2012/2013 combined version, as I have never used 2012 - aside from assuming greater interoperability or compatibility. I suppose I also assumed backward compatibility in that 2013 dist would contain whatever was needed from 2012 redist.


To answer your questions...

What is the Target OS and is it fully patched? Win7 HP 32 bit. Fully up to date.

Is the ChilkatDotNet45.dll in the same folder as the appName.exe? That's where it started out, and it is still there also. I have since copied it to a couple places in the system path in case it was having trouble finding it.

Does the logged in user have disk file rights to the ChilkatDotNet45.dll? User on both machines is an administrator role. I have also tried running the app normally as well as running as administrator with similar outcomes.


Answer

What is the Target OS and is it fully patched?

Is the ChilkatDotNet45.dll in the same folder as the appName.exe?

Has appName.exe changed the default folder prior to that line of code? (Should have no bearing but being sure)

Does the logged in user have disk file rights to the ChilkatDotNet45.dll?

Have you restarted the target machine?