Local Preview isn't working

As mentioned in slack, the local preview isn’t loading in some projects…

I tried to use “fuse host-preview --compile only”

this was the result:

Hi, can you please upload your project to https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK? Then we can figure out what’s wrong. Files uploaded to that url are only available to the Fuse team.

done!

(don’t look at the coding style, it’s pure chaos … :'D )

Thanks, I’ll promise not to look! :slight_smile:

Confirm the issue on the latest 0.12.1 build

May be related to Style tag, as in a related post. Will check, eventually.

Update 1: that’s not it. Update 2: another project, which used to compile just fine 2 builds ago, fails now with the following:

fuse: unhandled exception: INTERNAL ERROR: should not happen
  at System.Xml.Linq.XNodeEqualityComparer.Equals (System.Xml.Linq.XNode x, System.Xml.Linq.XNode y) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNodeEqualityComparer.Equals (System.Xml.Linq.XNode x, System.Xml.Linq.XNode y) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNodeEqualityComparer.Equals (System.Xml.Linq.XNode x, System.Xml.Linq.XNode y) [0x00000] in <filename unknown>:0 
  at System.Xml.Linq.XNode.DeepEquals (System.Xml.Linq.XNode n1, System.Xml.Linq.XNode n2) [0x00000] in <filename unknown>:0 
  at Outracks.Fuse.Preview.HostPreviewCommand.Run (System.String[] args, CancellationToken ct) [0x00438] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Simulator.Host/HostPreviewCommand.cs:232 
  at Outracks.Fuse.LazyCliCommand.Run (System.String[] args, CancellationToken ct) [0x00000] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Fuse.Bootstrap/LazyCliCommand.cs:25 
  at Outracks.CLI.CliProgram+<Main>c__AnonStorey0.<>m__0 (System.String arg) [0x00000] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Common.CLI/CliProgram.cs:44 
  at Outracks.Optional`1[System.String].Do (System.Action`1 some, System.Action none) [0x0000b] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Common/ADTs/Optional.cs:196 
  at Outracks.CLI.CliProgram.Main (System.String[] args, CancellationToken ct) [0x00026] in /Users/outracks/buildAgent1/work/b939dc4c6ac331f9/Source/Outracks.Common.CLI/CliProgram.cs:43

andresku: I’ve reproduced the error locally, and had a look at it in a debugger. It seems to be related to <Style>, and when I commented out the <Style> tags in MainView.ux:24 and CogWheelReload.ux:2, I as able to start preview.

Unfortunately tracing down the error took me into a part of our code base that I’m not familiar with, so I’ll have to discuss this with another developer a bit later today before I can say anything more detailed.

Thanks for looking into it, Anders. I will try debugging my project further, although for me it happens without a Styles tag (used to have one).

Also, about my other reported crash during host-preview, the local preview starts just fine. Just host-preview issues that exception. Means it may have happened before too. Would be interesting to know why.

Costin: host-preview --compile-only sometimes has that problem, it’s an internal error from mono that we haven’t been able to work around yet. That code is not invoked in a normal preview, so it shouldn’t affect your project.

If you want to upload your project, we can have a look at that one too, and see if we can provide a workaround until we’ve fixed the issue in Fuse.

Thanks, Anders. About my error, found out there was another Style tag lurking around in a secondary file. Didn’t want to bother you with that. So that’s ok, thank you!

This issue has now been fixed internally, and the solution will be included in the next Fuse release.

Big thanks to andreseku for providing the test case that helped us track down the bug!

You’re welcome.

Nice to hear that. :slight_smile:

If somone wants to have a go at the pre-release of this fix, check out 0.12.2 on the QA channel: https://www.fusetools.com/downloads/channel/qa