question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StackOverflowException

See original GitHub issue

I have TypeGen 2.1.1 package installed and am using version 2.1.1 of the CLI.

I created the GenerationSpec below and added it to the root of my project.

    public class MyGenerationSpec : GenerationSpec
    {
        public MyGenerationSpec()
        {
            AddEnum<FarmDTOs.Loss.Causes>();
        }
    }

FarmDTOs.Loss.Causes is an enum inside of a class which resides in a Nuget package:

namespace FarmDTOs
{
    public class Loss
    {
        public string Id;
        public DateTime Date;
        public Causes Cause;
        public int Amount;

        public Loss();

        public enum Causes
        {
            Unspecified = 0,
            Earthquake = 1,
            Fire = 2,
        }
    }
}

When I run dotnet typegen generate I get the following messages:

Generating files for project "."... Process is terminating due to StackOverflowException.

Any ideas as to what would be causing this?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jburzynskicommented, Jan 4, 2019

Turned out this error was due to a typo I made (facepalm)! I’ve uploaded TypeGen 2.1.2 and this should be fixed.

0reactions
ryanbueningcommented, Jan 4, 2019

Awesome. Thanks for the fix and info.

Read more comments on GitHub >

github_iconTop Results From Across the Web

StackOverflowException Class (System)
StackOverflowException is thrown for execution stack overflow errors, typically in case of a very deep or unbounded recursion. So make sure your code ......
Read more >
How do I prevent and/or handle a StackOverflowException?
Stack overflows happen because the data on the stack exceeds a certain limit (in bytes). The details of how this detection works can...
Read more >
Guiide to C# StackOverflowException
The program encounters a StackOverflowException when there is a situation where multiple methods are called in a nested manner, resulting in ...
Read more >
C# StackOverflowException
The stack has limited memory. It can overflow. Typically the StackOverflowException is triggered by a recursive method that creates a deep call ...
Read more >
Type: System.StackOverflowException
StackOverflowException is thrown for execution stack overflow errors, typically in case of a very deep or unbounded recursion. The OpCodes.Localloc Microsoft ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found