fuse-studio icon indicating copy to clipboard operation
fuse-studio copied to clipboard

Uncaught exception in Uno-code causes infinite loop of IndexOutOfBounds exception on desktop preview

Open lorents opened this issue 7 years ago • 2 comments

How to reproduce:

  1. Create a new empty project in Studio
  2. Add the following to a new .uno-file in the project directory (and recompile if needed)
using Fuse.Controls;

public class Thrower : Panel
{
    public Thrower()
    {
        throw new Uno.Exception("Exceptional");
    }
}
  1. Add <Thrower /> inside the <App>-tag in MainView.ux
  2. Observe that after the initial expected stack trace the log fills up with an infinite amount of this (until you close the viewport):
[Viewport]: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Fuse.Visual.Children_ItemAt(Int32 index) in C:\Users\Lorents\Desktop\RealtimeStudio\Stuff\lib\Fuse.Nodes\1.9.0\Visual.Children.SafeIterator.uno:line 36
   at Fuse.Visual.Uno.Collections.IList<Fuse.Node>.get_Item(Int32 index) in C:\Users\Lorents\Desktop\RealtimeStudio\Stuff\lib\Fuse.Nodes\1.9.0\Visual.Children.uno:line 309
   at Outracks.Simulator.Client.Application.ResetEverything(Boolean initial, Object overlay) in C:\Users\Lorents\Desktop\RealtimeStudio\Source\Preview\Core\Application.uno:line 124
   at Outracks.Simulator.Client.Application.OnUpdate() in C:\Users\Lorents\Desktop\RealtimeStudio\Source\Preview\Core\Application.uno:line 226
   at Fuse.App.Update() in C:\Users\Lorents\Desktop\RealtimeStudio\Stuff\lib\Fuse.Desktop\1.9.0\DesktopApp.uno:line 84

lorents avatar May 29 '18 15:05 lorents

@lorents You know if this is a regression from 1.8?

BeeWarloc avatar Jun 01 '18 12:06 BeeWarloc

I am having same problem everytime i run fuse preview -t=Local infinite amount of : System.IndexOutOfRangeException: Index was outside the bounds of the array. at Fuse.Visual.Children_ItemAt (System.Int32 index) [0x00007] in <6d3038b991e2431199f639f122b9e20d>:0 at Fuse.Visual.Uno.Collections.IList<Fuse.Node>.get_Item (System.Int32 index) [0x00000] in <6d3038b991e2431199f639f122b9e20d>:0 at Outracks.Simulator.Client.Application.ResetEverything (System.Boolean initial, System.Object overlay) [0x000b0] in <6d3038b991e2431199f639f122b9e20d>:0

i am running fuse 1.10.0 rc1, Mac OS High Sierra. I have tried almost everything even uninstalled and reinstalled fuse studio,

puneetsethi25 avatar Jan 06 '19 09:01 puneetsethi25