20tab / UnrealEnginePython

Embed Python in Unreal Engine 4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Importing any package in ue_site crashes Editor during launch

shantanusingh16 opened this issue · comments

Hi,
I'm currently facing an issue where this plugin crashes the editor during launch if any package is imported in the ue_site.py file in the Content/Scripts folder. The error is always segmentation fault as shown in the log below:

[2019.09.19-13.14.25:354][ 0]LogUdpMessaging: Initializing bridge on interface 0.0.0.0:0 to multicast group 230.0.0.1:6666. [2019.09.19-13.14.29:926][ 0]LogAndroidPermission: UAndroidPermissionCallbackProxy::GetInstance [2019.09.19-13.14.30:843][ 0]SourceControl: Source control is disabled [2019.09.19-13.14.30:843][ 0]SourceControl: Source control is disabled [2019.09.19-13.14.30:957][ 0]SourceControl: Source control is disabled [2019.09.19-13.14.31:290][ 0]SourceControl: Source control is disabled [2019.09.19-13.14.32:790][ 0]LogPython: Python Scripts search path: . [2019.09.19-13.14.32:790][ 0]LogPython: Python Scripts search path: . [2019.09.19-13.14.32:790][ 0]LogPython: Python VM initialized: 3.6.8 (default, Aug 20 2019, 17:12:48) [GCC 8.3.0] UE4Editor: malloc.c:2401: sysmalloc: Assertion '(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. Signal 6 caught. Malloc Size=65538 LargeMemoryPoolOffset=65554 CommonUnixCrashHandler: Signal=6 Malloc Size=65535 LargeMemoryPoolOffset=131119 Malloc Size=68112 LargeMemoryPoolOffset=199248 Malloc Size=145512 LargeMemoryPoolOffset=344776 Realloc PtrSize=68112 NewSize=145512 PooledPtr=0x00007f822dd10040 Malloc Size=253872 LargeMemoryPoolOffset=598672 Realloc PtrSize=145512 NewSize=253872 PooledPtr=0x00007f822dd20a60 Malloc Size=402480 LargeMemoryPoolOffset=1001168 Realloc PtrSize=253872 NewSize=402480 PooledPtr=0x00007f822dd442e0 Malloc Size=565728 LargeMemoryPoolOffset=1566912 [2019.09.19-13.14.32:963][ 0]LogCore: === Critical error: === Unhandled Exception: SIGABRT: abort() called
Steps to reproduce the above bugs:

  1. Create a new C++ project using Unreal Editor.
  2. Close the project and clone the UnrealEnginePython repository to the Plugins folder.
  3. Create a symbolic link from '/usr/include/x86_64-linux-gnu/python3.6m' to '{Project_Dir}/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Include/x86_64-linux-gnu'.
  4. Edit the UnrealEnginePython.Build.cs and add the following line under TargetPlatform == Linux (Line 235)
    PublicIncludePaths.Add(System.IO.Path.Combine(ModuleDirectory, "Include"));'
  5. Open the project again from the editor and let it compile. It should work.
  6. Now close the project and in the Content/Scripts directory, create a file named ue_site.py.
  7. Edit that file and import any package, that you already have installed, in it such as :
    import numpy
  8. Now reopen the project using the editor. It will crash after initializing the Python VM.

Let me know if anything else is needed from my end.

-Shantanu

I have the same problem.

I am getting an error message when I change a python module in python component.

UE4Editor: malloc.c:2401: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Signal 6 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554

Then unreal engine was paused.

Environment: 18.04
Unreal Engine version: 4.22.3
python 3.6.9
clang: 7.0.1
additional dependencies: ue4cli, conan-ue4cli