Skip to main content
edited title
Link
user2357112
  • 278k
  • 2
  • 31
  • 40

How should we handle recursive getter/setter StackOverflowException questions?

Active reading [<www.youtube.com/watch?v=1Dax90QyXgI&t=17m54s> <en.wiktionary.org/wiki/hundred#Numeral> <en.wiktionary.org/wiki/canonical#Adjective>]. Fixed the question formation - missing auxiliary verb - see <www.youtube.com/watch?v=t4yWEt0OSpg&t=1m49s> (QUASM). More representative link text.
Source Link
Peter Mortensen
  • 31.6k
  • 4
  • 22
  • 14

How toshould we handle StackOverflowException questions?

Periodically questions are posted where the OP uses a property in its getter/setter which leads to recursive calls and as a result toresults in StackOverflowException. The most recent one is herehere.

How toshould we handle such questions?

In my opinion, these are typos and have to be closed: instead of typing the backing field name, the OP has typed the property name. I guess every programmer has to face this error once, some. Some of them (those hopeless kind) will ask a question on SOStack Overflow, and it means there will be hunderedshundreds of such questions, not linked, not shown as relevant, etc.

Closing a question as duplicate is an option too. We have cannonical duplicate for NullReferenceExceptiona canonical duplicate for NullReferenceException), but I am unable to find one for StackOverflowException.

Yet, every such question (at least from my experience) receive thereceives an answer, which in my opinion is wrong.

How to handle StackOverflowException questions?

Periodically questions are posted where OP uses property in its getter/setter which leads to recursive calls and as a result to StackOverflowException. The most recent one is here.

How to handle such questions?

In my opinion, these are typos and have to be closed: instead of typing backing field name OP has typed property name. I guess every programmer has to face this error once, some of them (those hopeless kind) will ask a question on SO, means there will be hundereds of such questions, not linked, not shown as relevant, etc.

Closing question as duplicate is an option too. We have cannonical duplicate for NullReferenceException, but I am unable to find one for StackOverflowException.

Yet every such question (at least from my experience) receive the answer, which in my opinion is wrong.

How should we handle StackOverflowException questions?

Periodically questions are posted where the OP uses a property in its getter/setter which leads to recursive calls and results in StackOverflowException. The most recent one is here.

How should we handle such questions?

In my opinion, these are typos and have to be closed: instead of typing the backing field name, the OP has typed the property name. I guess every programmer has to face this error once. Some of them (those hopeless kind) will ask a question on Stack Overflow, and it means there will be hundreds of such questions, not linked, not shown as relevant, etc.

Closing a question as duplicate is an option too. We have a canonical duplicate for NullReferenceException), but I am unable to find one for StackOverflowException.

Yet, every such question (at least from my experience) receives an answer, which in my opinion is wrong.

Became Hot Meta Post
Source Link
Sinatr
  • 21.9k
  • 2
  • 29
  • 54

How to handle StackOverflowException questions?

Periodically questions are posted where OP uses property in its getter/setter which leads to recursive calls and as a result to StackOverflowException. The most recent one is here.

How to handle such questions?

In my opinion, these are typos and have to be closed: instead of typing backing field name OP has typed property name. I guess every programmer has to face this error once, some of them (those hopeless kind) will ask a question on SO, means there will be hundereds of such questions, not linked, not shown as relevant, etc.

Closing question as duplicate is an option too. We have cannonical duplicate for NullReferenceException, but I am unable to find one for StackOverflowException.

Yet every such question (at least from my experience) receive the answer, which in my opinion is wrong.