Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 670995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:19:30+00:00 2026-05-14T00:19:30+00:00

My WPF test app (very simple, just one window) is using a 3rd party

  • 0

My WPF test app (very simple, just one window) is using a 3rd party managed dll (say X.dll). This managed dll uses some unmanaged dll’s .
So lets say I write a small wpf app which just references X.dll. And in the window’s constructor I access something inside X.dll (ie. in some namespace in X.dll). On doing this i dont catch any exception and it seems like things are going on as expected. But upon returning the control to .NET runtime, I get an exception in Application class’s ‘DispatcherUnhandledException’ handler :

“Overflow or underflow in the arithmetic operation.”
System.ArithmeticException was unhandled
Message=”Overflow or underflow in the arithmetic operation.”
Source=”PresentationFramework”
StackTrace:

System.Windows.Window.ValidateTopLeft(Double length)
System.Windows.Window.CoerceTop(DependencyObject d, Object value)
System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean skipBaseValueChecks)
System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
System.Windows.DependencyObject.CoerceValue(DependencyProperty dp) at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
System.Windows.Window.CreateSourceWindowImpl() at System.Windows.Window.SafeCreateWindow() at System.Windows.Window.ShowHelper(Object booleanBox)
System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

Some points:

  • This only occurs in WPF app and not in winforms app.
  • This does not get caught in a try-catch. only in Application’s DispatcherUnhandledException
  • This does not happen if I access X.dll’s code inside the Window’s ‘Loaded’ event, only happens in constructor.

Can anyone guess the problem ?

Thanks,
Mishal

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:19:30+00:00Added an answer on May 14, 2026 at 12:19 am

    I am not sure of the root cause yet but the solution is here :
    http://social.msdn.microsoft.com/forums/en-US/wpf/thread/a31f9c7a-0e15-4a09-a544-bec07f0f152c

    Seems to be a popular bug 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 497k
  • Answers 497k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is a version of the bin packing problem http://en.wikipedia.org/wiki/Bin_packing_problem… May 16, 2026 at 12:01 pm
  • Editorial Team
    Editorial Team added an answer Just encode the string account:password in base64 using a Buffer… May 16, 2026 at 12:01 pm
  • Editorial Team
    Editorial Team added an answer All these. May 16, 2026 at 12:01 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a WPF test app for evaluating event-based serial port communication (vs. polling
I want to test portions of a very complex app which includes both a
I am getting strange aliasing behaviour in a WPF app using FluidKit's ElementFlow control.
When hosting WPF user controls within a WinForms MDI app there is a drawing
(Background: I'm porting a WinForms app to WPF in stages. At the present time,
I am working on a drag and drop system for my WPF App. The
I've got a WPF app that has a listbox which I'm trying to apply
On my WPF application, I am using DataContractSerializer to serialize object. I observed that
The same line of code in the same assembly works for one test fixture
WPF applications are, at its core, managed applications? Right? So, I have to choose

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.