x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

iOS crash on Launch with Distribution package

I am currently using 4.12 with both an iPod Touch and an iPhone 6S Plus, both of which are running iOS 9.3.2. I am working on a plugin and we are using the QAGame example as our testbed app.

When I use the launch option, I am able to run my app just fine and the plugin works as intended. When I package the app for distribution and then install it onto the devices using iTunes, it will start, flash the splash screen, then crash. Here is a crash log from the crash.link text

Product Version: UE 4.12
Tags:
more ▼

asked Jun 22 '16 at 06:15 PM in Packaging & Deployment

avatar image

Kim Power
1 1 3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Thank you again for pointing out that the Generate Chunks option was a deciding factor in the app crashing or not. After taking a look at the logs in conjunction with knowing that, one of our iOS platform developers noticed that it is an issue with a lack of content when generating chunks. In this case, the data being packaged for the app isn't large enough for a chunk to be generated which results in the app not having any data. When the app attempts to pop up with an error due to the lack of data, it crashes due to the Push Notifications being disabled.

A fix is on its way for the Generate Chunks issue not generating anything without a certain amount of content and I should be able to provide you with a GitHub link for that sometime later today so you can integrate it if you would like. I'll update here whenever I have a hold of that.

more ▼

answered Jun 30 '16 at 02:04 PM

avatar image Matthew J Jun 30 '16 at 08:48 PM

Looks like the PR is for the message crash itself rather than the chunking problem. Here's a link to it: https://github.com/EpicGames/UnrealEngine/pull/2547

avatar image Kim Power Jun 30 '16 at 09:30 PM

Is there a way I can get the change from Perforce? We have usually used Perforce to get our Unreal versions and I don't have a Github account even setup.

avatar image Matthew J Jul 01 '16 at 01:21 PM

The change has yet to be integrated into the engine, as it was proposed by a user and is under review, so there isn't a changelist for it quite yet. If you need the change immediately, then making a Github account and linking it to your Epic Games account would be the best option. Once the change has been integrated I'll be able to provide you with the changelist here but until then, Github is the only option.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hello Kim,

If you wish to install your application through iTunes, you'll need to package your project for Shipping. Distribution will only work if the application is installed through the App Store. If your project continues to have issues in shipping, please let me know and we can continue investigating.

more ▼

answered Jun 23 '16 at 07:52 PM

avatar image Kim Power Jun 23 '16 at 08:42 PM

So I packaged it for shipping and it still crashes. Here is the last part of the launcher log where it packages it.link text

packaging.txt (4.4 kB)
avatar image Matthew J Jun 23 '16 at 09:27 PM

I apologize, I should've been more detailed in my original response. I didn't fully understand it myself, but I do now so at least we're both learning.

When packaging for iOS, the packages have to be signed with either a Distro (Distribution) provision or a Shipping/Developer provision. A Distro provision would be used to sign the package when you wish to push it to the App Store while the Developer provision would be used when you wish to install it directly as you are.

From looking at the logs it's currently signing it with the Distro license which can be seen on this line:

IPhonePackager: Using mobile provision 'AllMerc_QAGame_Distro' to code sign

Please make sure you have a Developer provision in your iOS settings under Edit > Project Settings and then also ensure that "For Distribution" isn't checked under the Packaging section of Project Settings. This should allow for it to be signed for Development, allowing you to use the package the way that you're attempting to.

avatar image Kim Power Jun 24 '16 at 02:34 AM

Using this packaging command, it still crashes with exactly the same crash log: C:\UE4\Engine\Binaries\DotNET\IOS\IPhonePackager.exe RepackageFromStage "C:\UE4\QAGame\QAGame.uproject" -config Shipping -schemename QAGame -schemeconfig "Shipping" -compress=best -sign -stagedir "C:\UE4\QAGame\Saved\StagedBuilds\IOS" -project "C:\UE4\QAGame\QAGame.uproject" -provision "MercenaryApp_AllMerc.mobileprovision" -certificate "iPhone Developer: Kimberly Power (**)"n

avatar image Matthew J Jun 24 '16 at 01:10 PM

Just to be sure, do the packaging logs indicate that your developer provisions are being used? Also, has the device that you're installing to been added to that developer provision?

When launching on vs packaging, the process is quite a bit different but both do generate .ipa files which can be installed. Since launching on is working for you, would you be able to test installing the .ipa generated by that directly?

Something else we can test to try to narrow down the problem is packaging for shipping and then installing from a blank project. We've had reports of crashing from the splash screen that were related to content issues so this could let us know if it's something to do with QAGame or the plugin if this works correctly.

avatar image Kim Power Jun 24 '16 at 06:03 PM

Yes, it is using the developer certificate and provision in this case. I have tried to install the .ipa generated by the launch process directly. It also crashes in that case. Since the crash log is ALWAYS inside the UIKit and I have made no changes to the UI at all for the project, it seems very much to be an asset issue to me. I feel the most likely answer is that somehow the bundle is not being loaded correctly so that any attempts to pull files out cause it to crash. The one case that works uses the -iterate flag which puts the assets into the documents folder instead of using them from the bundle.

From the log: IPhonePackager: Executing iPhonePackager RepackageFromStage C:\UE4\QAGame\QAGame.uproject -config Shipping -schemename QAGame -schemeconfig Shipping -compress=best -sign -stagedir C:\UE4\QAGame\Saved\StagedBuilds\IOS -project C:\UE4\QAGame\QAGame.uproject -provision MercenaryApp_AllMerc.mobileprovision -certificate iPhone Developer: Kimberly Power ()

I have also built a version that does not call any of the plugin code at all and it still crashes in exactly the same way.

avatar image Kim Power Jun 25 '16 at 01:27 AM

So I built the Blank Project for iOS. When I launched it, it worked fine on my device. When I attempted to build a package to install using iTunes, it crashes in the same way that QAGame does. At this point I am forced to conclude there is either some configuration option I am missing, or that iOS packaging is somehow broken.

avatar image Matthew J Jun 27 '16 at 06:09 PM

Thank you for testing that, at least now we know it's not content related. Could you upload a copy of your full cook log for either your old project or the new blank one?

avatar image Kim Power Jun 28 '16 at 12:35 AM

So here are logs from packaging both QAGame (with our plugin) and the Blank project. The ones that say launch or launcher both run. The Blank project one is missing some assets, but it manages to run anyways. QAGame_launch runs without any warnings.

Both versions that say package in their name, crash.

link text

avatar image Matthew J Jun 28 '16 at 06:06 PM

Thank you for that, unfortunately it isn't giving all of the information we need. I apologize for the back-and-forth here. There is a way to get more however. Please hook your device up to your Mac, open Xcode and then go to Windows -> Devices and select the iOS device. Expand the window at the bottom and then run the app. The blank one would be best since it's packed for Dev, should give us better logs. After it finishes, you can use the download symbol at the bottom right of the window to save the logs.

If for any reason you can't get the logs, you could also send the .ipa itself and I should be able to get the necessary logs.

avatar image Kim Power Jun 28 '16 at 06:30 PM

link text Here is a crash log from the device.

One thing I realize we are doing that is not standard in packaging is that were building the paks in chunks (not the HTTP chunks). In the case of both apps there is so little data that it only builds one pak file anyways. Since I see a reference to chunk1 in the crash, that may be part of the issue.

blank_crash.txt (52.6 kB)
avatar image Matthew J Jun 28 '16 at 07:16 PM

Do you have Push Notifications enabled for your iOS App ID on your cert on the apple side of things? Example of what I mean:

alt text

alt text

push1.png (103.6 kB)
push2.png (100.4 kB)
avatar image Kim Power Jun 28 '16 at 09:14 PM

link text Here is the crash with push notifications on. It also is only possible to turn on push notifications in an App ID that explicitly names the bundle (no wildcard). The UE4 documentation even suggests using a wildcard in your App ID, so Push Notifications really shouldn't be required for the apps to work.

avatar image Kim Power Jun 28 '16 at 09:19 PM

Also when I looked up the particular error message, it seemed it happened to most people when a UI element was missing or not provided. In some cases it was bad code that didn't pass along the sending object, in other cases the UI element (or the whole UI) disappeared before the message was handled causing the crash. Since I have done absolutely nothing with the UI, it shouldn't be an issue I caused. It is noticeable that the issue also only happens when the app is trying to use resources from the bundle instead of the documents folder.

avatar image Kim Power Jun 28 '16 at 07:18 PM

No I don't. Should I? I am not really using any of the services so I didn't enable them.

avatar image Matthew J Jun 28 '16 at 07:24 PM

From looking at the logs, it seems that the app is crashing when trying to send an iOS alert to an object that it isn't allowed to. Enabling those push notifications may help and could avoid the crash.

avatar image Kim Power Jun 29 '16 at 12:59 AM

I just managed to narrow the issue down to the generate chunks option in packaging. When I check "Use Pak File" but not "Generate Chunks", it works fine. If I check "Generate Chunks" it then crashes. I am fairly confident the following from the crash log is why. Keep in mind that it only generates a single chunk for these apps since the amount of data is currently so small.

Jun 28 13:55:59 Kimberlys-iPod-touch ondemandd[158] : Invalid tag in set [{(

Chunk1 )}] for BundleURL: file:///var/containers/Bundle/Application/62A37040-5B19-4A31-8504-A633711E418E/QAGame.app/. Nothing will be pinned. Jun 28 13:55:59 Kimberlys-iPod-touch ondemandd[158] : Invalid tag in set [{( Chunk0 )}] for BundleURL: file:///var/containers/Bundle/Application/62A37040-5B19-4A31-8504-A633711E418E/QAGame.app/. Nothing will be pinned. Jun 28 13:55:59 Kimberlys-iPod-touch com.apple.xpc.launchd[1]
avatar image Kim Power Jun 29 '16 at 06:27 PM

I also had to add this

 <key>UIBackgroundModes</key>
 <array>
     <string>remote-notification</string>
 </array>

to my additional plist info to make the warning go away. Since I am not using any remote notifications this requirement is coming from the engine and should probably be automatically added to the plist file in cases where it is being used by the build process.

avatar image Matthew J Jun 30 '16 at 01:40 PM

Thank you for that information, I'm currently working on trying to reproduce the issue locally with the new specifics that you provided.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question