Free Support Forum - aspose.com

PDF to Image (DotNetCore 2.1) - ERROR:region.c:1155:GdipCombineRegionPath: assertion failed: (region->bitmap)

@ivanperever

Thanks for sharing the crash report.

We have logged it as well and will consider it during investigation and let you know about the resolution status of the ticket as soon as we have some updates.

@asad.ali what’s the best way to escalate this? Could purchasing paid support help? This issue makes our service completely unusable atm, and we run out of ideas about what else to try

We tried to extract first page image preview using other vendor (ironpdf) with same document that crashes our our workers - and it worked. So this is not just document, something wrong with library.

@ivanperever

We will surely investigate the ticket as per your feedback and shared information.

You may please check our priority support option (As already shared in our previous comments) where issues are dealt with high precedence. In case you need further information, please feel free to let us know.

Just to comment on this issue. I was having the same issue, I detected this error is coming from the libgdiplus library. So initially I was using libgdi library version 4.2-1. I changed the source to download a newer version of libgdiplus version 6.0.4 to be exact and I stopped having this issue.

@GMarcucciBruce

It is good to know that your issue has been resolved and your comments under this thread are really appreciated. They would really be helpful for those who are facing similar issue.

Hi, I am also running into this error. Is there a fix available? I have tried updating libgdiplus but that doesn’t solve the issue for me. Thanks.

There are more than one reasons why you might end up with a maximum size limit issue. Instead of installing libgdiplus I downloaded libgdiplus source code, increase the memory size and recompiled.

This is the script that I added inside the docker file

#update libgdiplus with custom install
RUN apt-get update
&& apt-get install git -y
&& apt-get install libgif-dev autoconf libtool automake build-essential gettext libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev -y

#clone libgdi plus source code
WORKDIR /usr/local/share
RUN git clone https://github.com/mono/libgdiplus

#patch max memory size
WORKDIR /usr/local/share/libgdiplus/src
RUN sed -i ‘s/1024/10240/g’ region-bitmap.h

#recompile
WORKDIR /usr/local/share/libgdiplus
RUN sh autogen.sh
&& make
&& make install

WORKDIR /usr/local/share
RUN rm -r libgdiplus

@zeeshan1

Would you please confirm if you were able to resolve the issue by the workaround that you have shared?

Is there an update about this? We are having the same issue.

Kind Regards.

@Fred.Net

We are afraid that the earlier logged ticket is not yet resolved. Please note that it is related to specific environment which makes it complex and hard to investigate as we are unable to reproduce this error on our end. Possible reasons of this issue may be incorrect installation of libgdiplus package (as already discussed in this thread and some of the users were able to resolve it). We will surely post an update here once we make some significant progress towards resolution of the linked ticket.

We apologize for the inconvenience.

I have tried the above suggestions but they don’t fix the issue.
I have a reproduction case. Attached is a zip file which contains a complete Visual Studio solution with example pdf and dockerfile. You need docker installed with linux containers.
Then you should be able to run it by just pressing F5. And then the app crashes and in the output window these messages are shown:

** (process:350): WARNING **: 11:53:26.750: Path conversion requested 20751360 bytes (1920 x 2702). Maximum size is 8388608 bytes.
**
ERROR:region.c:1155:GdipCombineRegionPath: assertion failed: (region->bitmap)
The program ‘dotnet’ has exited with code 0 (0x0).

AsposePDFCrash.zip (1.8 MB)

Can you have a look at this repo case?

Btw, if we renew our license do we have paid support? Or do we need to buy additional paid support?

Kind regards

@Fred.Net

We have logged a separate issue as PDFNET-44940 in our issue management system for the sake of investigation against your case. The ticket information has been updated accordingly as well. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We apologize for your inconvenience.

The paid support subscription does not come with normal license. You will have to purchase it separately. For further information, you can please contact our Sales Team.