Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2006

Tip: Looking for answers? Try searching our database.

AccessViolationException at Xsl Transform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anton - 24 Jun 2006 09:59 GMT
Hi,

I'm getting the following exception when doing a XSL Transform:

System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.
   at Execute(XmlQueryRuntime
{urn:schemas-microsoft-com:xslt-debug}runtime)
   at System.Xml.Xsl.ExecuteDelegate.Invoke(XmlQueryRuntime runtime)
   at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
XmlResolver dataSources, XsltArgumentList argumentList,
XmlSequenceWriter results)
   at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter
writer, Boolean closeWriter)
   at System.Xml.Xsl.XmlILCommand.Execute(XmlReader contextDocument,
XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
   at System.Xml.Xsl.XslCompiledTransform.Transform(String inputUri,
XmlWriter results)

This is the code (the last line raises the exception):

  MemoryStream ms = new MemoryStream();
  XmlWriter xw = XmlWriter.Create(ms);
  XslCompiledTransform xslt = XslCompiledTransform();
  xslt.Load(sFileXslt);
  xslt.Transform(sImportFile, xw);

On my development machine this code runs just fine. When testing in
various virtual machines, there is always an exception.

At first I thought the .NET 2.0 Framework installation could be damaged,
but reinstalling didn't help.

What could be the reason for this?

Thanks,

Anton
Kevin Yu [MSFT] - 26 Jun 2006 10:29 GMT
Hi Anton,

Could you try to test on some other real machine to see if the AV still
occurs. It might be the virtual machine problem in this case. Also, if that
still happens on other machines, please let me know the operating system.

Kevin Yu
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.)
Anton - 26 Jun 2006 20:10 GMT
Hi Kevin,

this problem also occurs on another real machine. I have tested this on
Win 2000 (real machine) and Windows XP Pro SP1 (virtual machine).

My development machine runs under Windows XP Pro.

Thanks,

Anton

Kevin Yu [MSFT] schrieb:
> Hi Anton,
>
[quoted text clipped - 14 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Kevin Yu [MSFT] - 27 Jun 2006 07:35 GMT
Hi Anton,

Based on my research, this AV exception might have something to do with the
current bug:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac
kID=97942

If this issue is urgent for you, I suggest you try to contact Microsoft PSS
for resolving it. Here is the contact information.

http://support.microsoft.com/common/international.aspx?rdpath=gp;en-us;offer
prophone

Kevin Yu
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.)
Anton - 29 Jun 2006 21:51 GMT
Hi Kevin,

Thanks for your assistance.

The reason was a issue with our assembly decompilation protection.

Anton

Kevin Yu [MSFT] schrieb:
> Hi Anton,
>
[quoted text clipped - 22 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Kevin Yu [MSFT] - 30 Jun 2006 04:21 GMT
You're welcome. Nice to hear that you have had the problem resolved.

Kevin Yu
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.)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.