[UMF, Android, 4.7.5] Engine crashes on level transition if media is not closed

Engine Version: 4.7.5

Project Type: C++

Full Source Code: No

Android Device: Samsung Galaxy Note 3 (SM-N9005), Samsung Galaxy S4

Android Version: 4.4.2

API Version: 9


The Problem

Starting a level transition while MediaPlayer is active will cause a crash.

Reproduce

  1. Create level.
  2. Spawn widget.
  3. Play MediaPlayer asset (movie) on this widget like a fullscreen movie.
  4. Switch map (level transition) during movie playback. Even if pause / rewind / open url is used, it will crash.

How to fix

Use OnMediaOpen / OnMediaClose to wait for MediaPlayer to catch up.

Fixes that are needed in full source code

Close() is not exposed to Blueprint, so the OnMediaClose delegate can’t be used. MediaPlayer also kills performance until the close command is used or an empty url is opened. See this AnswerHub thread for request of exposing the Close() functionality.

Hi Denny,

When your crash occurred, did the crash reporter tool appear for you to submit the info to us? Do you mind locating those logs and attaching to this thread as a txt file?

Thanks!

I will have to get back to you on Sunday for that. We kind of went ahead and fixed our issues, so I would have to roll back and re-deploy to the Android to get the logs for you.

Note that this only happens on mobile, not a PC issue.

Ah, you mentioned the Engine crashes so I just assumed. Were you able to get logcat logs for this crash?

Thanks!

Hi wittlief, sorry for the delay. While trying to reproduce the issue I noticed the crash is possibly related to UMG rather than UMF. I have a media player widget and play the video from there. If the level transition happens without removing the widget from parent, the crash below happens.

Relevant crash callstack from android device

I would like to send you an example project for this issue, and also the screensaver issue, so it can be debugged through Visual Studio. Do you have an email or forum account where I can share it with you?

We do take projects, but I’ve passed this issue to the dev and I’d like to see if he has any advice from looking at your logs first. He may ask for your project. Just in case he needs them, can you include the full verbose logs?

By using the android logger in visual studio, using Verbose, here’s another log. I assume that’s what you wanted me to do. Otherwise I don’t know how to get full verbose logging with android.

VisualStudio Android log Verbose

Crash happens below this line:

04-29 18:27:46.076 31544 31559 D UE4 : [2015.04.29-15.27.46:077][ 0]LogBlueprintUserMessages: Starting level transition in 1

If you get a chance, logcat logs from monitor would be nice. We’re hip deep in the 4.8 pre-release, but I’m going to double check with the Android dev about your two issues today. Thanks for hanging in there!

The monitor have never worked for me, but I did a logcat via CMD. (adb logcat -d)

The file was 2.5MB, so I stripped out everything before the app started up. Same as last time, the crash happens after “Starting level transition in 1”.

No need to stress with this issue. We switched back to the startup movie playback system because of performance reasons. :slight_smile:

LogCat from device

Hi Denny,

I was able to speak to the Android dev about this issue, and he mentioned that he can reproduce this, but at current we have no inherent way to close media on level transition, and will need more time to work on this. As you have found a workaround that is currently working for you, I’m going to close this issue until he or I have more information for you. Sorry we can’t do more at this time, but I am glad you were able to find a fix that works for you.

Thanks!