Fuse Preview (Win10) crashing when Video UX Element used.

NB: Sample files have been provided for this via Twitter (see DM from @niall_bigscreen with link to Dropbox) - was asked to post this here for tracking purposes.

As per DM’s - when I have a Video element inside my UX (which has a ~10sec .mp4 file set to Autoplay + Looping) - the Fuse Preview will crash after 5-15 minutes + show the Windows Close/Debug dialog. If I replace the Video element with something else (ie. Rectangle) then this problem goes away.

To repro with supplied files :

  1. Create new Fuse project.
  2. Replace the MainView.ux file with the one I’ve provided.
  3. Copy the additional assets files into the Assets directory.
  4. Run it + wait for crash.
  5. Comment out Video element + uncomment the Rectangle (on line above) and then demo runs fine.

Note that I’m using Windows 10 (Version 1511) x64bit + the crash is happening in the ‘Local’ preview (not Android emulator or device).

thanks!

Which version of Fuse are you running?

Bent Stamnes wrote:

Which version of Fuse are you running?

I’m running v0.12.3. It said there was an update this morning, however haven’t installed that yet as there was no mention of this issue in the fixes.

Hi,

Just wondering how progress is going on this?

Also - wanted to report another bug with this - if I try to run it on an Android device (Sony Z3C with Android 5.1.1) - the video doesn’t play at all (there is just a blank area where video should be). Note I’m using the full ‘build + run’ for Android and also using Build 6406 of fuse now.

thanks

Just to check: did you submit the video file as part of your project? If not: are you able to do so? Most video playback issues where the video doesn’t show up are related to the encoding of the video.

Bent Stamnes wrote:

Just to check: did you submit the video file as part of your project? If not: are you able to do so? Most video playback issues where the video doesn’t show up are related to the encoding of the video.

Yes submitted originally with sample project. The same video file(s) play just fine through my Xamarin.Android project on my device - don’t think it’s an encoding issue unless fuse only supports a subset of what is normally supported.

Hi Niall,

Sorry for the initial delay. It seems you’ve hit two separate issues here:

For the Windows preview, this seems to be due to a memory leak. I’ve created an issue for us to fix this.

For the Android export, I’m not able to reproduce it on the device I tested it on (an LG G2). Fuse uses the video player on the device to play videos, so it could simply be that the format of that video is not supported by the Z3C. Could you please try to upload the video to your phone and play it in the normal video player, to see if that works?

Anders Schau Knatten wrote:

Hi Niall,

Sorry for the initial delay. It seems you’ve hit two separate issues here:

For the Windows preview, this seems to be due to a memory leak. I’ve created an issue for us to fix this.

For the Android export, I’m not able to reproduce it on the device I tested it on (an LG G2). Fuse uses the video player on the device to play videos, so it could simply be that the format of that video is not supported by the Z3C. Could you please try to upload the video to your phone and play it in the normal video player, to see if that works?

Hi,

Thanks for the update.

I copied a few of the videos I’m using to the device + the default/preloaded Video player is able to play all of them with no problems. So don’t think it’s an unsupported codec issue here - also as mentioned the regular axml based video playback functionality in Xamarin.Android has no issues with them either.

Also, I’m wondering if there is an issue due to me using a Sony Z3 Compact (which probably has lower screen resolution then your normal full sized test devices?). I’ve seen a lot of other quirks/bugs when running App on this device such as - pull to refresh not working, parallax effects not working with MultiLayout, scrollview cutting off the content short (so only 2/3 of content is visible), problems loading images from URL’s (seeing no content or image being weirdly aligned so you only see half of it). All of these are working fine on the PC/Win10 preview - have yet to do some testing on via iPhone/mac as yet.

Niall

Hi!

Quick update on the memory leak issue. I have located a leak in our .NET TextRenderer, working on a fix. Will update this thread when I have more info :slight_smile:

Until we fix the problem you can workaround the memleak by removing the º character from the strings in your JS

Thanks,

Had some time to test this - removing that char out of the json source (so it’s not rendered) has fixed the crashing now on Preview. It’s weird that the problem was only noticable when I had a Video Element in UX as well - assume the additional memory use for video must have been the tipping point.

With regards to video (from FileSource) not playing back on device (and other device specific problems), I did some testing with my iPhone 6s+ as well. I get the same problem as my Android device (Sony Z3C) - the area where video is supposed to be playing is just completely blank (and I see panel behind it).

Do you have a spec for what MPEG4/x264 encoding settings are intended to be working with Fuse /or/ a Fuse example project with sample video file that’s known to work across Preview + device builds? I’m happy to reencode my video differently with Adobe CC if this is the issue - but unclear what specs to use.

Also noticed when testing on iPhone6S+ - scrolling seems to be working properly (unlike Android which cuts off bottom 30-40% of content), loading images from URL source is also working (Android has lots of issues) - however the pull to refresh functionality isn’t working on either device (implemented from Fuse Example code). Is there any existing bugs open/fixes in progress covering these sort of things (known issues?).

I really need to get these other things sorted out to consider continued use of Fuse for real Apps, right now I’m wondering if I should put dev on hold and come back when product is more mature? I totally appreciate it’s still a beta product - and I’m really excited by what is there so far (stuff is so easy to implement compared to other options like Xamarin). However, just trying to get a feel for when it’s realistic to start using it for commercial products as well as suggest to clients that it could be used for their solutions too. 8)

Thanks!

Do you have a test case we can look at for the “Android cutting out content” and “Android has lots of issues on loading images from URL”-errors?

As for supported formats, this is covered in our docs: https://www.fusetools.com/learn/fuse#supported-formats

Thanks for your reply Niall.

The º character is out of the range of the characters that we cache in the textrenderer font atlas, Video caused some bad invalidation resulting in re-rendering of the text. And for every new Video frame a texture would be allocated for the rendering of º. We have found the memory leak and fixed it :slight_smile:

Thanks for you feedback, it is appreciated. We working hard on getting bugs like you have described fixed. As Bent asked, if you have a test case that would help us out a lot.

Hi,

Some good news - I had a chance to do some more testing - this time around have :

  • Upgraded project to the new version of Fuse 0.20.2 (Build 6524)
  • Also, the Android 6.0 Marshmallow update was released for my Sony Z3C + was installed (previously testing done with Android 5.1).

The following items now seem to be fixed on Android :

  • Video Playback now working. 8)
  • Scrollviewer issues fixed (now scrolls page to full size of content / no cut off).
  • Pull to Refresh now working
  • Now loading jpg Images from Online source correctly

This all started working without any changes to my code at all (except for cleaning/updating project + theme element for fuse 0.2 + one other fix see below). I’m assuming this is due to new fuse version (rather than Android 6.0) - either way great it’s working now.

I will do some testing with iOS again over next few days - hopeful that Video fixes/etc will also now be working for this(?)

Also Note : Issue I noticed is that using an global javascript Observable for setting Visibility property by just providing string : ie. Observable(“Hidden”) + Visibility="{globalvar}" seems to be broken now in 0.20.2… I changed the UX code to test for a bool with the WhileTrue/Change method (and bool Observable) instead and that seems to be a viable workaround.

With regards to the rendering of the º char + the memory leak - can you confirm if this bug fix was rolled out with the 0.20.2 release (I didn’t see any mention of it in release notes - nor mentions of any of the above fixes).

thanks again - excited to resume some fuse dev now that things are working!