Unhandled exception doesn't print log to Monitor or Command Prompt

file

Hey guys, I was asked to post this issue to the forum as a bug since on Slack everyone thought it was weird. I get an exception error on Windows (10) when testing this code, when I change the orientation of the Preview by pressing Control+R.

However even thought the exception error window pops up, there is no log in the Monitor or in the command prompt (when using fuse preview).

I was wondering if there is a way to “catch” this error so I can analyse what’s going on. I am almost certain this has to do with the Grids realoading when I change orientation, but I’d like to see the full log to be sure.

Hi, some preliminary results from investiagting this:

I got your code to build by reversing the order of these lines:

<Grid Columns="auto,2,1,1,1,1*" Alignment="Top" ux:Name="Grid">
<WhileWindowLandscape>

After changing orientation back and forth a few times I got the following error: element not already inserted anywhere!. Is the same error you got? Anyway, we’ll investigate this.

We’ve gotten a bit further with this now, and think we’ve found the bug. A fix will be included in a release shortly.

Hi Anders,

This is what I get:

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

Exception Text System.ArgumentNullException: Value cannot be null. Parameter name: e at Outracks.Features.ErrorHandling.ErrorHandler.Report(String operationName, OperationID operationID, Exception e, ExceptionOptionsFactory errorCommands) at Outracks.Fuse.WinFormsEvents.TrySomethingBlocking(IErrorHandler errorHandler, Action action) at Outracks.Fuse.WinFormsEvents.<>cDisplayClass1e.be(Object s, EventArgs a) at System.Windows.Forms.Control.OnSizeChanged(EventArgs e) at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) at System.Windows.Forms.Control.UpdateBounds() at System.Windows.Forms.Control.WmWindowPosChanged(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.UserControl.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

file

Thanks, that’s the error I got as well. I’ve fixed that, and uncovered another one that we’re working on fixing right now. Sorry for the inconvenience, we’ll keep you posted on the progress!

Thanks!

In the 0.9.4x update the error is now being printed to the Monitor and to the Command Prompt :slight_smile:

There is an error in on your elements:

<Panel ux:Class="Celula" Padding="12">
    <Text ux:Class="Conteudo" ux:Name="TextoCelula" TextAlignment="Left" Alignment="CenterLeft" FontSize="16"/>
    <WhileWindowPortrait>
        <Change Target="TextoCelula.FontSize" Value="14"/>
    </WhileWindowPortrait>
</Panel>

You have defined a new ux:Class="Conteudo with an internal name as TextoCelula. You then attempt to use this name in the Change target. My guess is that you don’t want the ux:Class="Conteudo" on the Text element.

When you declare something to have both a ux:Class and a ux:Name that name is only available within that element. ux:Class defines a new class type so it doesn’t make sense that it would have an external name. It’s a bug on our side that you haven’t received a good error message about using TextoCelula outside of the element.

Hi edA-qa mort-ora-y, I added a class because it is defined on another file, not the main ux file, and then called into a loop where each panel ux:Class=“Celula” represents a cell.

This is what is in the main ux file:

<Celula>
    <Conteudo Value="{date}" />
</Celula>
<Celula>
    <Conteudo Value="{filesize}" />
</Celula>
<Celula>
    <Conteudo Value="{type}" />
</Celula>

In any case, I don’t get any errors in 0.9.5.x when switching orientations regarding “filling” the grids with content. Can I assume this is a fix for that issue?