Giter Site home page Giter Site logo

Comments (27)

geevargs avatar geevargs commented on August 19, 2024

Ensure condition failed: TextureRHI [File:/home/airspace/UnrealEngine/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLRenderTarget.cpp] [Line: 855]

[2018.03.23-21.29.16:602][592]LogStats: FPlatformStackWalk::StackWalkAndDump - 0.018 s
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: === Handled ensure: ===
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error:
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: Ensure condition failed: TextureRHI [File:/home/airspace/UnrealEngine/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLRenderTarget.cpp] [Line: 855]
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error:
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: Stack:
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 00 0x000000000259e0cf FLinuxPlatformStackWalk::CaptureStackBackTrace(unsigned long long*, unsigned int, void*)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 01 0x0000000002472d05 FGenericPlatformStackWalk::StackWalkAndDump(char*, unsigned long, int, void*)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 02 0x000000000259e089 FLinuxPlatformStackWalk::StackWalkAndDumpEx(char*, unsigned long, int, unsigned int, void*)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 03 0x00000000025e7148 FDebug::EnsureFailed(char const*, char const*, int, wchar_t const*)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 04 0x00000000025d344f FDebug::OptionallyLogFormattedEnsureMessageReturningFalse(bool, char const*, char const*, int, wchar_t const*, ...)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 05 0x0000000003942ba6 FOpenGLDynamicRHI::RHIReadSurfaceData(FRHITexture*, FIntRect, TArray<FColor, FDefaultAllocator>&, FReadSurfaceDataFlags)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 06 0x000000000501dffe PX4/Binaries/Linux/PX4() [0x501dffe]
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 07 0x0000000005078543 PX4/Binaries/Linux/PX4() [0x5078543]
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 08 0x0000000002498056 FNamedTaskThread::ProcessTasksNamedThread(int, bool)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 09 0x00000000024975ae FNamedTaskThread::ProcessTasksUntilQuit(int)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 10 0x00000000039cd32a RenderingThreadMain(FEvent*)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 11 0x00000000039db992 FRenderingThread::Run()
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 12 0x00000000024cdbf7 FRunnableThreadPThread::Run()
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 13 0x00000000024ab440 FRunnableThreadPThread::_ThreadProc(void*)
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 14 0x00007ff02bf5d184 /lib/x86_64-linux-gnu/libpthread.so.0(+0x8184) [0x7ff02bf5d184]
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error: [Callstack] 15 0x00007ff02b0e7ffd /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7ff02b0e7ffd]
[2018.03.23-21.29.16:602][592]LogOutputDevice: Error:
[2018.03.23-21.29.16:602][592]LogStats: SubmitErrorReport - 0.000 s
[2018.03.23-21.29.16:639][592]LogStats: SendNewReport - 0.020 s
[2018.03.23-21.29.16:640][592]LogStats: FDebug::EnsureFailed - 0.038 s
Traceback (most recent call last):
File "", line 1, in
File "/home/airspace/DroneSimLab/UE4PyhtonBridge/src/Wrappers/pyinit.py", line 43, in PyTick
next(main_loop_iter)
File "../../DroneSimLab/demos/unreal_proxies/two_drones/unreal_proxy.py", line 117, in main_loop
img=ph.GetTextureData(drone_textures[drone_index])
File "/home/airspace/DroneSimLab/UE4PyhtonBridge/src/Wrappers/phandlers.py", line 102, in GetTextureData
tmp_capture_mem=np.zeros(req_mem_sz,'uint8')
MemoryError
ending main loop!!

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

I ran a few test cases to diagnose the error:
It appears that the numpy array is full beyond its capacity and thus giving this error.
It only seems to be a problem in packaged games in my 2nd PC it crashes regardless of data being sent to the FDM but this problem is not seen in my dev platform.
after 1min of running.
tmp_capture_mem=np.zeros(req_mem_sz,'uint8')
MemoryError

I believe this error has occurred because I ran it for weeks continuously

I have linux 14,04 and have 12 gb free space on my PC.
Unreal 4.17.2

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

Try to add 2 lines between 101 and 102 in the file "/home/airspace/DroneSimLab/UE4PyhtonBridge/src/Wrappers/phandlers.py",
del tmp_capture_mem # free memory
print('requested size id:',req_mem_sz) #for debug

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

I did the print('requested size id:',req_mem_sz) #for debug
requested size id: 4
requested size id: 8294400

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

del tmp_capture_mem # free memory didnt work...should i redo set_path.py...
This occurs only in binary mode on one Pc but works fine on my dev platform.

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

Can you track the memory usage during the simulation on both systems (the dev platform and the other PC)? You can do it with tools like system monitor. It will help us understand the difference.

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13978 airspace 20 0 6954920 2.059g 195052 R 208.4 13.2 3:34.98 PX4 ----- production platform
19340 sujith 20 0 6126620 2.213g 205272 S 177.4 7.1 1:02.32 MyProject2+ ------dev platform

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

The %memory usage is more than 200% and is 170+ in the dev platform.
Everything else is similar.

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

Production platform:

screenshot from 2018-03-27 16 34 40

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

Dev platform

screenshot from 2018-03-27 16_37_22

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

can you look if the memory usage is increasing?
show me the resource graphs from the moment you open the application until it fails on both stations.

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

Production platform:
screenshot from 2018-03-28 11 37 53
screenshot from 2018-03-28 11 38 05
screenshot from 2018-03-28 11 38 15

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

Dev Platform:
screenshot from 2018-03-28 11 48 05
screenshot from 2018-03-28 11 48 27
screenshot from 2018-03-28 11 49 05
screenshot from 2018-03-28 11 49 26
screenshot from 2018-03-28 11 50 26
screenshot from 2018-03-28 11 51 09

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

I don't really understand why it fails since I can't see any memory issue. but let's try and bypass the problem for now.
try and change line 82 in "phandlers.py" to something like:
tmp_capture_mem=np.zeros(8294400,'uint8')
this hopefully will eliminate the need to reallocating the memory (line 102).

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

I tried tmp_capture_mem=np.zeros(8294400,'uint8') didnt work but i tried the same line in line 102 and the simulator lasted longer but crashed completely after 2 iterations.
thats 1 more than before

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

Can you show me what it was printing when it crashed (the debug lines we added)?

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

Just the debug lines

screenshot from 2018-03-28 15 12 39

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

With the tmp_capture_mem=np.zeros(8294400,'uint8')
screenshot from 2018-03-28 15 15 32

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

I can see the problem now, the requested size is huge. This means some kind of memory corruption somewhere. Try and add some debug prints of the size before the allocation.
print(txt_index,'req_mem_sz is ',sz,ret)
you should see more the one print of this output. send me all of the outputs of that line

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

print(tex_ptr,'req_mem_sz is ',sz,ret) at line 101
screenshot from 2018-03-28 16 39 39

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

it doesnt print txt_index..its not declared before line 168
and the program fails before reaching it.

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

I declared txt_index earlier and did a few prints.
screenshot from 2018-03-29 16 38 33

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

I can see the problem now.
I think it is not directly related to the framework. in the output it says:
Ensure condition fails: TextureRHI: ....

I had this issue before I don't quite remember how I solved it :<
I found a reference to it:
https://answers.unrealengine.com/questions/718835/418h-must-be-first-header-when-packaging-plugin.html?sort=oldest

In any case, I will have a look later this week at my code and let you know if and when I changed anything.

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

have you tried the solution in the link?
adding to the *.build.cs file the line:

PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

screenshot from 2018-04-09 18-32-45

from ue4pyhtonbridge.

geevargs avatar geevargs commented on August 19, 2024

Didnt work but I am gonna keep working on it...do you have any other suggestions?

from ue4pyhtonbridge.

orig74 avatar orig74 commented on August 19, 2024

Since it is PCH related I would try to change the order of the include files in the Source of the game. I think this is how I solved it when had this error.

from ue4pyhtonbridge.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.