Assertion failed: container != nullptr
« on: 25 October 2015, 12:11:12 »
So I'm having this weird issue where I'm trying to load a container from a file, and tgui throws an assertion failed error at me:

Code: [Select]
Assertion failed: container != nullptr, file ../WidgetLoader.cpp, line 149
(note that I got the modified version of WidgetLoader we talked about yesterday, so the line might not match yours, but it's the first line of function loadContainer())

Here's the file I'm trying to load:
Code: [Select]
Container.MM
{
position: (100, 100);
size: (100, 100);
visible: true;
enabled: true;
opacity: 1;
}

I couldn't find anything on the markup of Containers or if they're even allowed in files, hope you can solve this one for me ;)

Thanks for your help in advance.

*

texus

  • *****
  • 1163
    • View Profile
    • Texus's Blog
Re: Assertion failed: container != nullptr
« Reply #1 on: 25 October 2015, 12:19:42 »
I had to debug the issue to find out what was going wrong, but the mistake you made is that "Container" is a abstract class and it happens to be a valid widget type since it is used internally to load containers.

What you need is probably the Panel class.

Re: Assertion failed: container != nullptr
« Reply #2 on: 25 October 2015, 14:01:20 »
Thanks so much, that was exactly what I needed :)