Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. StackOverflowException in PresentationCore.dll

StackOverflowException in PresentationCore.dll

Scheduled Pinned Locked Moved WPF
debugginghelpcsharpwpftutorial
2 Posts 2 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yoyosch
    wrote on last edited by
    #1

    I wrote a simple application in WPf and I`m getting StackOverflowException in PresentationCore.dll. It seems to be WPF bug. It`s impossible to debug or trace the cause, since exception occurs not in my code. I`m attaching the sample application which produces this exception (http://62.233.162.212/martinez/SMOG/Sample%20application.rar[^]) How to produce this exception in this application: 1. The application initially contains 2 polygons. Enlarge the "brown" one a bit 2. Turn off snaping (upper-left corner checkbox) 3. Insert the second polygon inside the former one 4. Move the bigger polygon one or two times - it always throws this exception. Thank you very much for any help

    P 1 Reply Last reply
    0
    • Y Yoyosch

      I wrote a simple application in WPf and I`m getting StackOverflowException in PresentationCore.dll. It seems to be WPF bug. It`s impossible to debug or trace the cause, since exception occurs not in my code. I`m attaching the sample application which produces this exception (http://62.233.162.212/martinez/SMOG/Sample%20application.rar[^]) How to produce this exception in this application: 1. The application initially contains 2 polygons. Enlarge the "brown" one a bit 2. Turn off snaping (upper-left corner checkbox) 3. Insert the second polygon inside the former one 4. Move the bigger polygon one or two times - it always throws this exception. Thank you very much for any help

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      The problem isn't with WPF. It's your code that's at fault - basically you have entered an infinite loop in MovePolygon where you execute this section:

      foreach (var item in children)
      {
      item.MovePolygon(xDestination, yDestination);
      }

      You seem to be iterating through the same item every time, and I'm guessing this isn't the effect that you want.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups