SiliconStudio / xenko

Old repo for Xenko Game Engine. Please use https://github.com/xenko3d/xenko instead.
http://xenko.com
1.54k stars 346 forks source link

Major rendering and memory issue 1.9.2 Beta #505

Open Reaper1121 opened 7 years ago

Reaper1121 commented 7 years ago

Hello. I am a new user to Xenko game engine and I love it and I will always from now on be a part of this community, while testing Xenko game engine and developing a game I encountered/found 2 major issues:

Engine Version: 1.9.2 Beta

1, If I keep Xenko Engine Editor idling (AFK - Away from keyboard) it seems that Xenko Engine Editor rendering fills up memory to 2gb usage and more! Biggest ram usage from engine being idle I encountered is 1-2gb ram and still going up!

  1. If I Enable Scene->Editor Settings->Antialiasing then Xenko Engine Editor Renderer it seems to stop clearing previously rendered things that produces huge amount ram usage at extreme speed (5gb and more ram usage in just seconds) that also causes extreme lag until it freezes my pc permanently!

I hope these major issues can be solved as soon as possible! PS: I understand that Xenko is still under heavy development and unstable.

Edit: Project rendering that was selected is: Direct3D 11.0/OpenGL ES 3.1 Edit2: Attempted to take a screenshot of issue number 2 and it managed to crash my pc in just 4 seconds! If screenshot is necesarry I will try to take it with some kind of camera. Edit3: Added screenshot for issue 1.

Edit4: My requested system configuration: Windows Version: Windows 10 (Version: 1511 OS Build: 1058.338), 64bit, Graphics Card Vendor: Nvidia, Graphics Card: GeForce GTX 660, Graphics Card Driver Version: 376.19, RAM: 8.00 Gb.

Issue 1 happens on any project BUT Issue 2 seems to happen when a new game project is created using HDR Configuration (HDR Scene Preset) but I also select Direct3D 11.0/OpenGL ES 3.1 rendering! This is what happened when I enabled antialiasing in just a SPLIT second and I disabled it:

image It instantly starts filling up 1GB Memory usage every SPLIT second! How I created issue 2:

  1. Create a new game using configuration: Windows platform, Orientation: Landscape Right, Rendering Direct3D 11.0/OpenGL ES 3.1, Dynamic range: HDR.
  2. Select scene that is currently open in the editor (Should be MainScene).
  3. In Master on selected scene that is currently open in the editor copy "Renderers->Render Effects -> Effects" that contain antialiasing, bloom and other effects then REPLACE it on "Post Processing Effects" in Editor Settings. PS: If doesn't work before copy of master effects set antialiasing quality to 16 instead of 15.
  4. Then enable antialiasing in editor settings post processing effects and it should happen! To know if it worked in a split second just move the editor camera.

Screenshot link of issue 1: CLICK ME Details: (I left Xenko Editor open for about 20 minutes and every second memory increased by 3-4 mb).

Kryptos-FR commented 7 years ago

Thanks for the report and sorry for the inconvenience.

Could you provide more info about your system configuration: Windows version, 32bit/x64, Graphic Card vendor and driver version, amount of physical memory (RAM)? Thanks.

xen2 commented 7 years ago

Also, does it happen on a new game/template or only in your project?

Reaper1121 commented 7 years ago

Issue updated(edited) check it again for more details and information that you requested. PS: Be careful when replicating Issue 2 or it will crash/freeze your pc.

Kryptos-FR commented 7 years ago

I managed to reproduce issue 2 it once out of three attempts. But to me it looks like we should not allow copy/pasting between scene settings and editor settings.

Reaper1121 commented 7 years ago

So is there a way around issue 2? Or do I need to start my scene from scratch? Also it seems that Issue 1 is being triggered by something and I am unable to find that trigger yet. Just randomly happens when I do something. PS: I think copying and pasting between scenes is important if you are creating multiple levels (maps) for a game so I wouldn't need to set effects all the time. Implement some kind of scene linking option if scene setting copy pasting is removed.

Kryptos-FR commented 7 years ago

We will investigate this issue, just don't copy the scene settings to the editor settings for now. I couldn't reproduce issue 1 yet so I don't know what to tell you.

Reaper1121 commented 7 years ago

Thank you. I will wait for a solution and hope that I don't need to start my scene from scratch, for now I'll try to ignore issue 2. I'll keep trying to find issue 1 trigger.

Reaper1121 commented 7 years ago

Hey Kryptios-FR I want to tell you that when I built my project when antialiasing is enabled it generates renderer error in the game too! And I didn't paste anything to the master like you said! If its necesarry I can give you a error log, its something with renderer DrawCore function. Edit: I think its possible that the whole project is now corrupted from just 1 paste to editor settings. I could just send you my project so you can use it for diagnostic purposes.

Kryptos-FR commented 7 years ago

We could reproduce on our end, so we probably don't need your project bu thanks for proposing.

I don't think your project is corrupted, if it opens it means that serialization is correct and thus that the values of the settings are supposedly supported. If not it is more a bug on our end than a corruption.

makotech222 commented 7 years ago

I get issue 1 since like 1.4. It eventually ends in a crash to SharpDX, which i believe I already opened an issue for.

Reaper1121 commented 7 years ago

Good to see someone else that encountered the same issue. I am pretty sure its something with a loop or something that creates memory overload or garbage collector is taking a break on the beach. I never really left it open until it crashes so I didn't encounter SharpDX crash. PS: I am working on my own game engine so I know how engines work.