OutOfMemoryException during publishing a big library project

Installer(.exe or .msi):

.exe

License type(Free, Trial/License code):

Free

Studio/Robot version:

I have tried v18.3.2 and v19.6.0.

Current behavior:

UiPath Studio throws OutOfMemoryException when I publish a library project which contains about 250 xaml files.
Windows task manager shows that UiPath uses over 3GB memory.
I think UiPath cannot use over 4GB memory because it is a 32-bit system.

Do anyone have a idea how to avoid this problem?
I know I can avoid the problem if I divide the library project into smaller projects.
But I don’t want to divide it because xaml files have dependencies between each other and I already use the library for many robots.

Thank you.

Screenshot:

OutOfMemoryException.zip (1.5 KB)

Hope this could help you

Cheers @ark

Thank you for your replay.

I increased maxReceivedMessageSize after your post.
( Now, maxReceivedMessageSize seems to be defined in UiPath.Service.Host.exe.config. )

But it didn’t work.

Do you have any other ideas?

I am facing exactly the same issue . Have you solved ?
Could you help me ? thanks a lot

Sorry, I haven’t.
Publish sometimes succeed after restarting Studio.
So, I make it through now.
But I know it won’t work if I add more xaml files to the project.

@ark Can you approximate the average file size?

@alexg The average file size is 12 KByte.

The biggest one is 400KByte.
The second biggest one is 48 KByte.

Thank you.

@alexg I made a sample project which causes OutOfMemoryException.
It contains 250 xaml files which are all the same content.
the file size is under 6 Kbyte.

Common.Activities.OOM.zip (389.1 KB)

I tried this problem again with UiPath 19.9.
OutOfMemoryException occured during compiling 57th xaml.
This problem may get worse.

Common.Activities_80_19.9.zip (115.2 KB)

COMPILER: Compiling [56/80] - ‘C:\Users\robouser01\Documents\UiPath\Common.Activities\common\test061\Test.xaml’
COMPILER: Compilation of ‘C:\Users\robouser01\Documents\UiPath\Common.Activities\common\test061\Test.xaml’ completed (787 ms)
COMPILER: Compiling [57/80] - ‘C:\Users\robouser01\Documents\UiPath\Common.Activities\common\test065\Test.xaml’
Unexpected error has occurred during the library compilation process:
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
at System.Reflection.Internal.NativeHeapMemoryBlock.DisposableData…ctor(Int32 size)
at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Boolean isFileStream, Int64 start, Int32 size)
at System.Reflection.PortableExecutable.PEReader…ctor(Stream peStream, PEStreamOptions options, Int32 size)
at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation)
at UiPath.ActivityCompiler.Compiler.DependencyHelper.<>c.b__1_1(Type s)

This issue should be fixed in the coming 2019.10 version :slight_smile: