ThinkGeo.com    |     Documentation    |     Premium Support

Fails to open proj.db

Hi,

I am encountering a crash whilst using an OpenStreetMapAsyncLayer with a GDALProjectionConverter. This is present in 14.3.0-beta018 and beta027.

I’ve created a minimal project which replicates the issue (which is a modified version of the OpenStreetMap HowDoI Sample).
The application crashes with the error ‘PROJ: proj_create_from_database: Open of C:\Users\john.gibb\Code\ThinkGeoCrash\ThinkGeoCrash\bin\AnyCPU\Debug\Test®\net48\runtimes\win-x64\native\projlib\proj.db failed’.

This issue seems to be related to the ‘®’ registered trademark symbol being in the path of the application as removing this resolves the issue.

Cheers

ThinkGeoCrash.zip (5.0 KB)

Hi John,

Remove the “®” from the OutputPath in csproj would fix the issue.

I also changed your code a bit to following:

var point = new PointShape(475930.233468624, 6206959.17296505);
await MapView.CenterAtAsync(point);
//await MapView.ZoomToAsync(point, 1);  // 1 would be scale instead of zoomlevel
await MapView.ZoomToAsync(point, MapView.ZoomLevelSet.ZoomLevel06.Scale);
await MapView.RefreshAsync();

And here is the result

Thanks,
Ben

Hi Ben,

Unfortunately we cannot remove the “®" from our app as it has been shipping with it for years.

Previous versions of thinkgeo have worked fine (most recently 14.1.1)

We updated from this version to resolve security issues in one of ThinkGeos dependencies (I think is was System.Text.Json)

Cheers

Hi John,

We updated Gdal from v2.X to the latest V3.9 in ThinkGeo v14.2. The new architecture in Gdal V3.X relies heavily on the proj.db file, and paths with special characters (like ® ) cannot be handled properly due to differences in how PROJ or SQLite resolves file paths. The old version Gdal V2.x was using csv files for coordinate system definitions so didn’t have this issue.

I think it’s better to remove the special characters from the path for the long term. If you guys cannot make the changes currently, maybe go back to v14.1.1 and update the obsoleted dependency System.Text.Json? We can create an issue in gdal see what they say about it.

Thanks,
Ben