Flone-dnb/FWorldGenerator

Crash when enabling complex preview

Closed this issue · 16 comments

Hi! Thank you so much for your work.

I do have an issue, though. I've replicated this on both 4.25 and 4.26, and I've found no workaround.
It crashes when ticking complex preview, without changing any value in the details tab, and then changing any value in the details tab - or changing a value in the details tab and then ticking complex preview.
I've build the plugins from source, version 1.0.2
Unreal error log says:
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000340

Hello. Does the plugin work without using the complex preview? Have you tried generating terrain with it?

No, it does not. Nothing shows in PIE. With complex preview enabled, the terrain does show up, though (if that means anything)

Have you read the "How to use it" part in the readme? It should 100% generate terrain without the complex preview. How do you generate the terrain without the complex preview?

Calling GenerateWorld() from level blueprint fixed the issue.
My mistake entirely. I apologies. Thank you for this.

So now we have verified that the plugin works. Ticking the complex preview option causes a crash right? You've said that you used both 4.25 and 4.26. Do these versions were downloaded from the Epic Games Launcher or from the git version of UE?

Not anymore with GenerateWorld() called from level blueprint. If not, it still does.
The Unreal versions were downloaded from the Epic Games Launcher.

Clone the master branch and rebuild your project with this version of the plugin. Tell me if the issue persists.

The problem still persists. However, adding GenerateWorld to level blueprint prior to ticking complex preview prevents the crash, so things are good on my part.

It should work even without adding the GenerateWorld function to the level blueprint. Could you recreate this issue in a basic FPS template project and send it to me using google drive for example (without including the .vs and Intermediate folders)?

Absolutely.
Blank C++ project with FPS template and with the plugin pulled fresh from master branch and compiled due to versioning.
Unreal version is 4.26.2
https://drive.google.com/drive/folders/1XPZG4BU6wQCXWIBNBmA8t-k2u1_iCMnC

Thanks, I will review it tomorrow (don't have a PC with UE installed right now). Stay tuned.

I've tried your project. Added FWGen to the world, ticked the Complex preview option, and... It generated the terrain as expected. Unfortunately, I was not able to reproduce your issue. Maybe you have some other plugins that may cause this issue? I honestly don't know why you are having this crash. Could you please show me the full call stack from the crash window?

I have no other plugins enabled.
Text from Unreal crash window as well as the related part of the log file is here:
https://drive.google.com/file/d/1v9H5Xqwn_ZCM7uzcDPAqSmDutRs--9zQ/view?usp=sharing

Does your FWGen instance have default parameters? Because from your log I see it's generating 14 chunks but by default, it generates only 9.

Oh yes, I've noticed that changing properties when the Complex Preview is enabled causes a crash. I initially didn't want to add Complex Preview at all because of how unstable it may be. Now I see. This is actually not the first issue with the Complex Preview, there were a few before. I don't use UE anymore and I don't remember the design of this plugin because I've developed it pretty long ago so I don't know how to fix this. Just don't use Complex Preview I guess. :)

P.S. I have added a warning in the readme about this issue. Thanks.

Okay, it is now figured out. Thanks For all the help :)