.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

XmlSerializer crashes when vb6 instantiates it via COM

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
I Have a vb6 application that uses .net clases via COM. When one of this clases calls code which instantiates XmlSerializer vb6 aplication crashes. Just this line fails: Dim x as new XmlSerializer(GetType(CustomClass)) I agregate that these clases load assemblies dinamically but only it crashes over vb6 aplication. In .net 100% aplication this not happens. I don't know if this is the forum I should post this problems Thanks for your help.

View Complete Post

More Related Resource Links

Crash Course: Analyze Crashes to Find Security Vulnerabilities in Your Apps


Here the authors analyze program crashes to help you understand if you have the potential for read or write violations in your applications, and how they can lead to security vulnerabilities.

A. Abouchaev, D. Hasse, S. Lambert, and G. Wroblewski

MSDN Magazine November 2007

Custom Editform.aspx crashes Sharepoint Designer

Hi there,

I've recently designed a sharepoint list and customised newform.aspx and editform.aspx. I made copies of the originals then customised the copies.
On both forms I simply:

* Closed original List Form web part
* Added Custom List Form
* Added some section breaks (<tr>) to the form to break it into sections
* Added a new css style to change the background colour on the section breaks (table rows)

Now NewForm.aspx works fine. However after making above changes in EditForm.aspx, I saved it. However whenever I try to reopen EditForm.aspx in Sharepoint Designer (SD), SD crashes! I can only open it in Text view. The error details reported by SD are:

Problem signature:
  Problem Event Name:    APPCRASH
  Application Name:    SPDESIGN.EXE
  Application Version:    12.0.6423.1000
  Application Timestamp:    49b09947
  Fault Module Name:    FPEDITAX.DLL
  Fault Module Version:    12.0.6423.1000
  Fault Module Timestamp:    49b098d3
  Exception Code:    c0000005
  Exception Offset:    0010b35c
  OS Version:    6.0.6002.
  Locale ID:    3081

Additional information about the problem:
  LCID:    1033
  Brand:    Office12Crash
  skulcid:    1033

I really don't know why SD is crashing. As a test I made a new

WPF Designer (in VS 2008 and VS 2010) crashes with Visual Studio

Good day all. I have the following question: WPF designer in both VS 2008 and VS 2010 crashes with Visual Studio when I try to edit UI form. Moreover, it crashes even when I try to save .xaml.cs file. Meanwhile, Winforms and Dataset UI editors work as usual. Are there other people met this issue? And how could I fix up this problem? Deleting the .suo file, uninstalling silverlight, repairing visual studio, and further googling did not help me. Thanks in advance.

Designer crashes sometimes because application path becomes C:\Windows\system32

Sometimes VS crashes as it seems to execute the WPF designer in its directories or C:\Windows\system32. Sometimes it works fine as we can preview saved settings in the Designer. I have set application path as follows : ConfigFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "mixer.ser");<br/> When VS crashes I accept to debug it, the exception is : {"Access to the path 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\mixer.ser' is denied."}    System.Exception {System.UnauthorizedAccessException} ... or c:\windows\system32 Any ideas on how to fix this ?   Thank you !

Visual Studio 2010 crashes all the time

Does anyone know why VS 2010 crashes so often, and how to fix it?Greg H.

Application just crashes without error

Hello, I'm using Visual Studio 2010 Premium edition on a Vista 32-bit machine. I've created a WPF application that has references to some old DLL's (older version of Framework). The application needs to load some stuff and then display a map. When I run the app in the debugger of VS2010 it always works!! But when I want to start the app as a normal .exe application, it crashes without an error. It writes a line in the Windows Log: It's an Application Error 1000   Application error Norma SEH Module.exe, version 2010.8.1.0, timestamp 0x4c737108, module error clr.dll, versie 4.0.30319.1, timestamp 0x4ba1d9ef, exceptioncode 0xc0000409, errormarge 0x002b5b8c, proces-id 0x121c, Application starttime 0x01cb435c02d99ad2.   In my app.config the frameworks are defined like: <startup useLegacyV2RuntimeActivationPolicy="true"> <requiredRuntime version="v1.0.3705" safemode="true"/> <supportedRuntime version="v4.0"/> <supportedRuntime version="v1.0.3705"/> </startup> The weirdest thing is that they app.exe does work 1 time and then it won't work until I create a rebuild with VS2010. Can someone please help me out here? I've searched the whole internet and can't find anything. Thanx in advance With best regards, Alex van der Lans Team Leader | Software Engineer URL: http://www.

XmlSerializer - how to define class to not generate attributes in root element?

Hi! I have simple class that I serialize to xml file: <?xml version="1.0" encoding="utf-8"?> <MyRootElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Area="East">   <Products>     <SalesProduct Taxable="true">       <Name>Sofa</Name>     </SalesProduct>     <Product>       <Name>Television</Name>     </Product>   </Products> </MyRootElement> I don`t want have in xml file attributes xmlns:xsi and xmlns:xsd. How can I define class to not have these two attributes in xml file? I tried use XmlRoot attribute but there is no control for these two attributes. They are always generated. Regards

XMLSerializer don't handle mixed contents properly

mixed content model allows a combination of text and elements in the XML document. we use .net xmlserializer to serialize/deserialize the XML. XmlSerializer don't handle mixed content properly. XmlSerializer handles mixed content models to a degree. XmlSerializer add the text in the xml document, but the position of text is not exactly where they appeared in the original XML document. Let's take a example here is original xml <employee xmlns="http://example.org/xmlserializer">   here is some text...   <id>333-33-3333</id>   here is some more...   <name>Bob Smith</name>   and here is even more... </employee> We deserialize above xml using the xmlserializer then we serialize it back into xml. Now xml document is changed as follows <employee xmlns="http://example.org/xmlserializer">    <id>333-33-3333</id>   <name>Bob Smith</name>   here is some text...   here is some more...    and here is even more... </employee> You see the position of text is changed. I have seen the Microsoft code to serialize/deserialize the xml through reflector. They put text in a string array but position is not saved. Is there any solution or workaround? I don't want to parse the xml by xmlReader. I want fix in the Microsoft generated classes that ar

Report fine; PDF export fine; Excel export crashes - ArgumentOutOfRangeException

I use the Report Viewer Redistributable 2005 Service Pack 1 (version 8.0.50727.1843). On my ASP.NET page the report displays fine, in a ReportViewer control, using an rdlc file. Export to PDF works fine. Export to Excel crashes. Stack does not tell me much because it's all internal to the Report Viewer:[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index]   System.Collections.ArrayList.get_Item(Int32 index) +7483656   Microsoft.ReportingServices.Rendering.ExcelRenderer.DoubleList.get_Item(Int32 index) +5   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderImage(Image image, PageTableGrid pageTableGrid, PageReportItemInfo reportItemInfo, PageCell pageCell, Int32 row, Int32 col, Boolean addHeaderRows) +907   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderGridCell(PageLayout pageLayout, Int32 row, Int32 col, Hashtable& duplicateItemsTable, Boolean addHeaderRows, ReportItem parentItem, Hashtable riReferenceTable) +1317   Microsoft.ReportingServices.Rendering.BIFFUtility.WorkSheet.WriteRowBlocksAndCells(ExcelRenderer excelRenderer, Stream stream, UInt32 indexBeginOffsetPosition, Int32 minCol, Int32 maxCol) +936   Microsoft.ReportingServices.Rendering.BIFFUtility.BaseWorkSheet.WriteWorkSheet

SQL-Server 2005 x64 / windows server 2003 x64 crashes during file copy

Hi We are running: Microsoft SQL Server 2005 Standard - 9.00.4294.00 (X64) Microsoft Windows Server 2003 R2 Enterprise x64 We have gigabit interface. Today we copied a file (using robocopy) from our databaseserver to another server (backup-server). The copy was started from the backup-server and source were specified using UNC. The copy were using about 20% of the bandwith (about 200Mbit). During the copy, sql-server reported several errors, for example: AppDomain 15 (mp.dbo[runtime].14) is marked for unload due to memory pressure. The client was unable to reuse a session with SPID 75, which had been reset for connection pooling. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message. ***Stack Dump being sent to [PATH\SQLDump0005.txt Resource Monitor (0x1384) Worker 0x000000008000C1C0 appears to be non-yielding on Node 0. Memory freed: 0 KB. Approx CPU Used: kernel 15 ms, user 218 ms, Interval: 428541. So to me it appears that sql-server crashed during a file copy. We have 27 GB ram. With 24.5 GB dedicated to SQL-Server. The files we copied were quite large, some over 50GB. I found a similar issue about this: http://support.microsoft.com/kb/920739/ Do you think the issue above could be the cause of the sql-server crash? ///Patrik

DocumentViewer crashes in Windows XP SP3

Hi! I am developing a small program like point-of-sale based on WPF. In the program, I used UserControl to make shape of an Invoice. The FlowDocument would be converted into XPS document, and displayed into DocumentViewer. In Windows Vista, this works perfectly. I tried to run the program on Windows XP SP3, but the application crashed, it seems that XP SP3 can not handle DocumentViewer. So I installed XPS Essentials Pack 1.1 to check if it solve the problem, but it isn't. I have tried searching on Google, but found no solution. Is it the code that caused the problem? Or just missing components of target platform (WinXP SP3)? The code used to print the UserControl: public static FixedDocument GetFixedDocument(FrameworkElement toPrint, PrintDialog printDialog) { PrintCapabilities capabilities = printDialog.PrintQueue.GetPrintCapabilities(printDialog.PrintTicket); Size pageSize = new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight); Size visibleSize = new Size(capabilities.PageImageableArea.ExtentWidth, capabilities.PageImageableArea.ExtentHeight); FixedDocument fixedDoc = new FixedDocument(); toPrint.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); toPrint.Arrange(new Rect(new Point(0, 0), toPrint.DesiredSize)); Size size = toPrint.DesiredSize; double yOffset = 0

Can serialize but not deserialize class containing an xs:list attribute using XmlSerializer

I have a simple serializable class along the lines of: [Serializable] [XmlType] public class MyClass { [XmlAttribute("values")] public int[] Values { get; set; } } If I create an instance of this class with Values set to an empty collection the XmlSerializer class produces this output as expected: <?xml version="1.0" encoding="utf-16" ?> <MyClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" values="" /> However, deserializing this exact output throws a System.FormatException: Input string was not in a correct format. Shouldn't the XmlSerializer be able to deserialize this, since it produced the xml string in the first place?

Nesting serialized classes with XmlSerializer without escaped brackets

Hi The company I work for use a state implementation based on the XmlSerializer generic class in so far that we have state classes with simple public variables and no logic which we then use the XMLSerializer to serialize in in great extend nest. For instance class A has a Class B and a class C variable, each with a state class being serialized and put into a state class of the owner class. Is there any way outside actually implementing IXmlSerializable that I can allow to include XML directly in own output xml instead of escaping it when it meets brackets in strings for instance? The deal is that since all state classes individually are serialized simple classes, I know that they contain valid XML and that that will conform to the XMLDOM even if piecing them together and manually implementing the serializers will be quite time consuming even if limiting to the CSharp framework, but the multi layer escaped structure is awfull to the eye. See this simplified example: using System.Xml; using System.Xml.Serialization; using System; using System.IO; namespace TingTester { class Program { static void Main(string[] args) { var simpleser = new XmlSerializer(typeof(LittleStateClass)); string serialized = Serialize(GetSimpleVersion(), simpleser); Console.WriteLine("Simple elements contain no escapes: {0}", !serialized.Contains("&"

XmlSerializer: Serialize an array of System.Drawing.Color

Ok,  here is my problem... I am building a UI configuration tool that utiliizes a PropertyGrid.  One of the properties is a indexed list of Colors contained in an array: CategoryAttribute("Style"), DisplayName("Data Set Colors"), DescriptionAttribute(""), XmlArray("SetColors"), XmlArrayItem(ElementName="Color",Type=typeof(SColor))] public Color[] SetColors { get; set; } The beauty of the PropertyGrid is it knows how to handle this Poperty and properly handles array and list of Colors. BUT...   As we already know in order to serialize a Color,  we have to use a surrigate property,  which is very unfortunate, and I fear is one of those little thing MS just overlooked.  (I understand it is actually a structure and not a class and has not default properties from which to get type info from.) I am really amazed that when I do serialize the class,  the XML is soooo  close to what I need,  its just missing the actual color value data: <AppGridColumnConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Name>Label</Name> <SetColors> <Color /> <Color /> <Color /> </SetColors> <IsDefaultEditable>false</IsDefaultEditable> <IsDirtyCheck&

Client (Excel) crashes on exit with C# Interop Server (in-proc)

Hello, I'm having a generic problem understanding how to free resources when writing .net COM Servers (using CCW). Excel 2007 VBA is my client in this case. I believe it to be a problem that resources aren't immediately freed and on exit of Excel, a crash occurs which is probably due to invalid resources. The code server code I have is as follows: using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Windows.Forms; using System.Threading; using System.Diagnostics; namespace myclass { [Guid("84F0D8F6-AF73-43fe-92D3-C7264EDBDB18")] [ComVisible(true)] public interface IProgress { [DispId(1)] void Show(); [DispId(7)] void Finished(bool WaitOnOk); } [Guid("1195C591-8592-4533-BFFD-C383B33B2976"), InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] [ComVisible(true)] public interface IProgressEvents { } [Guid("9773AD88-E17C-4c27-94AE-BA3FC330F162"), ClassInterface(ClassInterfaceType.None), ComSourceInterfaces(typeof(IProgressEvents))] [ComVisible(true)] public class Progress : IProgress { System.Diagnostics.BooleanSwitch trace = null; System.IO.FileStream log = null; private bool m_InitForm = false; public Progress() { log = System.IO.File.Create(@"c:\hbasElvis.txt"); Trace.Listeners.A

Internet explorer crashes when opening a report

Greetings! I am having a report which has a table of ~500 rows and ~34 columns. I need that report to link to another report in every cell. And i need that report to output on 1 page for viewer convinience.  But then the explorer crashes. The error is:   Problem signature: Problem Event Name: APPCRASH Application Name: iexplore.exe Application Version: 8.0.7600.16385 Application Timestamp: 4a5bc69e Fault Module Name: mshtml.dll Fault Module Version: 8.0.7600.16535 Fault Module Timestamp: 4b83889f Exception Code: c0000005 Exception Offset: 003481f6 OS Version: 6.1.7600. Locale ID: 1049 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt   I checked and the problem seems to occur based on number of links on the page!  I tried to limit rows in the query and if there are about  200 rows, it works! but with 270 rows it wont work. If i hide half of the columns, it works with 500 rows. I also was able to reproduce this with other reports that have link in every column of a row i
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend