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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. StackOverflowException [SOLVED] [modified]

StackOverflowException [SOLVED] [modified]

Scheduled Pinned Locked Moved Visual Basic
data-structures
3 Posts 2 Posters 1 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.
  • realJSOPR Offline
    realJSOPR Offline
    realJSOP
    wrote on last edited by
    #1

    ...in a method called by a property within an object that is one of over 68,000... In my 30 years of programming, I've never once experienced a stack overflow, until today. Each time I run the program, the exception is thrown at a different spot. I'm in hell. EDIT ============ I moved about 60 lines of code from within a property to its own method, and had neglected to change some variable names to coincide with the move. The property was doing something like this:

    Public Property Total As Decimal
    Get
    'do some stuff
    Total = Total + x
    End Get

    Every time it referred to Total on the right side of the = operator, it ran through this property code again. In essence, it was a recursive method.

    .45 ACP - because shooting twice is just silly
    -----
    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
    -----
    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

    modified on Tuesday, January 5, 2010 4:43 PM

    M 1 Reply Last reply
    0
    • realJSOPR realJSOP

      ...in a method called by a property within an object that is one of over 68,000... In my 30 years of programming, I've never once experienced a stack overflow, until today. Each time I run the program, the exception is thrown at a different spot. I'm in hell. EDIT ============ I moved about 60 lines of code from within a property to its own method, and had neglected to change some variable names to coincide with the move. The property was doing something like this:

      Public Property Total As Decimal
      Get
      'do some stuff
      Total = Total + x
      End Get

      Every time it referred to Total on the right side of the = operator, it ran through this property code again. In essence, it was a recursive method.

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      modified on Tuesday, January 5, 2010 4:43 PM

      M Offline
      M Offline
      MikeMarq
      wrote on last edited by
      #2

      Was this meant as a question or a comment?

      John Simmons / outlaw programmer wrote:

      In my 30 years of programming, I've never once experienced a stack overflow, until today.

      Wow, either you're a really good programmer or you must not have written many recursive functions in that time.

      realJSOPR 1 Reply Last reply
      0
      • M MikeMarq

        Was this meant as a question or a comment?

        John Simmons / outlaw programmer wrote:

        In my 30 years of programming, I've never once experienced a stack overflow, until today.

        Wow, either you're a really good programmer or you must not have written many recursive functions in that time.

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        I think it's more luck than anything else. And yes, I've done my fair share of recursive functions.

        .45 ACP - because shooting twice is just silly
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

        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