You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@alexvaler and @lonvia : I am running exactly the same configuration on Windows here, just with my PostgreSQL 17.5 database on a virtual machine with Ubuntu, but osm2pgsql run from under windows. This shouldn't make a difference though.
I see no problems with the latests osm2pgsql build for Windows as downloaded from here and both running osm2pgsql in 'flex' or 'pgsql' mode, both work fine. The flex mode used a custom flex style I developed myself, pgsql mode as per @alexvaler 's setup with just the default style of pgsql mode. Flex mode imported the Geofabrik Denmark extract, pgsql mode Liechtenstein.
By the way @alexvaler : I guess with "16,0 ГБ SSD" you meant to write "16 GB RAM"...
My Windows machine runs with all the latest Windows updates installed.
@alexvaler : I noticed you didn't specify a PostgreSQL schema on your command line. You are aware that from PG15, access to PostgreSQL's default 'public' schema was restricted, and it is highly recommended to create a custom schema and use that to store the data?
EDIT: Just noticed in the manual it is only relevant for 'flex' output, not 'pgsql' as used by you.
I have all the below versions installed, including the latest 2015-2022 version. Having more than one version installed is apparently no problem, as I was never prompted to uninstall older versions, but a newer version may be needed for osm2pgsql.
Activity
lonvia commentedon Jul 31, 2025
Can you please provide a minimal example pbf (preferably not larger than 1 or 2 MB) that produces the crash.
alexvaler commentedon Jul 31, 2025
I use https://slice.openstreetmap.us
test.osm.pbf.zip
Try on https://download.geofabrik.de/europe/liechtenstein.html
Same crash
lonvia commentedon Jul 31, 2025
The file works fine on Linux, so this is a Windows issue for which we can only give limited support, I'm afraid.
Can you please try with the latest build from https://github.com/osm2pgsql-dev/osm2pgsql/actions/runs/16625471270 ? This might be the same issue as #2326, which was fixed in latest master.
If it still crashes, then we'd need a full backtrace of the crash.
alexvaler commentedon Jul 31, 2025
Still crashes with latest build. Can you give me simple way to obtain backtrace?
mboeringa commentedon Aug 1, 2025
@alexvaler and @lonvia : I am running exactly the same configuration on Windows here, just with my PostgreSQL 17.5 database on a virtual machine with Ubuntu, but osm2pgsql run from under windows. This shouldn't make a difference though.
I see no problems with the latests osm2pgsql build for Windows as downloaded from here and both running osm2pgsql in 'flex' or 'pgsql' mode, both work fine. The flex mode used a custom flex style I developed myself, pgsql mode as per @alexvaler 's setup with just the default style of pgsql mode. Flex mode imported the Geofabrik Denmark extract, pgsql mode Liechtenstein.
By the way @alexvaler : I guess with "16,0 ГБ SSD" you meant to write "16 GB RAM"...
My Windows machine runs with all the latest Windows updates installed.
PGSQL Mode:
FLEX Mode:
mboeringa commentedon Aug 1, 2025
@alexvaler : I noticed you didn't specify a PostgreSQL schema on your command line. You are aware that from PG15, access to PostgreSQL's default 'public' schema was restricted, and it is highly recommended to create a custom schema and use that to store the data?
EDIT: Just noticed in the manual it is only relevant for 'flex' output, not 'pgsql' as used by you.
lonvia commentedon Aug 5, 2025
If somebody on Windows can help the OP with creating a stacktrace that would be nice. Otherwise there isn't much I can do.
mboeringa commentedon Aug 6, 2025
I doubt this is an osm2pgsql issue.
I think the OP needs to re-install or update his Microsoft Visual C++ Redistributable, as the failing 'MSVCP140.dll' seems to be part of that:
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
I have all the below versions installed, including the latest 2015-2022 version. Having more than one version installed is apparently no problem, as I was never prompted to uninstall older versions, but a newer version may be needed for osm2pgsql.
mboeringa commentedon Aug 6, 2025
Alternatively, for a stack trace, Microsoft's WinDbg might be an option:
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/