Standalone Lua Not Loading

Home Forums General Programming Standalone Lua Not Loading

This topic contains 3 replies, has 2 voices, and was last updated by dnaldoog dnaldoog 4 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #96537
    dnaldoog
    dnaldoog
    Participant
    • Topics: 1
    • Replies: 159
    • Total: 160
    • ★★

    I have a completed panel working (mostly) as a .panel file, but when exported as a (restricted) instance standalone, the panel behaves as if lua is disabled. Any images loaded by lua are missing, but present in APPDATA%/myPanelName. No functions work etc.

    If I then close the standalone program and restart it, it then works perfectly. All images (that lua functions load) are loaded and all functions are working.

    If I load this panel as a .dll VST in Cubase same problem, except this time I cannot restart it and have all the images and lua working, so it’s completely broken there.

    • tried on version 5.3.201, 0.01, 6.04 all same result
    • reinstalled on version 5.3.201, 0.01, 6.04 all same result
    • recreated all png files
    • tried deleting certain png files
    • tried deleting layers (the panel has about 7 layers)
    • disabled various initialising lua functions
    • deleted various uiCustomComponent functions
    • disabled various all functions
    • tried all this on another PC.

    Well I feel like I have tried everything. I get no errors with the .panel and I wonder if there is a way to debug the executable? The log file on the instance doesn’t reveal anything.

    #98010

    dasfaker
    Keymaster
    • Topics: 79
    • Replies: 784
    • Total: 863
    • ★★★

    I would bet this is due to some error in your LUA code. It has happen to me sometimes, everything fine as .panel but LUA not working as .exe, and finally finding some variable missing (using some variable before assigning it’s value).

    A good candidate is method “called before any modulators are created” and all functions, timers, etc… called from it.

    #98026
    dnaldoog
    dnaldoog
    Participant
    • Topics: 1
    • Replies: 159
    • Total: 160
    • ★★

    Thanks for your response Dasfaker,

    I had actually started a complete rewrite from scratch, but I then I thought the problem may be that I have this function (below) (from Goodweather) in all of my uiCustomComponents. So I went back to the panel only this morning and after removing that function one of the uiCustomComponents loaded, so I think I am on to it. The other components are still broken, but lua seems to be engaged. I just have to track down some uninitialised (or blocked) variables that aren’t set on loading the panel, or maybe find a missing variable, which is exactly what you are suggesting I think, and I hope I can fix the problem. I had all but given up.

    
    isPanelReady = function()
    
        if panel:getBootstrapState() == false and panel:getProgramState() == false --[[ and allowPopup == 0--]] then
            return (true)
        else
            return (false)
        end
    end --function
    ---------------------------------------------------------
    

    My “called before any modulators are created” only contains a panel:setPropertyInt("panelMidiPauseOut",1) which I don’t think is the problem.

    Well I didn’t think I would get a reply on this one, so I really appreciate your suggestions. It tells me I am probably on the right track. Will post results for future reference here.

    #98147
    dnaldoog
    dnaldoog
    Participant
    • Topics: 1
    • Replies: 159
    • Total: 160
    • ★★

    I found that if you block a uiCustomComponent from loading (when the panel is run) in a Called When a panel has finished loading function — using panel:getBootstrapState() or panel:getProgramState() — when you run a standalone executable or dll or you block any variables/tables from initialising that are needed by uiCustomComponent, then the program might not load properly as a standalone/dll even if it works perfectly as a panel file. lua functions will/may not work and images loaded by lua will be missing.

    In my case it seemed that lua was disabled entirely, but if you close the program and reopen, then it runs as normal.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There is currently 2 users and 23 guests online
arrendirtmentwoon, pslavens
Forum Statistics
Threads: 2,201, Posts: 15,477, Members: 56,328
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!