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

Post New Web Links

StackOverflowException on WindowsBase.dll using .NET 4

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :WPF
Hello, I'm working in a simple WPF 4 application, where I must get a property of an object that is stored in a COM object and put it into a textblock. This object is already referenced in the project. Here is the code snipet. (very simple):   try { comObject rectangular = new comObject(); textBlock1.Text = rectangular.Version + "|" + rectangular.ComputerID; } catch (Exception ex) { textBlock1.Text = ex.Message; }  When I run this code (from a simple button click for instance) the code runs OK (no exceptions). However, when I click on the textBloc,  I get an StackOverflowException on the WindowsBase.dll assembly. I don´t know how to debug this issue nor what might be causing it in a such simple program. I isolated this issue in a brand new WPF application and it is still occuring... I would apreciate any help. Igor.Software Developer and AI Enthusiast. www.twitter.com/ikondrasovas

View Complete Post

More Related Resource Links

An unhandled exception of type 'System.StackOverflowException' occurred in WindowsBase.dll


i have .net 4.0 application in wpf . application is running fine but when i close the application by using exit button. it throws the exception after stopping the debugging. the exception is  "An unhandled exception of type 'System.StackOverflowException' occurred in WindowsBase.dll ".

the code in exit button is


 private void btnExit_Click(object sender, RoutedEventArgs e)


don't know from where it throws the exception and why ??

How to avoid StackOverflowException when i use System.Windows.Markup.XamlWriter.Save

do following step, you can reappear the exception. step 1: Create a WpfApplication, named by "WpfApplication2" setp 2: Add two references, Microsoft.ReportViewer.Common and Microsoft.ReportViewer.WinForms step 3: paste the following code to MainWindow.xaml <Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wf="clr-namespace:Microsoft.Reporting.WinForms;assembly=Microsoft.ReportViewer.WinForms" Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded"> <Grid> <WindowsFormsHost Height="100" HorizontalAlignment="Left" Margin="10,10,0,0" Name="windowsFormsHost1" VerticalAlignment="Top" Width="200" > <wf:ReportViewer Name="rp"></wf:ReportViewer> </WindowsFormsHost> </Grid> </Window> and paste the following code to MainWindow.xaml.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.M

'System.ExecutionEngineException' occurred in WindowsBase.dll parsing Run in separate thread

Receiving the above exception when attempting to fire off a BackgroundWorker and parse the FlowDocument via Run. Sometimes does not reference WindowsBase...as such Exception of type 'System.ExecutionEngineException' was thrown. Some key things are that if I run the exact same code on the UI thread there are no issues at all. If I run the code as a BackgroundWorker and the document is very small, no issues will surface either...although that may be a timing issue masking itself. Below is the entire parsing class...things begin in the method at the bottom the ParseRuns method.   public class Parser : IParser { private void OnDoWork(object sender, DoWorkEventArgs e) { ParseRuns(e); } private void OnWorkComplete(object sender, RunWorkerCompletedEventArgs e) { ParserHandler handler = _parsingHandler; if (handler != null) handler(this, new ParserArgs((e.Result as List<Data>)[0].Words, (e.Result as List<Data>)[1].Words, e.Error)); } #region IParser Members private ParserHandler _parsingHandler; event ParserHandler IParser.ParsingCompleted { add { _parsingHandler += value; } remove { _parsingHandler -= value; } } void IParser.Parse(FlowDocument origText, FlowDocument modifiedText) { //nothing to do with null if (origText == null || modifiedText == null) return; //ParseUIThread(origText, mo

System.StackOverflowException occur while Serializing Business Object which implements INotifyProper

I try to implement the NTier scenario for a sample application using Remoting, but while try to implement this it giving me the error that SOAP serializer doesn't support serialization of generic List of....blah blah,,,
So I decided to implement my own serialization process like mentioned below and it works fine,

This is the Interface of the DataCentric Component
 obj As
 Custs) As

'This is where I want to talk to database(haven't implemented yet in this code)<br/>


 obj As

Unmanaged WCF Call Causes StackOverflowException in mscorlib


When I call a simple WCF service from a legacy unmanaged application I get a StackOverflowException in mscorlib some time after the call successfully completes in the service and returns to the calling app.  I have recreated the two approaches I use to make the call via dllexports or roughly the approach here:  http://msdn.microsoft.com/en-us/library/ms734731.aspx from a new unmanaged application and both work correctly. 

  The stack overflow occurs at the latest when I exit the application at which point the stack is:

  MyServicesWrapper.dll!<CrtImplementationDetails>::LanguageSupport::DomainUnload(System::Object^ source = 0x03d1f898, System::EventArgs^ arguments = <undefined value>) Line 769 C++
> msvcm80d.dll!<CrtImplementationDetails>::ModuleUninitializer::SingletonDomainUnload(System::Object^ source = 0x03d1f8b8, System::EventArgs^ arguments = <undefined value>) Line 303 + 0x6b bytes C++

and the disassembly looks like this:

000000ca jne 000000D1

000000cc mov eax,dword ptr [ebp-48h]

000000cf jmp 000000DE

000000d1 mov edx,dword ptr [ebp-48h]

000000d4 mo

StackOverflowException was unhandled when passing in DataContract class


Hi guys, i'm new to WFC and I'm experiencing a problem when I pass my DataContract class:

    public class FileAttachment
        private byte[] binaryBuffer = null;
        private String FileName = string.Empty;

        public byte[] FileBufferByteArray
            get { return binaryBuffer; }
            set { binaryBuffer = value; }

        public string FileAttachmentName
            get { return FileAttachmentName; }
            set { FileAttachmentName = value; }


into the service. I'm constantly getting a System.StackOverflowE

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