efcore: Sqlite.NetTopologySuite caused the program to crash. Failure module:libwinpthread-1.dll

I used it in the project Microsoft. EntityFrameworkCore. Sqlite It works

Installation of the Microsoft.EntityFrameworkCore.Sqlite.Net TopologySuite After that, Run the program, do nothing, about twenty to forty minutes or so, the program crashes.

Exception message: Stack trace:Application Error

  • <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  • <System> <Provider Name="Application Error" /> <EventID Qualifiers="0">1000</EventID> <Level>2</Level> <Task>100</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2019-01-31T04:38:57.419531300Z" /> <EventRecordID>342764</EventRecordID> <Channel>Application</Channel> <Computer>ThinkPad_FlyFire</Computer> <Security /> </System>
  • <EventData> <Data>dotnet.exe</Data> <Data>2.2.27207.3</Data> <Data>5c0ab1b7</Data> <Data>libwinpthread-1.dll</Data> <Data>1.0.0.0</Data> <Data>00000000</Data> <Data>40000015</Data> <Data>0000000000008dc5</Data> <Data>47fc</Data> <Data>01d4b919fdd00ceb</Data> <Data>C:\Program Files\dotnet\dotnet.exe</Data> <Data>C:\Users\lg\.nuget\packages\mod_spatialite\4.3.0.1\runtimes\win-x64\native\libwinpthread-1.dll</Data> <Data>75462f9e-1755-45f5-af3a-573b3b52a2f5</Data> <Data /> <Data /> </EventData> </Event>

Steps to reproduce

        public static void Configure(DbContextOptionsBuilder<DbContext> builder, DbConnection connection)
        {
            builder.UseSqlite(connection, b =>
            {
                b.UseNetTopologySuite();
            });
        }
    }

### Further technical details
  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite" Version="2.2.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.1">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.1" />
  </ItemGroup>
Operating system: Windows 10(1803)  17134.472、Server2008R2
IDE: (e.g. Visual Studio 2017 15.9.5)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 43 (23 by maintainers)

Most upvoted comments

EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.

BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we’d like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.

Can you please re-open this issue? I am able to trigger a crash within a minute after starting an asp.net core app by repeating a very simple query. I have new code below, which includes the reference to the updated mod_spatialite build. I realized the previous repository I referenced did not load properly in Visual Studio when cloned. Just clone the repository below and start the application from Visual studio (no other setup should be required):

https://github.com/clarkgranum/ef_core_spatialite_issue_14561

I’m using mod_spatialite-4.3.0a. This post solved it for me.

I used a already build binary of the mod_spatialite dll with it’s dependencies (build at 18.01.2018) and then I replaced the libstdc++_64-6.dll and libgcc_s_seh-1.dll file (the hint being from the linked post) with the dll from mingw64 (version x86_64-8.1.0-release-win32-seh-rt_v6-rev0).

I never had a problem caused by the database since then.