Jump to content

Render crash if reCreateWorld same world


Go to solution Solved by Dreikblack,

Recommended Posts

Posted

Default start map from template

Happens after first enter press:

image.thumb.png.9924bf4480f3c4f3b5c7b2f9abdb6d68.png

Comment in loop "world = CreateWorld();" to get another render crash (RecordDraw) but it's not consistent and may take several attempts (Andy have this issue i believe):

image.thumb.png.93acc1bea7b92a7e6af4b803a5cb61e4.png

#include "UltraEngine.h"
#include "ComponentSystem.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{

    RegisterComponents();
    auto fiplugin = LoadPlugin("Plugins/FITextureLoader");
    auto displays = GetDisplays();
    auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * displays[0]->scale, 720 * displays[0]->scale, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);
    auto framebuffer = CreateFramebuffer(window);
    auto world = CreateWorld();

    WString mapname = "Maps/start.ultra";
    auto scene = LoadMap(world, mapname);

    //Main loop
    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
    {

        if (window->KeyDown(KEY_ENTER)) 
        {
            world = CreateWorld();
            scene = LoadMap(world, mapname);
        }
        world->Update();
        world->Render(framebuffer);

    }
    return 0;
}

 

  • Thanks 1
Posted

I was able to easily fix this and will have an update for you later today. Thanks for your help!

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

One crash fixed and 2nd still happens if you comment out one line that i mentioned in first post. Just to make sure you know what i mean i post code it again with commented line

#include "UltraEngine.h"
#include "ComponentSystem.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{

    RegisterComponents();
    auto fiplugin = LoadPlugin("Plugins/FITextureLoader");
    auto displays = GetDisplays();
    auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * displays[0]->scale, 720 * displays[0]->scale, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);
    auto framebuffer = CreateFramebuffer(window);
    auto world = CreateWorld();

    WString mapname = "Maps/start.ultra";
    auto scene = LoadMap(world, mapname);

    //Main loop
    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
    {

        if (window->KeyDown(KEY_ENTER))
        {
           // world = CreateWorld();
            scene = LoadMap(world, mapname);
        }
        world->Update();
        world->Render(framebuffer);

    }
    return 0;
}

 

Posted

I updated pro build on Steam this morning. You sure this is happening with the latest build?

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Well, it's very inconsistent i guess. Can only suggest to try again :unsure:

Steam beta, latest update, even created new project for latest test - 4th attempt (enter press) caused a crash, st and 2nd after that.

 

  • Thanks 1
  • 4 weeks later...
Posted
13 minutes ago, Dreikblack said:

I meant Vulkan is gone just like issue and vice versa

This and so many other things...

Dance Dancing GIF

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...