jellyfin / TMDbLib

C#.Net library for TheMovieDB
MIT License
344 stars 128 forks source link

System.StackOverflowException caused by Newtonsoft.Json v9.0.1 #409

Closed 0x6d61726b closed 8 months ago

0x6d61726b commented 2 years ago

When adding TMDbLib nuget packet to an empty C# console application using .NET Framework 4.6.1, a System.StackOverflowException (HResult=0x800703E9) is thrown when the following line gets executed: https://github.com/LordMike/TMDbLib/blob/5b9e93e581c348fb0289929fd0469227df21239f/TMDbLib/Utilities/Serializer/TMDbJsonSerializer.cs#L14

The test application is copied from the example:

internal static class Program
{
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    private static void Main()
    {
            TMDbClient client = new TMDbClient("apiKeyRemoved");
            Movie movie = client.GetMovieAsync(47964).Result;
            Console.WriteLine($"Movie name: {movie.Title}");
    }
}

This issue seems to be related to Newtonsoft.Json v9.0.1 and is gone as soon as any newer version (starting with v10.0.1 up to v13.0.1) is used.

cvium commented 8 months ago

Fixed by #439