Jump to content
The simFlight Network Forums

Zlatko

Members
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

Zlatko last won the day on October 8 2018

Zlatko had the most liked content!

Profile Information

  • Gender
    Male
  • Location
    BG and UK

Zlatko's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Sorry to interfere here guys, but ( if i understood the problem correctly ) the behavior i am observing on my old system (FS 9 +Win 8.1) might provide some clues. If i use Notepad to write a lua plugin, and if i save it under Utf-8 codding ( Notepad---Save as - Filename = blabla.lua ---- Save as type = All Files ----- Encoding = UTF-8 ) , then when the plug-in is attempted to be run within flightsim , the build-in debugger reports " unexpected symbol after... " . If i try to compile it ( luac - o result.lua blabla.lua ), then the compiler is the one screaming out( " unexpected symbol .... ). The only way to run the lua plug-in is when it is saved under ANSI Coding - if that is all right ( I hope it is ). Best Regards
  2. Ok, if it works with P3D, then i'll do what you are suggesting - i'll move to P3D. Best Regards Zlatko
  3. Somehow missed that 'end' when copy -pasted the code here. I actually already did the test with eliminating the com port, but just to be sure that i am not missing something, i commented those parts again --dev = com.open("COM3",115200,0) and --com.write (dev, sen) and it crashed again. Then i commented all --dev = com.open("COM3",115200,0) --com.write (dev, sen) --ipc.log(sen) --ipc.display(sen) but crashed again. And then i did the opposite test - re-enabled the com port, but exchanged 02C8 offset with another one extracting vertical speed data 030C ( i know that one works ), also commented 3BE7 vsOne = ipc.readSD("030C") --vsiFail = ipc.readUB("3BE7") and inadvertent FS9 crashes stopped. Both 02C8 and 3BE7 , when used within Lua plug-in (in pair or on their own) are making the problem to re-appear . And there are some more like them. The problem is really really strange one . The 'clear time' before FS9 crashes is getting much shorter, when more of those are placed and called within the same lua plug-in, compared to occasions when only one sensitive offset is used.
  4. That one below is crashing FS9 almost instantly after the start: vsOneOld = 2001 dev = com.open("COM3",115200,0) while 1 do vsOne = ipc.readSD("02C8") vsiFail = ipc.readUB("3BE7") vsOne = (vsOne*60*3.28084)/256 if ( vsiFail == 1 ) then vsOne = 0 elseif (vsOne > 2000) then vsOne = 2000 elseif (vsOne < -2000) then vsOne = -2000 end vsOne = vsOne + 2000 if (vsOne ~= vsOneOld) then sen = string.format ("vs%04d", vsOne) com.write (dev, sen) --ipc.log(sen) ipc.display(sen) vsOneOld = vsOne end ipc.sleep(20) I hope , that i am not causing too much trouble 😞 The airplane i am using is the default Cessna172 . PS- I checked just now , it happens also with the rest of the default airplanes selected
  5. Ahh., now i can clearly see how i misled you in the beginning - first with the title and second - with my initial post - Sorry about that. Today i selected a batch of offsets that seem to be involved in the Lua Problem ( 02C8 , 3BE7 , 0B71 , 0B6E , 0366 ) and i ran a test - FSInterrogate reading them pretty fast in a loop directly from FSUIPC3. I left the test to run for good two hours or more and there was no FS9 crash or any other problem whatsoever. Now the finger is pointing back to the Lua part. But that is all right - i don't fixate my self to what i can't do with Lua for the moment. I am pretty happy with that part i can do. Regards Zlatko
  6. "To eliminate the Lua end, ry using FSInterrograte to read offsets directly?" This is the strangest part of the problem - FS9 and FSUIPC3.9 with all offsets work great on my system, when accessed from FSInterrogate, third party add-ons and interface programs, when they are talking to FSUIPC directly. They could work happily for hours and days as you mentioned it. It is the Lua part - when i call one part of the offsets from a Lua script, they work great. When i attempt to read others, Lua functionality works for some time ( minutes, one hour or maibe more), and i can see numbers being exported on the com port or logged within FSUIPC log file. And then without a warning - bang - the OS is closing Flightsim and FSUIPC and reporting exception code: c0000005 . Or maybe i am doing something wrong within Lua scripting . Am i over-driving the ipc. module by letting it to sleep for only 20 milliseconds? ( in the lua script above) . The crash seems to reappear faster when the script is more complex - like using if ... end constructs , string formating , etc... And as i said - it happens only with reading some offsets and never happen when i read others.
  7. Dear Mr Dowson and dear FS community, my name is Zlatko ( friends call me Jack ). Few months ago i bought FSUIPC 3.999z9b registration in order to be able to use Lua scripts and brush up an old but trustworthy FS9 flightsim platform . I know how ridiculous it sounds, if today i ask you to provide tech support for such an old product . But the reason for me to communicate my problem here is in hope that the issues i experienced are already known to the FS community and there is a work-around. Maybe i am just missing something obvious. Here is the problem itself- when i write Lua scripts, some of the offsets tend to work flowlessly but others crash the flight sim if they are used. Here is an example code with two offsets-one working and one crashing if used from Lua: dev = com.open("COM3",115200,0) while 1 do vsOne = ipc.readSD("02C8") -- CRASH'es FS9 vsTwo = ipc.readSD("030C") -- This one works well vsOne = (vsOne*60*3.28084)/256 vsTwo = (vsTwo*60*3.28084)/256 if (vsOne > 5000) then vsOne = 5000 elseif (vsOne < -5000) then vsOne = -5000 end sentence = string.format ("vert%04d", vsOne) com.write (dev, sentence) --ipc.log(sentence) ipc.display(sentence) ipc.sleep(20) end Error Code when FS crash occur: Problem Event Name: APPCRASH Application Name: fs9.exe Application Version: 9.0.0.30612 Application Timestamp: 00534d69 Fault Module Name: FSUIPC.DLL Fault Module Version: 3.9.9.9 Fault Module Timestamp: 56995c3b Exception Code: c0000005 Exception Offset: 0002c224 OS Version: 6.3.9600.2.0.0.256.48 Locale ID: 1026 I've already tryed all the problem solving routines i could thing of - there is only one copy of FSUIPC within Modules Folder, the OS is Windows 8.1, and FS9 is installed on drive D ( far enough from 'Program Files' ) . FS9 is started as Administrator. Exception Code c0000005 claims the problem is access violation, and i disabled OS DEP ( data execution prevention) entirely, but problem still exists. Processor (intel core i3) is at 50 % and memory - at 20% busy when FS9 runs. There are no other add -ons instaled - just FS9 + FSUIPC 3.999z9b registered. The only thing (if my observation is right) to extend clear period before crashes is keeping ipc sleep interval at maximum (when possible) within the Lua script and simplifiyng the script itself up to only two or three rows of code.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.