Open dawsidious opened 2 months ago
I tried to repro this. My build works without any issues. The environment is plain Windows Server 2022 with Git and Dotnet8 installed. The self-contained app works as well.
Could you please post a MRE if available. Also you can try to run LDD from GitBash. See this comment for details https://github.com/MaxRev-Dev/gdal.netcore/issues/143#issuecomment-2286585656
Thanks for info.
I have recreated a Windows Server 2022 eval from scratch, to have the same version as you (cf screenshot). It is a virtual machine running under proxmox VE 8.
Then i have generated a MRE project as minimal as possible to reproduce the same behavior (it is ok on win 11 but not win 2022). I Have set the full project (+ publish folder) on my onedrive : https://1drv.ms/f/s!Agg2DlhA4TQqjZRlu-xnv_DtLU1siA?e=lItaIO
for the LDD git bash, i can run it on the project .dll but when i try to use it on gdal.dll or gdal_wrap.dll, it keeps running for few hours without displaying any output. do you know if it is the normal behavior ?
Since we use the exact same version of SRV2022 EVAL (without any modification), i think we can skip this issue. Maybe it is either related to the virtual machine itself, or the project. But the project with older version of GDAL (offical one) without moving to maxrev.gdal.core was working on the SRV2022 server.
any idea ? :)
I am experiencing something very similar. But I am not even getting it to work on Windows 10.
I have the following installed: maxRev.Gdal.Core 3.9.1.247 maxRev.Gdal.Universal 3.9.1.247 maxRev.Gdal.WindowsRuntime.Minimal 3.9.1.247
We found that this seems to be missing as a dependency of gdal_wrap.dll. I am not sure if this is exactly the same issue as stated above, otherwise I can also open a new issue. But it seems very similar. @MaxRev-Dev I am not sure if you can reproduce this and maybe this fix via this issue already.
Here is my error code. For what I can see exactly the same as the error message that @dawsidious received.
System.TypeInitializationException
The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception.
at OSGeo.GDAL.GdalPINVOKE.AllRegister()
at OSGeo.GDAL.Gdal.AllRegister()
at MaxRev.Gdal.Core.GdalBase.ConfigureGdalDrivers(String gdalDataFolder)
at MaxRev.Gdal.Core.GdalBase.ConfigureAll()
at AiChangeDetectionModel.Services.AiChangeDetectionModelService.SaveArrayTif(DenseTensor1 imgArrayOutput, String name, ValueTuple
2 upperLeft) in C:\DevOpsIT\GIS.Viewer\BorePlannerZonderBP\src\AiChangeDetectionModel\Services\AiChangeDectectionModelService.cs:line 158
at AiChangeDetectionModel.Services.AiChangeDetectionModelService.Run() in C:\DevOpsIT\GIS.Viewer\BorePlannerZonderBP\src\AiChangeDetectionModel\Services\AiChangeDectectionModelService.cs:line 66
at AiChangeDetectionModel.Tests.AiChangeDetectionModelServiceTests.TestRunAiChangeDetectionModel() in C:\DevOpsIT\GIS.Viewer\BorePlannerZonderBP\src\AiChangeDetectionModel.Tests\AiChangeDetectionModelServiceTests.cs:line 11
at System.Threading.Tasks.Task.<>c.
System.TypeInitializationException The type initializer for 'SWIGExceptionHelper' threw an exception. at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper..ctor() at OSGeo.GDAL.GdalPINVOKE..cctor()
System.DllNotFoundException Unable to load DLL 'gdal_wrap' or one of its dependencies: The specified procedure could not be found. (0x8007007F) at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_Gdal(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate) at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper..cctor()
@dawsidious I took me a while. I have installed VirtualBox and with the same configuration I have a repro. I suppose it's missing instructions in VM, because if falls down to kernel on profiling via dependency walker while having the identical set of dependencies and same OS configuration (almost). ~It can be~ a missing AVX2 instruction.
It's 100% missing AVX2, I have tested with disabled Hyper-V.
I can't test it currently but recommend you to try disabling Hyper-V and this will enable AVX/AVX2 instructions in your VM. OR use Hyper-V managed virtual machine.
Edit: I had to disable Core Isolation > Memory Integrity to force turn off Hyper-V.
Hello there :-)
I have an ASP.NET WEB API c# project using gdal which includes :
I tried both 3.9.1.246 and 3.9.1.247 (both failed).
I publish it through Visual studio with these parameters:
the project runs fine on :
output :
the project crashes on windows server 2022 (21H2 20348.2655 OR 20348.2461).
the file gdal_wrap.dll is already in the folder; do you have any idea on what i do wrong ? :) Thanks a lot for your help !