Hitch1337
Topic Author
Posts: 3
Joined: 01 Oct 2023, 15:41

Crash: NoesisGUI-Unity-3.2.2-Indie crashes in Noesis.NoesisGUI_PINVOKE:TextBox_GetRangeBounds

29 Dec 2023, 17:15

Basic information:
Windows 10
Unity 2022.2.19f1
NoesisGUI-Unity-3.2.2-Indie

Situation:
NoesisRootView
-> GalacticMarketView
-> Many MarketItemView
- the market item view represents a sellable item, so a row in the galactic market
- most of the time when I click on any textbox in the market item view:
- unity crashes
- the unity crash dialog opens
- it tells me it crashed at Noesis.TextBox:GetRangeBounds (see logs)
- there is nothing "fancy", just a few nested views and DataBindings, no code behind
- there seems to be a way to avoid the crash (click elsewhere, do something else before), because we once have been able to sell ingame, therefor to enter an amount in that view. We cannot recall what we did.

Reproduction:
- start the game
- switch to galatic market
- click into any of the 3 textboxes of MarketItemView in any row of the galactic market
=> crash

Attached Files:
- crashdump
- unity log
- Xaml of Market Item View
- Some screenshots for orientation

Is this related to issue2492? Is this a Noesis problem or am I doing something wrong here?
Attachments
Crash.zip
(428.89 KiB) Downloaded 19 times
GalacticMarket.jpg
MarketItem.png
 
User avatar
sfernandez
Site Admin
Posts: 2997
Joined: 22 Dec 2011, 19:20

Re: Crash: NoesisGUI-Unity-3.2.2-Indie crashes in Noesis.NoesisGUI_PINVOKE:TextBox_GetRangeBounds

02 Jan 2024, 11:25

Hi, I have created issue #2980 in the tracker to follow this crash. It is not related to the one you mentioned, this is a new problem.
One question, do the TextBoxes have a template when the crash happens? because I see in the first screenshot that is using the internal debug pink templates.
 
Hitch1337
Topic Author
Posts: 3
Joined: 01 Oct 2023, 15:41

Re: Crash: NoesisGUI-Unity-3.2.2-Indie crashes in Noesis.NoesisGUI_PINVOKE:TextBox_GetRangeBounds

02 Jan 2024, 12:38

Thanks for your feedback! The issue is not a show stopper for us, but quite an obstacle in driving that Gui further. Do you see any workaround to avoid the crash and still use the TextBox? Regarding your questions: There is one Style applied to TextBox and a few properties are set directly on the TextBox, that's it, and no control templates defined. We do not have any global Xaml files yet so everything is in the Xaml file (see attachements). We are in the very early stages for prototyping the Noesis Gui.
 
Hitch1337
Topic Author
Posts: 3
Joined: 01 Oct 2023, 15:41

Re: Crash: NoesisGUI-Unity-3.2.2-Indie crashes in Noesis.NoesisGUI_PINVOKE:TextBox_GetRangeBounds

02 Jan 2024, 12:44

Btw: The first screenshot is actually ingame Noesis/Unity, the second taken from a Wpf/C# Desktop App, made in Riders Gui Designer. We are keeping the code base compatible to both Noesis/Wpf at this point.
 
User avatar
sfernandez
Site Admin
Posts: 2997
Joined: 22 Dec 2011, 19:20

Re: Crash: NoesisGUI-Unity-3.2.2-Indie crashes in Noesis.NoesisGUI_PINVOKE:TextBox_GetRangeBounds

03 Jan 2024, 10:49

I was able to reproduce the crash by using our internal debug templates, thanks for all the feedback, we'll fix it for the next release.

A workaround for now is to set one of our NoesisTheme files as Application Resources in the Noesis Settings (NoesisTheme.DarkBlue should be set by default) and specify in your local styles the BasedOn property so it inherits the template from the theme style:
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
  <Setter Property="Foreground" Value="Aqua"/>
  <Setter Property="Margin" Value="6"/>
</Style>
    
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
  <Setter Property="Margin" Value="6"/>
</Style>

Who is online

Users browsing this forum: Bing [Bot] and 10 guests