Sign in to follow this  
samirrobot

LINDA Editor Freeze and Crash

Recommended Posts

Hello
sorry , I have problem with new version of Linda 2.8.4

when using the editor to design lua sources code, the editor freez and all crashes, Linda crash also.
Only one solution : stop processes manually !

Working on Win7 with  FSX and Airbus X A319/A3201.31 (last version).

 

I would like to use Linda to design my  own interface.

My objective is to use Linda to debung my  lua programs.

 

I can't do that at this moment because the LINDA Editor Freez juste after loading my lua source program.

 

My program works when loaded Directly by FSUIPC.

 

Thanls for your Help.

 

Regards

 

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Welcome to the LINDA community and thank you for moving your question to the Support sub-forum. I am sorry to hear that you are experiencing problems with the LINDA Editor freezing. There was a minor change to the Editor to stop it crashing when a right-click was made with text selected.

 

What are you doing in the Editor when it freezes? The more detail of your actions you can provide the quicker I can isolate and fix the problem.

Share this post


Link to post
Share on other sites

hello,

Thanks for your response

The editor Freez just after loading my lua program and after this, nothing !!!! all Eiditor and Linda Freezes.

 

Here is my program (it works when called in ipcready.lua).


-- set the pollrate to 200ms = 4 times per second
pollrate = 200

handle = com.open("\\\\.\\COM25",9600,0);

ipc.log("HANDLE ************")
ipc.log(tostring(handle))

while 1 do
  -- You may need to adjust the sleep time for smoothest results
    ipc.sleep(200)
    str,n = com.read(handle,4,4,10)
    ipc.log(tostring(n))
  if n == 4 then
        ipc.log(str)
        str= string.sub(str, 1,3)
            variable = tonumber(str)
            ipc.writeLvar("L:Spoiler_lv_Anim",variable)
  end
end

 

Thanks for Help

Regards


some complementary informations

When  Editor and linda Freezes, I kill the process applications but the Lua.exe Still working in the background processes.

I need also to kill it in windows processes systems

Regards

Share this post


Link to post
Share on other sites

Hi Samirrobot

 

Thank you for letting me see the code you were trying to edit.

 

Firstly, the LINDA Editor is designed for editing LINDA modules and functions and not general LUA code. Any code should be enclosed within a function for proper testing and development.

 

Second, your code includes an infinite loop (with "while 1 do") and this is causing LINDA to apparently freeze. It is not frozen, it is just executing your code with no opportunity to break or do anything else. If you place the code inside a function and right click on the function name it will 'freeze'. I had the following to break the infinite loop:

 

m= 5000

while m > 0 do

m = m - 1

end

 

Finally, the Lvar (Spoiler_lv-Anim) does not exist for the Airbus.

Share this post


Link to post
Share on other sites

Hello,

Thanks for your message

1) the Variable Spoiler_lv_Anim  exists and It's only this working perfectly.

    the problem is that all other variables are not compatible with the Xby Wire implemented in the Aerosoft Airbus.

So I tested it and t works perfectly with my microcontroller that manages it

 

2) My question is that how can I init my program if I need to use function ? is existing a default function that is called at the start ?

 

3) I replaced the While 1 by  an Event and it works perfectly

 

I am loading my Lua in the ipcready file but I would like to be able to reload them when I make some correction in the code.

At this point I must restart all the simulator when I modify my lua code.

Is there any solution to reload the program ? with out restarting du FSX

 

Regards

 

My second problem : when startin FSX, I see Linda starting but ther is no  windows accessible ? how can I start the localy started Linda without restarting it by clicking on Linda.exe ?  is it the good and  the only solution ?

 

Regards

Share this post


Link to post
Share on other sites

here is my new code version.

The problem is that the new aerosoft Airbus X is a problem to manage the Spoilers.

I tested all the variables but the only one works is Spoiler_Lv_Anim.

This program control the Spoiler by externel microcontroller module (COM overs USB).

 

 

handle = com.open("\\\\.\\COM25",9600,0);

function callbackcom(handle,str,n)
 if n == 4 then
        str= string.sub(str, 2,4)
            variable = tonumber(str)
--            ipc.log(tostring(variable))
            ipc.writeLvar("L:Spoiler_lv_Anim",variable)
            ipc.writeUD("9004",variable)
  end
end
event.com(handle,4,4,10,"callbackcom")

 

Share this post


Link to post
Share on other sites

Hi

 

Dealing with your second problem first. LINDA comprises 2 parts: the LUA code and the GUI LINDA.EXE. The first part is started by FSUIPC4. To start the LINDA.EXE automatically you need to run the program, select the Setup LINDA page and tick the Start GUI with Sim checkbox. This will insert the correct lines in the FSUIPC4.ini file.

 

1.    I have no idea what the Lvar is but that does not matter.

 

2.    LINDA is event driven with a 1 Hz, 2 Hz and 10 Hz timers through the event.lua module. If you wish to call your function, you need to edit event.lua and place your function call at around line 46. If you plan to have several different functions you may wish to consider creating a handler function which calls each of your other functions. Please note that this file is always updated with a new version release. You should place your  function in user.lua for it to work probably with LINDA. Any edits you do should be followed by clicking on 'Reload LUA Engine'.

 

3.   Glad you got the infinite loop sorted.

Share this post


Link to post
Share on other sites

Thanks very much for your response.

 

Here is the contain of my envent.lua file :

module(..., package.seeall);

function button () a = a end
function com () a = a end
function control () a = a end
function flag () a = a end
function gfd () a = a end
function intercept () a = a end
function key () a = a end
function offset () a = a end
function param () a = a end
function sim () a = a end
function timer () a = a end
function vriread () a = a end
function cancel () a = a end
function terminate () a = a end

 

I don't understand what it mean and don't know where I adde my répetitive function ?

Regards

Share this post


Link to post
Share on other sites

hello,

Can't find where executing my program

 

When executed in ipcready.lua I added :

ipc.runlua('E:\MS_FlightSim_X\Modules\old_ipcready')

it works.

 

But know

Where can I add it in my config to execute it only when opening my plane.  I created a config and generated to me some lua files.

 

I can"t find the periodic caller to execute my other functions to refresh the buttons to the microcontroller.

 

My question is, How can I make the Handler variable of my COM port  to be global ?

 

Am sorry, I think am not good  but I can't find what you explained about periodic calls.

 

Need Help

Regards

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this