iOS build crashes when starting

I tried to launch my Project on an iPad Air 2 with the Project Launcher from the Editor. Settings: Development, Databuild: by the book or on the fly.

While the game is starting I can hear the music of the main menu for a second and then it crashes. The Project Launcher shows

WebKit Threading Violation - initial use of WebKit from a secondary thread.

UE 4.8.2 Launcher Version

[Project Launcher Log][1]

51149-projectlauncher.log (2.16 MB)

That violation is a message coming from instruments. Could you get the log off the device? Go to the Devices window in Xcode, click on your device, click on the game in the list of the apps, and click on the cog. From there select, download container. Open up that container and find the Saved/ directory (under Documents). Inside there should be a log file from the game execution itself. Hopefully that will tell us something about your crash.

-Pete

Thank you. In this Log there is no reason for the crash. Here is the Log and the crash log of the device:

Ok, it crashed in the render thread and I believe I may have already fixed this bug for 4.9. The potential workaround for the time being is to disable Metal in your iOS Project Settings. This will cause it to utilize the ES2 renderer, but it should avoid the crash. Give that a try and let me know if it works for you.

-Pete

Thank you. This helps to start the game to the main menu. But I get a crash when when I try to start any level.

Hey,

I have requested for the iOS developer to look at your more closely. I have not heard back yet but when I do, he or I will contact you with further information. Thank you for your patience.

The new log also shows a crash in the render thread, but I’m not sure what that one is. Do you have lighting enabled or post processing enabled of any sort?

-Pete

Yes lighting and post processing are enabled but they are working in the main menu scene (3D Scene)
The main menu uses 1 Point Light 2 Spot Lights 1 Directional Light and 1 Sky Light (all Stationary). It doesn’t looks correct at some places but it doesn’t crash.
One simple Level uses 3 Point Lights 1 Directional Light and 1 Sky Light (all Stationary) with the same post processors as the main menu and crashes immediately.

Hey,

Have you tried taking out the lights in the level that’s crashing one by one to figure out exactly which one it is? If so, what did you find? Did recreating the lights fix the issue?

Let me know. :slight_smile:

Hey,

We have not heard from you in quite some time and for that reason, this thread must be marked as resolved. If you have any further questions or concerns, please reply back and we will be more than happy to assist you further.

Thank you and have a nice day!

Hi,
sorry for the late answer. I was in holidays.

I’ve removed all lights from the level and I get the same crash.

Now I’ve found the reason for the crash.

I’m using the Function “RHILockIndexBuffer” that causes the crash:

ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER(
	UpdateIndexBuffer,
	FRawStaticIndexBuffer*, IndexBuffer, &pLODResource.IndexBuffer,
	{
		RHILockIndexBuffer(IndexBuffer->IndexBufferRHI, 0, IndexBuffer->IndexBufferRHI->GetSize(), RLM_ReadOnly);
		RHIUnlockIndexBuffer(IndexBuffer->IndexBufferRHI);
	});
FlushRenderingCommands();

This works fine on Windows and OSX and this is essentially for our game. Is there any explanation for this crash?

Hey,

We’re currently looking into the issue that you’re having with your project. We need to know whether or not you’re having an assertion failure, or a crash. Do you have a crash reporter that populates, or any type of error message? If there is an error message, please provide us a screenshot. If you are able to obtain some additional , please upload them to your next reply.

Thanks!

I have no additional error message. When running on iOS the App closes and I see the crash log in Xcode. If I comment out the two lines (lock and unlock) the level opens without problems.
I’m new to iOS development. Is there any way to get more information about the crash?

[How to get off of an iOS device:][1]

Windows:

  • Open iPhonePackager (Engine/DotNET/IOS)
  • Select a uproject file (Optional)
  • Select the Advance Tools tab
  • Select Other Deployment Tools…
  • Select Backup Documents…
  • Select the IPA for the game you wish to get a log for
  • The documents directory data will then be copied to - Engine/DotNET/IOS/IOS_Backups or GameDir/IOS_Backups if a uproject was selected
  • The log can then be found at IOS_Backups/Game/Saved/

Mac:

  • Open Xcode (Install Xcode if you have not already)
  • Open Window|Devices
  • Select the device you want to get the log off of
  • Select the app you want to get the log from
  • Select the gear icon under the app list
  • Select Download Container
  • Select a location for the container file
  • Navigate to the file via Finder
  • Right click and select Show Package Contents
  • Navigate to the location of the log (AppData/Documents/Game/Saved//)

Once you’ve obtained the , please upload them as a .txt file so we can review them further.

Thanks! :slight_smile:

A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Hi.

I’ve already done this. You can find the Log in the comments above named as Paperboat.log but there are no additional informations about the crash.

Hey ,

The bug you were having last week should be resolved as of today, due to the release of 4.9. Could you verify that for us?

Thank you!