Aspose.tasks for .net 在docker 运行会导致容器重启

使用aspose.tasks for .net 将.mpp文件转换成图片,在Windows上面运行正常,放在docker运行会导致docker容器异常重启
报错日志 : ** (process:1): WARNING **: Requested 268011 bytes. Maximum size for region is 262144 bytes.
代码如下:
var project =new Project(projectFilePath);
var saveOptions=new Aspose.Tasks.Saving.ImageSaveOptions(Aspose.Tasks.Saving.SaveFileFormat.JPEG);
project.Save(imageFilePath,options);
1.zip (72.1 KB)

如果存在API问题,则在Windows环境中也是如此。 看来这不是API问题。 您能否确认泊坞窗上也有足够的RAM,因为这可能是原因。

docker 内存充足,可用RAM 16G,而且只有转换此文件会有这个问题。转其他文件都正常。有问题的文件才653K。

@gsh365

您能否分享一下您正在使用的Aspose.Tasks版本。 与.NET 21.1的Aspose.Tasks一样,加载文件时出现异常。
image.jpg (420.2 KB)

版本是 Aspose.Tasks .net 20.11.0

@gsh365

您能否尝试使用.NET 21.1的Aspose.Tasks并分享反馈。

.net 21.1 也不行,同样的错误。

@gsh365
感谢您分享反馈。 在正常的Visual Studio程序中,与您共享给我们的MPP文件不会再现该问题。 该API与重新启动docker没有任何关系。 您能否分享docker详细信息和环境详细信息,以便我可以在我们的问题跟踪系统中记录调查票证。

使用的是.net core 3.1 版本,采用的macrosoft官方docker底包 :FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base

@gsh365

我们的问题跟踪系统已创建了ID为 TASKSNET-4662的票证,以进一步调查和解决问题。 该线程已经与问题相关联,因此,解决问题后,可能会通知您。

Hello @gsh365!
It was found that it is not an Aspose.Tasks issue.
In order to use Aspose.Tasks in Docker container you need to install dependencies:

RUN apt-get update `
&& apt-get install -y --allow-unauthenticated `
    libc6-dev `
    libgdiplus `
    libx11-dev `
 && rm -rf /var/lib/apt/lists/*

After that you will be able to use Aspose.Tasks inside a docker container.

试过了,还是不行。同样的错误

Please try to rebuild your image again and create a new Docker container. We are sure that it is not an Aspose.Tasks issue, but the lack of native dependencies inside a container.

就是重新打包新的docker镜像运行的,但是并没有效果,这个“ Maximum size for region is 262144 bytes. “ 错误是否和什么配置有关 ,比如 vm.max_map_count ?

@gsh365

Oh, now I see that you are saying about this warning. This warning is a warning of Linux GDI lib and can be ignored. As we checked in our internal tests it does not make any issues with rendering on Linux.

We are to refactor the rendering of such large regions in future versions, but as far as is just a warning it is not on top of our priorities.

此问题会造成程序死掉,不继续往下执行。不在docker中运行,直接在linux运行也是一样。
image.png (9.1 KB)

代码如下
image.png (10.2 KB)
image.png (11.8 KB)
image.png (2.3 KB)

@gsh365
Please attach your full Docker file and VS project to help us reproduce the issue. BTW, all our tests are running inside docker containers and we aren’t facing SEGFAULT errors and cannot reproduce it on our end. Thank you!

ConsoleApp4.zip (74.9 KB)
这个完整代码。现在是没有在docker中运行,而是直接在linux 中运行。

@gsh365
感谢您分享信息。 一旦完成调查,我们将尽快与您联系。

Thank you! Can you please share the full Docker file? Did you try to run the ConsoleApp4 on Windows or Linux (using Rider)?