schragnasher
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

I have no idea how to debug this

28 May 2015, 06:34

Ok this is a weird issue, im not even sure i can explain it properly. I have this XAML...
<Grid
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:nodes="clr-namespace:FrozenWalrus.StoryManager.Nodes"
    xmlns:local="clr-namespace:FrozenWalrus.MVVM"
    xmlns:noesis="clr-namespace:Noesis.UserControls"
    x:Name="StoryRoot">  

    <Grid.Resources>
        <ResourceDictionary>

            <!-- Start Node -->
            <DataTemplate DataType="{x:Type nodes:StartNode}">
            <Grid>
               <noesis:NineSlice 
                      Image="../../_Textures/GUI/ChatBubble2.png" 
                      LeftSlice="15" RightSlice="30" 
                      TopSlice="21" BottomSlice="15"/>
                <Button Margin="50" Content="Start" Command="{Binding DataContext.GoToStoryNodeCommand, ElementName=StoryRoot}" CommandParameter="{Binding Next}" />
                </Grid>
            </DataTemplate>


            <!-- Statement Node -->
            <DataTemplate DataType="{x:Type nodes:StatementNode}">
               <noesis:NineSlice Image="../../_Textures/GUI/ChatBubble2.png" LeftSlice="15" RightSlice="30" TopSlice="21" BottomSlice="15"/>
            </DataTemplate>
        </ResourceDictionary>
    </Grid.Resources>

    <Grid>
        <ContentPresenter Content="{Binding CurrentNode}" />
    </Grid>

</Grid>
I stripped lots of stuff out to try and debug my problem, but the nineslice image in the StatementNode template gives me an error, an error having nothing to do with nineslice images...
Exception: Resource ASCII_Normal not found
Noesis.Error.Check () (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisError.cs:21)
Noesis.UIRenderer.Noesis_UpdateRenderer (Int32 rendererId, Double timeInSeconds) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRendererImports.cs:145)
Noesis.UIRenderer.Update (Double timeInSeconds, AntialiasingMode aaMode, TessellationMode tessMode, TessellationQuality tessQuality, RendererFlags flags, Boolean enableMouse, Boolean enableTouch, Boolean enablePostProcess, Boolean flipVertically) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs:129)
NoesisGUIPanel.LateUpdate () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:203)
ASCII_Normal is a image i use for portraits, it works fine and frankly there isno longer any code int this xaml that should touch that resource. I'm at a complete loss for what is wrong here, it not making any sense whatsoever. If i remove the nineslice from the statement node template, no error. The nineslice in the startnode has no issue displaying correctly.

I present a StartNode and i see the nineslice and the button, i click the button to display the StatementNode and boom, error. An error that has no relation to the nineslice image. :shock: :? :arrow: :?: :?: :?:
 
User avatar
sfernandez
Site Admin
Posts: 3238
Joined: 22 Dec 2011, 19:20

Re: I have no idea how to debug this

28 May 2015, 10:16

I'll take a look and let you know if I can reproduce it.
 
User avatar
sfernandez
Site Admin
Posts: 3238
Joined: 22 Dec 2011, 19:20

Re: I have no idea how to debug this

28 May 2015, 10:22

One fast question... if you directly present the Statement Node, without showing the StartNode first, does this strange error appears?
 
User avatar
sfernandez
Site Admin
Posts: 3238
Joined: 22 Dec 2011, 19:20

Re: I have no idea how to debug this

28 May 2015, 12:48

I'm not able to reproduce the crash :(

Could you please create a ticket in our bugtracker and attach the project with a test scene that crashes the way you explained?
 
schragnasher
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

Re: I have no idea how to debug this

28 May 2015, 13:39

Thanks for the quick reply, posted this late in the USA or I would have gotten to you question. I'll do sine more research tonight and make a bug with an example if I can.
 
schragnasher
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

Re: I have no idea how to debug this

29 May 2015, 02:35

Bug report posted, with an example.

In case anyone is interested here is the problem.

my XAML for statement node template looks like this.
<DataTemplate DataType="{x:Type nodes:StatementNode}">
                <noesis:NineSlice Image="ChatBubble2.png" LeftSlice="15" RightSlice="30" TopSlice="21" BottomSlice="15"/>
</DataTemplate>
A stripped down version of my StatementNode class looks like this
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace FrozenWalrus.StoryManager.Nodes
{
    public class StatementNode : Node
    {
        public string Image { get; set; }    
    }
}
The offender seems to be the Image property, the nineslice Image and my Image seem to be interfering with eachother from what i can tell.
 
User avatar
sfernandez
Site Admin
Posts: 3238
Joined: 22 Dec 2011, 19:20

Re: I have no idea how to debug this

29 May 2015, 21:11

I'm looking at it now.

I will continue the conversation in the corresponding ticket of the bugtracker when I find more information on what is happening.

Who is online

Users browsing this forum: Ahrefs [Bot], tuwi and 38 guests