Jump to content

Have a crash without errors on map load in lua version in fast debug


Go to solution Solved by Josh,

Recommended Posts

Posted

Oddly, I cannot create an interface attached to the camera anymore, I think this was working fine yesterday or day before.

This code, silent crashes, in fast debug or full debug. 

Cam exists and so does the framebuffer.

 

    ConsolePadfont = LoadFont("Fonts/arial.ttf")
    --Create user interface
    ConsolePadui = CreateInterface(cam, ConsolePadfont, framebuffer.size)
Posted

This one-liner pasted in the editor console works:

cam = CreateCamera(program.mainworld) font = LoadFont("Fonts/arial.ttf") ui = CreateInterface(cam, font, iVec2(100,100))

 

Let's build cool stuff and have fun. :)

Posted

Upon running this in Full Debug - debug gets hung here - 

Loading shader family "Shaders/PBR.fam"
Loading shader family "Shaders/2D.fam"
Loading shader family "Shaders/Sky.fam"
Loading shader family "Shaders/Unlit.fam"
Loading posteffect "Effects/Refraction.fx"
Loading shader module "Shaders/MeshLayer/Culling.comp"
Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath

Posted

I split this into a new topic. Once an issue is marked as solved, if you reply to it there is a risk I might never see that thread again, but as long as there is a thread that is not marked as solved, it will always be easily visible to me.

Let's build cool stuff and have fun. :)

  • Solution
Posted

I ran this Lua example in a new project and it worked as expected.

What should I investigate?

--Get the displays
local displays = GetDisplays()

--Create window
local window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[1])

--Create framebuffer
local framebuffer = CreateFramebuffer(window)

--Create world
local world = CreateWorld()

--Create camera
local camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC)
camera:SetPosition(framebuffer.size.x * 0.5, framebuffer.size.y * 0.5, 0)

--Load a font
local font = LoadFont("Fonts/arial.ttf")

--Create user interface
local ui = CreateInterface(camera, font, framebuffer.size)

--Create widget
local sz = ui.background:ClientSize()
local button = CreateButton("Button", sz.x / 2 - 75, sz.y / 2 - 15, 150, 30, ui.background)

while not window:KeyDown(KEY_ESCAPE) do
    while (PeekEvent()) do
        local ev = WaitEvent()
        if (ev.id == EVENT_WINDOWCLOSE and ev.source == window) then
            return 0
        else
            ui:ProcessEvent(ev)
        end
    end

    world:Update()
    world:Render(framebuffer)
end

 

Let's build cool stuff and have fun. :)

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...