Jump to content

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


Alienhead
 Share

Go to solution Solved by Josh,

Recommended Posts

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)
Link to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

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

Link to comment
Share on other sites

  • Solution

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

 

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

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...