ScottFromDerby
Topic Author
Posts: 9
Joined: 10 Sep 2019, 16:05

UIInlineContainers

18 Nov 2019, 16:01

Hey, we're trying to mix Run and InlineUIContainers using a TextBlock's InlineCollection. We would like to reuse the InlineCollection every 5 seconds or so, clear it and add some more contents (basically mix-media loading screen tips). However when we clear the TextBlock's InlineCollection, we get an internal Noesis assert (vector.h, @778) due to mInlineInfo being empty, and mInlineContainers containing an index reference into it (TextBlock.cpp@922).

This should be a minimum repro (semi pseudocode):
OnUpdate( float fDt )
{
static float fTimePassed = 0.0f; fTimePassed += fDt;
if( fTimePassed >= 5.0f )
{
  fTimePassed = 0.0f;
  Noesis::TextBlock* pTextBlock = FindName<Noesis::TextBlock*>();
  Noesis::InlineCollection* pInlines = pTextBlock->GetInlines();
  pInlines->Clear();                  // assert/run here on *second* run
  pInlines->Add(Noesis::MakePtr<Noesis::Run>("Press "));
  Noesis::Ptr<Noesis::Button> pBtn = Noesis::MakePtr<Noesis::Button>();
  pInlines->Add(Noesis::MakePtr<Noesis::InlineUIContainer>(pBtn));
  pInlines->Add(Noesis::MakePtr<Noesis::Run>(" to jump"));
}
Any help appreciated, thanks!

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 1777
Joined: 22 Dec 2011, 19:20

Re: UIInlineContainers

18 Nov 2019, 17:00

Hi, which version of Noesis are you using?
Because we recently fixed for 2.2.4 a bug that seems exactly the same scenario that you are explaining: #1542
 
ScottFromDerby
Topic Author
Posts: 9
Joined: 10 Sep 2019, 16:05

Re: UIInlineContainers

19 Nov 2019, 10:47

Hey! Thanks for the fast reply!

We're still using 2.2.1, looks like the fix will be in 2.2.4 onwards - will talk to the engine team to see if we can take 2.2.4.

Really appreciate that!

Thanks
Scott
 
User avatar
jsantos
Site Admin
Posts: 2791
Joined: 20 Jan 2012, 17:18
Contact:

Re: UIInlineContainers

19 Nov 2019, 12:48

Yes please, try the latest version (2.2.5 right now) and reopen this thread in case you still have the issue.

Who is online

Users browsing this forum: Google [Bot] and 14 guests