clr20r3 Error

V

vbnetdev

On one of my Windows Server 2003 machines I get the error below. On another
it runs fine. ON my development machine it runs fine. Any ideas what I could
do to fix this?

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in
JJK ITEM REPORTS 2.exe

Additional information: The specified module could not be found. (Exception
from HRESULT: 0x8007007E)

IN the event viewer I find:

EventType clr20r3, P1 jjk item reports 2.exe, P2 1.0.2274.14931, P3
442441d5, P4 jjk item reports 2, P5 1.0.2274.14931, P6 442441d5, P7 1b, P8
e9, P9 system.invalidoperationexception, P10 NIL.
 
P

Peter Huang [MSFT]

Dear Customer,

Firstly, what is the application that thrown the unhandled exception?
Is it a Winform or AP.NET app?
Also I think you may try to handle all the unhandled exception to see what
cause the problem, so that we can do further toubleshooting.
How to: Handle Application-Level Errors (ASP)
http://msdn2.microsoft.com/en-US/library/24395wz3(VS.80).aspx

Application.ThreadException Event
http://msdn2.microsoft.com/en-us/library/system.windows.forms.application.th
readexception(VS.80).aspx

Also it seems to be filenotfound exception, you may try to use the filemon
tool to monitor what file the app is trying to find.
http://www.sysinternals.com/utilities/filemon.html


Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
V

vbnetdev

Here is what filemon told me.....

what do I do with this?

5:51:02 AM explorer.exe:3260 OPEN C:\Program Files\Default Company
Name\JJKITEM\JJK ITEM REPORTS 2.exe.Manifest NOT FOUND Options: Open
Access: All
5:51:02 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.Local NOT FOUND Attributes:
Error
5:51:02 AM JJK ITEM REPORT:3460 OPEN C:\Program Files\Default Company
Name\JJKITEM\JJK ITEM REPORTS 2.exe.config NOT FOUND Options: Open Access:
All
5:51:02 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.Local\ NOT FOUND Attributes:
Error
5:51:02 AM JJK ITEM REPORT:3460 OPEN C:\Program Files\Default Company
Name\JJKITEM\JJK ITEM REPORTS 2.exe.config NOT FOUND Options: Open Access:
All
5:51:02 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.Local\ NOT FOUND Attributes:
Error
5:51:02 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.config NOT FOUND Attributes:
Error
5:51:02 AM JJK ITEM REPORT:3460 DIRECTORY C:\Program Files\Default Company
Name\JJKITEM\ NO SUCH FILE FileBothDirectoryInformation: JJK ITEM REPORTS
2.INI
5:51:02 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.Local\ NOT FOUND Attributes:
Error
5:51:02 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.Local\ NOT FOUND Attributes:
Error
5:51:02 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.config NOT FOUND Attributes:
Error
5:51:02 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.config NOT FOUND Attributes:
Error
5:51:03 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.Local\ NOT FOUND Attributes:
Error
5:51:03 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.Local\ NOT FOUND Attributes:
Error
5:51:04 AM MDM.EXE:1420 QUERY INFORMATION C:\Program Files\Default Company
Name\JJKITEM\JJK ITEM REPORTS 2.exe BUFFER OVERFLOW FileNameInformation
5:51:12 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.exe.Local\ NOT FOUND Attributes:
Error
5:51:12 AM JJK ITEM REPORT:3460 QUERY INFORMATION C:\Program Files\Default
Company Name\JJKITEM\JJK ITEM REPORTS 2.PDB NOT FOUND Attributes: Error
5:51:12 AM JJK ITEM REPORT:3460 OPEN C:\Program Files\Default Company
Name\JJKITEM\JJK ITEM REPORTS 2.pdb NOT FOUND Options: Open Access: All
5:51:12 AM JJK ITEM REPORT:3460 OPEN C:\WINDOWS\symbols\exe\JJK ITEM REPORTS
2.pdb PATH NOT FOUND Options: Open Access: All
5:51:12 AM JJK ITEM REPORT:3460 OPEN C:\WINDOWS\exe\JJK ITEM REPORTS 2.pdb
PATH NOT FOUND Options: Open Access: All
5:51:12 AM JJK ITEM REPORT:3460 OPEN C:\WINDOWS\JJK ITEM REPORTS 2.pdb NOT
FOUND Options: Open Access: All

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com
 
V

vbnetdev

My apologies. It is Winforms. I set up a exception handler at program start
but it never even gets to that point.
 
V

vbnetdev

Peter,

I decided to pull the project apart and do it over as this had been migrated
from 1.1 of the framework.

Here is the situation:

Create new Windows project...

add another form (form2)

declare several instances of form2 in form1 load event.

add properties and methods to form2. Nothing fancy. Strings and arrays and
whatever.

Here is what happened:

Lets say form2 has this property.

Private ipserver As String '= "10.10.10.10"
Public Property IPServerAddress() As String
Get
Return ipserver
End Get
Set(ByVal Value As String)
ipserver = "10.10.10.10"
End Set
End Property

If I leave the private variable assigned it will stop and give me the error:

Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.

If I fix all of them, it wont stop anymore until teh declaration of the new
form but then gives me the sae error at that point.

In teh event viewer we see

..NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A2B45A2)
(0)

Thank you for your help.
 
M

Morgan

If you're returning the same value every time, why not make the property
read-only?

Private ipserver As String '= "10.10.10.10"
Public Property IPServerAddress() As String
Get
Return ipserver
End Get
End Property
 
V

vbnetdev

This was just for demo purposes. Eventually that is not going to be the
case. It will be assigned dynamically but I didnt want to run that part of
the code right now.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com
 
P

Peter Huang [MSFT]

Dear Customer,

Thanks for your quickly reply!
Based on my understanding, if you try to run the code below, that is to say
assigned the ipserver and you will get the error.
Private ipserver As String = "10.10.10.10"
Public Property IPServerAddress() As String
Get
Return ipserver
End Get
Set(ByVal Value As String)
ipserver = "10.10.10.10"
End Set
End Property

It is strange, can you build a simple reproduce sample for us to do further
trouble shooting.
Based on my test, if we just create a new winform application and add the
code per your description, I can not reproduce the problem.

Also from the filemon log, it seems that the app is not try to find some
must file.
e.g. for config file, we can run a win app without it.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Huang [MSFT]

Hi

Sorry.
I just thought, if the sample is very simple. Please simply to post the
code and reproduce steps here.
Or you can send to me via removing the "online" from my email address.
BTW: Please simplify the code ASAP.
Thanks!

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

wayne

Peter,
I am also having this "Attempted to read or write protected memory.
This is often an indication that other memory is corrupt" error. Has
anything been done on this. The problem seems to span all O/S's and
many different platforms. Earlier reading on the issue hinted that a
hotfix may be in the works? Has anything been released yet?

Thanks,
Wayne
 
P

Peter Huang [MSFT]

Hi Wayne,

Thanks for your quickly reply!
This is a very general error which means there are some code is trying to
read/write protected memory.
If you search in the goolge, you will get innumerable hits. That is why I
suggest you post a reproduce sample, so that I can reproduce and
troubleshooting at my side.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
V

vbnetdev

Well I have narrowed it down to a third party component.

From what you see here what can you tell me about what is going on? It first
reports this error in teh resource file when you try to open it.

<value>System.Resources.ResXResourceReader, System.Windows.Forms,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Vt1.FontEx"
mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAF1EYXJ0LlBvd2VyVENQLkVtdWxhdGlvbi5WdCwgVmVyc2lvbj0x
LjAuMi4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTU5NjYyOTFiODk1NWU0YmIFAQAA
ABxEYXJ0LlBvd2VyVENQLkVtdWxhdGlvbi5Gb250BAAAAAVzdHlsZQRuYW1lB2NoYXJzZXQEc2l6ZQAB
AAAICAsCAAAAAAAAAAYDAAAAC1ZUMjIwX2FzY2lp3AAAAAAAQEEL
</value>
</data>
<metadata name="Telnet1.TrayLocation" type="System.Drawing.Point,
System.Drawing, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

IN VS it reported:

Warning 1 Cannot resolve dependency to assembly 'System.Windows.Forms,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
because it has not been preloaded. When using the ReflectionOnly APIs,
dependent assemblies must be pre-loaded or loaded on demand through the
ReflectionOnlyAssemblyResolve event. 0 0

Error 2 Invalid Resx file. The specified module could not be found.
(Exception from HRESULT: 0x8007007E) Line 127, position 5. C:\Documents and
Settings\Administrator\Desktop\DARTTEST\Form1.resx 127 5 DARTTEST

According to the folks at DART they have never seen any of this occur before
and believe it to be a bug in VS.

Your thoughts are appreciated.....thanks for your work on this.
 
W

wayne

vbnetdev,
Could you elaborate on your findings. Specifically what pointed you to
the missing dll and was the dll part of the 3rd party software or was
it a missing dll in the .Net CLR? I am looking at the stack trace and
curious if it is the file pointed to by -->>"Warning 1 Cannot resolve
dependency to assembly 'System.Windows.Forms,
 
V

vbnetdev

HI Wayne,

It seems in this particular situation there is a dll called msvcr71.dll that
was reqquired to be in the system32 directory of the end user installing the
program. The third party component had failed to place this file during the
install which was required for it to work.
It appears that without this dll resolving properly, the Forms will not
load. This third party component had been compiled under 1.0 of the
framework which may explain some of this.

I figured this out by comparing the contents of a working system32 directory
with the system that was nto working and this was one of the dll files that
was not there as well.

My solution to this problem I believe will be to include this dll in teh
install package directing it to system32. I am hoping Orca will have a
mechanism there to tell it not to overwrite if it exists.

I hope this helps someboday. I went through hell to find it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top