candy
May 29, 2024, 2:30pm
1
I cant do build. Lightmass keeps crashing and I dont know what is the problem. I tried to build it on starter map when unreal 4.27 is opend. I recently started development using blueprints. Here is the error
= Lightmass crashed nhandled Exception: EXCEPTION_ACCESS VIOLATION writing address 0x0000000000000020
Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Programs/Unreallightmass/Private/Lighting/LightingSystem.cpp] [Line: 1458
Static lighting thread exception
Unhandled” Exception: EXCEPTION ACCESS_VIOLATION writing address 0x0000000000000020
0x00007f805c41950 VCRUNTIME140.d11!UnknownFunction [1
0x00007f658e231df Unreallightmass.exe!Lightmass: :FStaticLightingSystem: :ProcessTextureMapping() [1
0x00007f658e099e4 Unreallightmass.exe!Lightmass: : FStaticLightingSystem: : ThreadLoop()
0x00007ff658e04ce3 Unreallightmass.exe!Lightmass: : FilappingProcessingThreadRunnable: :Run() [1
0x00007f£708a9327 Unreallightmass-Core.dI1!UnknownFunction
0x00007ff708a0a40 Unreallightmass-Core.d11!UnknownFunction [1
0x00007ff81e30257d KERNEL32.DLL!UnknownFunction [1
0x00007ff81f2aaad8 ntdll.d1l!UnknownFunction
0x00007f6584f9476 Unreallightmass.exe!Lightmass: :FStaticLightingSystem: :MultithreadProcess() [1
0x00007f658dc8814 Unreallightmass.exe!Lightmass: :FStaticLightingSystem: :FStaticLightingSystem() [1
0x00007f658d7aa69 Unreallightmass.exe!Lightmass: :BuildStaticLighting() [1
0x00007f658da17f7 Unreallightmass.exe!Lightmass: :LightmassMain() [1
0x00007f658dc09d3 Unreallightmass.exelmain() [1
0x00007f658293d4 Unreallightmass.exe! _scrt_common_main_seh() [1
0x00007ff81e30257d KERNEL32.DLL!UnknownFunction [1
0x00007ff81f2aaad8 ntdll.d1l!UnknownFunction
Hi @candy ,
We fixed a lightmass-related bug in Cesium for Unreal v1.29.0:
# Change Log
### ? - ?
##### Breaking Changes :mega:
- Renamed the following properties on `CesiumWebMapTileServiceRasterOverlay`:
- `Url` -> `BaseUrl`
- `West` -> `RectangleWest`
- `South` -> `RectangleSouth`
- `East` -> `RectangleEast`
- `North` -> `RectangleNorth`
- `UseWebMercatorProjection` has been deprecated on `CesiumWebMapTileServiceRasterOverlay`. Instead, use the `Projection` enum property to specify between `Geographic` or `WebMercator` projection.
##### Additions :tada:
- Improved DynamicPawn movement by interpolating to its intended speed. This provides smoother movement over areas with large height variation, e.g., when flying over buildings in a city.
- Added `TileWidth` and `TileHeight` properties to `CesiumWebMapTileServiceRasterOverlay`.
##### Fixes :wrench:
This file has been truncated. show original
However, the latest version that is available for UE 4.27 is v1.24.0:
# Change Log
### ? - ?
##### Breaking Changes :mega:
- Renamed the following properties on `CesiumWebMapTileServiceRasterOverlay`:
- `Url` -> `BaseUrl`
- `West` -> `RectangleWest`
- `South` -> `RectangleSouth`
- `East` -> `RectangleEast`
- `North` -> `RectangleNorth`
- `UseWebMercatorProjection` has been deprecated on `CesiumWebMapTileServiceRasterOverlay`. Instead, use the `Projection` enum property to specify between `Geographic` or `WebMercator` projection.
##### Additions :tada:
- Improved DynamicPawn movement by interpolating to its intended speed. This provides smoother movement over areas with large height variation, e.g., when flying over buildings in a city.
- Added `TileWidth` and `TileHeight` properties to `CesiumWebMapTileServiceRasterOverlay`.
##### Fixes :wrench:
This file has been truncated. show original
Consistent with Epic’s Marketplace rules, we only release new versions of Cesium for Unreal for the 3 most recent Unreal Engine versions (currently 5.2, 5.3, and 5.4). So we highly recommend you upgrade your UE version.
If you can’t do that, your only other option is to backport the fix to your version and build it manually. The pull request that fixed the bug is here:
CesiumGS:ue5-main
← CesiumGS:lighting-guid
opened 12:41PM - 31 Jul 23 UTC
Fixes #1180
UnrealLightmass.exe is a separate process run via Swarm when bui… lding lighting. As reported in #1180, it (always? usually?) crashes when we attempt to build lighting (Build -> Build Lighting Only) for a level that has a Cesium3DTileset in it. Unfortunately it's build without any debug symbols, so I had to build it myself to debug it.
Having done that, I learned that the problem is that every `FStaticMeshLightingMesh` pointed to the same `FStaticMesh` instance, which really couldn't be right. And I learned that that was happening because, on import, all the static mesh references had the same GUID (all zeros!). Ok, so the problem seemed to be back in the Unreal Editor on the export side.
So, I traced through the code that exported the lightmass data, and yep, it was writing a GUID of all zeros. It got that GUID from a property on the `UStaticMesh` called `LightingGuid`. So how is that property set? I searched for it in the UE source code, and saw that things like `DatasmithStaticMeshImporter` call `SetLightingGuid` on the static just before they called `InitResources`. I added the same to our code that creates the static mesh in CesiumGltfComponent, and the lightmass crash went away.
I'll spare everyone the rant about how ridiculous it is that we have to call some random undocumented method on every static mesh we create in order to prevent UE's static lighting baking system from crashing. 🤷