mapnik / mapnik

Mapnik is an open source toolkit for developing mapping applications

Home Page:http://mapnik.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

std::bad_alloc exception on Win 10

thorsten1878 opened this issue · comments

I get a bad alloc exception for bigger map sizes. For example a map width the folowing dimensions:

mapnik::Map m(23277, 32000);
mapnik::image_rgba8 im(m.width(), m.height());

produces the error.

Smaller maps like (5000,5000) work well.

Do you have enough ram available?

Which compiler + version?
How do you link and build your project?
Maybe try addin LARGEADDRESSAWARE to the compiler if compiled in win32 with msvc (it should be default if you compile for x64).

maybe related to #4146

can't you just make four images with smaller dimension and stich them together?

(it should be default if you compile for x64).
Is there a 64 bit version of mapnik?

If you compile mapnik for x64, then yes.

Ok, i compiled the x64 version now. But unfortunatelly there is a problen that mapnik cannot find any fonts specified in the xml file now. Never had this problem in x86 version. Is there something special in the x64 version regarding fonts?

No. That's the same. Double check if the passed paths are really existing. E.g. If you use relative paths, check from your current working dir ( it's the console path, not the location of the executable)

I have to use libxml2 instead of rapidxml. Fonts are working now on x64. And bad alloc error is also solved in x64 version. Many Thanks for your help