Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

After installing the latest version of FSUIPC the sim crash between 45' to 1h30 after takeoff with the FSUIPC5.dll error.

I only fly with 777 PMDG ( up to date last release ) and never had this before with all 5.103 versions ( FSUIPC5.dll error ). Only ucrtbase.dll error.

Event report at 23.44.05   04/08/17

Faulting application name: Prepar3D.exe, version: 4.0.28.21686, time stamp: 0x594a7255
Faulting module name: FSUIPC5.dll, version: 5.1.1.0, time stamp: 0x59804dd2
Exception code: 0xc0000005
Fault offset: 0x0000000000047fb3
Faulting process id: 0xaa8
Faulting application start time: 0x01d30d6139722b0a
Faulting application path: C:\P3D4\Prepar3D.exe
Faulting module path: C:\P3D4\Modules\FSUIPC5.dll
Report Id: 08f4f635-795e-11e7-bf33-e03f491af142

Event report .NET Runtime at 23.44.03   04/08/17

Application: Prepar3D.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 000007FED39D7FB3

 

Event report at 00.45.04  04/08/17

Faulting application name: Prepar3D.exe, version: 4.0.28.21686, time stamp: 0x594a7255
Faulting module name: FSUIPC5.dll, version: 5.1.1.0, time stamp: 0x59804dd2
Exception code: 0xc0000005
Fault offset: 0x0000000000047fb3
Faulting process id: 0x17e0
Faulting application start time: 0x01d30c9a7031d891
Faulting application path: C:\P3D4\Prepar3D.exe
Faulting module path: C:\P3D4\Modules\FSUIPC5.dll
Report Id: 6371ffd6-789d-11e7-925e-e03f491af142

Event report .NET Runtime at 00.45.03   04/08/17

Application: Prepar3D.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 000007FED18D7FB3

The culprit is  ?

After the crash when the simulator restarts with my own LUA backup script  I do not have crash anymore and I can fly 8 9 10 hours.

Kinds regards.

Francis.

 

 

 

 

FSUIPC5 Install.log

FSUIPC5sav.log

CDT report.jpg

Posted
2 hours ago, Nervures said:

The culprit is  ?

Looks like something to do with LINDA. When you say 

2 hours ago, Nervures said:

After the crash when the simulator restarts with my own LUA backup script  I do not have crash anymore

What exactly is the difference -- what is "my own LUA script"? An alternative to LINDA?

The crash location is deep inside the Lua interpreter, which is an area completely alien to me. The interpreter is just the standard one from lua.org wedged into FSUIPC.  I'd need the location of the error narrowed to the actual Lua function being used at the time, something I think only LINDA support can do, unless you can enable Lua debug/Trace in the FSUIPC Logging options and tolerate the huge log you'd get. Then I'd only need the part of the log leading to the crash.

Nothing in Lua has been changed for 5.11 (it is tthe same as in the last interim update being made for LINDA, version FSUIPC 5.103g). Did you jump direct from 5.103 to 5.11, with no interim updates? That would surprise me as Scott and I sorted out a number of LINDA problems with the 64-bit Lua in those.

Or it may be that your problem has always been there, but has never been serious enough to cause a crash. Those types of changes can occur just with things moving around a bit on re-compiling after totally unrelated changes. Places which were previously innocuous become inaccesible or dangerous.

I accept it is likely an FSUIPC problem, but I need the Lua side to be narrowed down for me. Can you report with all the details to LINDA support. I'll see if I can also get Scott to look at this thrread. To that end I'll edit the title to refer to LINDA. Okay?

Pete

Posted

Hi Pete,

1 hour ago, Pete Dowson said:

What exactly is the difference -- what is "my own LUA script"? An alternative to LINDA?

My LUA script is like your Autosave. If the sim crashes the LUA restarts the sim to the last save. LINDA saves flights ?

1 hour ago, Pete Dowson said:

unless you can enable Lua debug/Trace in the FSUIPC Logging options and tolerate the huge log you'd get

Busy tonight I will do it tomorrow night.

1 hour ago, Pete Dowson said:

Did you jump direct from 5.103 to 5.11, with no interim updates?

No. 5.103,b,e,g,j. Same for LINDA3.0.0 614,664,673,678,689 and 3.0.1.

1 hour ago, Pete Dowson said:

Can you report with all the details to LINDA support.

I'll do it but late tonight.

1 hour ago, Pete Dowson said:

To that end I'll edit the title to refer to LINDA. Okay?

Okay. Thanks.

See you tomorrow evening.

Francis.

Posted
1 hour ago, Nervures said:

My LUA script is like your Autosave. If the sim crashes the LUA restarts the sim to the last save.

So you are restarting the sim, so LINDA starts agan too. So everything is the same as before, but no crash? Something's not making sense, if your AppCrash is consistent after 45 -90mins as you say! Whay am i misunderstanding?

1 hour ago, Nervures said:

No. 5.103,b,e,g,j

As I said, there's no change to Lua between 5.103j and 5.11.

What else have you changed?

Pete

 

Posted

Hi Pete,

5 hours ago, Pete Dowson said:

So you are restarting the sim, so LINDA starts agan too. So everything is the same as before, but no crash?

Yes. LINDA but AS16 ASCA IVAP too.

Two FSUIPC5.log attached.

1 FSUIPC5sav.log => the sim starts at:    System time = 04/08/2017 22:35:40   and crashes after the waypoint KUSVA ( 3903660 LUA.6: OK KUSVA ). SITPO (3597337 LUA.6: OK SITPO ) is the waypoint before KUSVA.

Crash at: Event report at  23.44.05   04/08/17

2 FSUIPC5.log => the sim restarts at:    System time = 04/08/2017 23:44:51 and the first waypoint is SITPO ( 342718 LUA.9: OK SITPO ) then KUSVA ( 3903660 LUA.6: OK KUSVA ) to the end of flight without crash. Autosave every 15'.

18642353 LUA.5: Landing checklist complete.

20171771 Sim stopped: average frame rate for last 19990 secs = 41.6 fps
20171771    Max AI traffic was 0 aircraft
20174345 === Closing session: waiting for DLLStop to be called ...

 

In the reports I left empty lines to better see the important points.

 

5 hours ago, Pete Dowson said:

What else have you changed?

Nothing.

Kinds regards.

Francis.

 

 

 

FSUIPC5sav.log

FSUIPC5.log

Posted
10 hours ago, Nervures said:

Two FSUIPC5.log attached.

Neither are any use to me I'm afraid.  WEe need the LINDA folks to tell us what it is doing at the time, which Lua function.

The "successful" log doesn't terminate correctly. It is still waiting for SimConnect to tell it to close down. Did the sim hang? It can take a while for P3D to close down -- the Window disappears but many threads are still running. FSUIPC is simply waiting at that stage, as it logs every step in the close down once it is informed.

10 hours ago, Nervures said:

Nothing.

So the main difference is the location, continuing a flight. I realise it might seem unlikely, but since I don't know what LINDA is doing at all, it may well be important, couldn't it be some function in LINDA which is dependent on something local? I notice the log contains lots of stuff relating to where you are, how far you've gone, and so on.

If instead of continuing the flight, what if you started it again. Would it crash again in exactly the same place? If so it is definitely related to position or conditions at that point. Scenery, weather, speed, altitude, etc etc.

What about other flights, different routes? Do all crash? Is there anything in common.

I cannot really progress this any further. It needs someone from LINDA to take a look, probably with the Lua debug/trace option enabled.

Pete

 

Posted

Francis, I support LINDA and Pete has asked me to assist. There is much more going on here that I do not recognise, especially the detailed progress logging in French. I suggest you temporarily remove some of the extra functions to isolate the issue. I would also suggest you turn on Verbose logging in LINDA to see whether it is at fault as Pete suggests. 

I do have one issue as one of your LUA add-ons uses a file called actions.lua. This is also the name of the key LINDA aircraft module code and may result is some unknown adverse effects.

If the problem is one with LINDA then I would ask you to report it at https://www.avsim.com/forums/forum/429-linda-support/

Posted

Hi Pete,

20 hours ago, Pete Dowson said:

The "successful" log doesn't terminate correctly. It is still waiting for SimConnect to tell it to close down. Did the sim hang?

Yes. APPCRASH Prepar3D.exe Fault Module Name: api.dll.

Since P3 I always have a crash when closing the simulator. StackHash_b8ce, StackHash_e561, api.dll, KERNELLBASE.dll ........

20 hours ago, Pete Dowson said:

Would it crash again in exactly the same place?

No. I did the same flight and the crash happened later.

20 hours ago, Pete Dowson said:

What about other flights, different routes? Do all crash?

Yes with 5.11 six flights and six crashes with FSUIPC5.dll error.

With 5.103j sometimes but never FSUIPC5.dll error. Only ucrtbase.dll.

P3D v3 no crashes :-))

21 hours ago, Pete Dowson said:

probably with the Lua debug/trace option enabled.

I enabled the Lua debug/trace but this greatly slows the action of the keys programmed in LINDA.  I will try to use the keyboard

Kinds regards.

Francis.

Posted

Hi Scott,

Thank you for your help.

19 hours ago, Scotfleiger said:

I suggest you temporarily remove some of the extra functions to isolate the issue.

Which extra functions ? For me they are all necessary.

Under P3D v3 no crashes. V4 and 5.11 FSUIPC.dll error and Pete said: "Looks like something to do with LINDA" .

19 hours ago, Scotfleiger said:

I would also suggest you turn on Verbose logging in LINDA to see whether it is at fault as Pete suggests. 

It's done. Attached two FSUIPC5.log. Same flight as the previous one.

In the reports I left empty lines to make it more readable.

FSUIPC5_prev.log => From the beginning to the crash.

FSUIPC5.log => From the crash to the end of the flight.

21 hours ago, Pete Dowson said:

I cannot really progress this any further. It needs someone from LINDA to take a look, probably with the Lua debug/trace option enabled.

I enabled the Lua debug/trace but this greatly slows the action of the keys programmed in LINDA.  I will try to use the keyboard.

19 hours ago, Scotfleiger said:

I do have one issue as one of your LUA add-ons uses a file called actions.lua. This is also the name of the key LINDA aircraft module code and may result is some unknown adverse effects.

Same file. My LUA script is inside your actions.lua: C:\P3D4\Modules\linda\aircrafts\PMDG 777.

Kinds regards.

Francis.

FSUIPC5_prev.log

FSUIPC5.log

Posted
36 minutes ago, Nervures said:

Same file. My LUA script is inside your actions.lua: C:\P3D4\Modules\linda\aircrafts\PMDG 777.

I understand. I would strongly recommend you move your code to a file named user.lua in the same folder. This will mean it will not be overwritten when the next PMDG777 module is released. It will also allow us to isolate the problem. I am unable to support non-standard LINDA code. You can declare functions with the same name as in the actions.lua and these override (replace) those in the actions.lua code with the same name.

38 minutes ago, Nervures said:

I enabled the Lua debug/trace but this greatly slows the action of the keys programmed in LINDA.  I will try to use the keyboard.

The FSUIPC LUA debug is heavy on tracing but will isolate the actual line concerned. LINDA verbose logging is less onerous and will help more quickly to determine whether LINDA is at fault.

The following logging is not associated with LINDA although it refers to actions.lua:

    54476 LUA.0: On part dans la fonction INIT777 de la fonction Timer car 66FF=10 envoyÈ par la fonction InitVars. On passe ‡ INIT777 qui fera la situation test.
    54476 LUA.0: Lancement fonction INIT777. actions.lua.
    54476 LUA.0: C:\P3D4\SimObjects\Airplanes\PMDG 777-200LR\B777-200LR.air
    54476 LUA.0: C:\P3D4\Modules\
    54476 LUA.0: C:\P3D4\sound\
    54913 LUA.0: On part dans la fonction Situation test. INIT777 actions.lua.
    54913 LUA.0: On part dans la fonction Situation test. Situation test actions.lua.
    54913 LUA.0: Linda :C:\Users\Francis\Documents\Prepar3D v4 Files\

Posted
1 hour ago, Nervures said:

Under P3D v3 no crashes. V4 and 5.11 FSUIPC.dll error and Pete said: "Looks like something to do with LINDA" .

Well, the reason it is different could possibly be something in the Lua code not properly 64-bit compatible (though there were no compilation warnings as one would expect), but it is actually more likely to be due to things moving around a bit in memory, and it was just luck before that it didn't crash. Considering that you get a crash on session close and the crash during flights varies in place and whether it happens at all, there seems to be a very good chance that something in memory is getting corrupted.

The trouble I have is narrowing things down. I don't know LINDA or any of the other things you are loading, and I don't really know the insides of the Lua interpreter. I need it narrowing down for me, that's why I asked Scott to help.

It would be nice to narrow it down so much that I could reproduce it here with less code and no complex add-ons to confuse matters. Then I would be able to fix it quickly.

Pete

 

 

Posted

Hi Scott,

sorry for this late response but I was busy all day.

13 hours ago, Scotfleiger said:

I would strongly recommend you move your code to a file named user.lua

I move my code to the file named "user.lua" in the same folder C:\P3D4\Modules\linda\aircrafts\PMDG 777.

I deleted the "actions.lua" and replaced it with the one in the zip PMDG_777_v_1_3 => Best practice from this moment is DO NOT MAKE ANY CHANGES in original actions.lua file.

FSUIPC5.log => 84522 LUA.3: LINDA:: [USER] User's modifications script is loaded...

13 hours ago, Scotfleiger said:

........ It will also allow us to isolate the problem.

I have to make a new flight with LINDA verbose logging ?

Kinds regards.

Francis.

 

 

 

Posted

Good evening Pete,

12 hours ago, Pete Dowson said:

I need it narrowing down for me, that's why I asked Scott to help.

Scott contacted me and I made some changes on my code.

Tomorrow I think Scott will give me one or more tests.

I come back to you as soon as possible.

Kinds regards.

Francis.

 

Posted

Hi Pete,

That night same flight as the previous ones with the Scott's recommendation. The sim crashed: DINPUT8.dll instead of FSUIPC5.dll.

Event report:

Faulting application name: Prepar3D.exe, version: 4.0.28.21686, time stamp: 0x594a7255
Faulting module name: DINPUT8.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdecf
Exception code: 0xc0000005
Fault offset: 0x000000000000a909
Faulting process id: 0x2340
Faulting application start time: 0x01d30fc8a177a157
Faulting application path: C:\P3D4\Prepar3D.exe
Faulting module path: C:\Windows\system32\DINPUT8.dll
Report Id: 31776d02-7bce-11e7-802e-e03f491af142

I await the opinion of Scott.

Kinds regards.

Francis.

Posted

Hi Francis/Pete

DINPUT8.DLL has nothing to do with LINDA or, I believe, FSUIPC. If you do a Google search there are many posts on the DLL but with little explanation of what it does. The best I can find is:

Dinput8.dll - dll file called "Microsoft DirectInput" is a part of Microsoft® Windows® Operating System program developed by Microsoft Corporation.

Some applications or games may need this file to work properly. If dinput8.dll is missing, whenever you start the application/game you may experience various kinds of errors. To fix those errors, please read the Recommended Solution below.

I would suggest you disable all your add-ons and enable each in turn to find out which one is causing your crashes.

Andrew aka Scotflieger (not Scottflieger)

Posted

Hi Scot/Pete,

35 minutes ago, Scotfleiger said:

I would suggest you disable all your add-ons and enable each in turn to find out which one is causing your crashes.

I use LINDA EZCA AS16 and IVAP.

For Scot ( Pete already know ):

a friend, now deceased, has developed a co-pilot of 777 in LUA programming (12 scripts ). Like Fs2Crew but much more complex. This programming needs AS16 LINDA and EZCA. I have some basics in LUA but not enough, I think, to reprogram without these add-ons. I'll try it anyway. If I can not do it two options: return to V3 which works without any crash or accept crashes in v4 (when I restart the simulator with my backup it does not crash until the end of the flight (8 10 12 hours)).

I'll keep you informed.

Thank you both for your help.

Kinds regards.

Francis.

Posted
On 8/8/2017 at 5:32 PM, Nervures said:

You want the code that was in the "actions.lua" which is now in the user.lua file ?

Scott has written to me with his summary of the problems he is faced with trying to get to the bottom of your problem.  He won't be able to take it further due to lack of time, but it does seem there is some very strange additions in Lua to what LINDA is actually doing. One thing in particular causing an issue is this code, apparently repeated every second!!!

 local count = 0
    for _ in pairs(nomvar1) do count = count + 1 end
    file = io.open(Chemlog.."Linda777.log", "w+")
    for i = 1 , count do
        if valvar1 == nil then valvar1 = "nil" end
    file:write(valvar1)
    file:write("\n")
    end
    file:close() 

This is stopping the LINDA logging working usefully. It generates errors where on the file:write.  

One thing I should ask: why are you opening and closing the same file every second? Why not open it once at the start and close it at the end? (You should also check that file is not nil after the io.open).

Also, why not use the logging facilities provied for you. i.e. ipc.log?

Anyway, none of this explains why FSUIPC crashes in P3D4 but not P3D3. It must be something related to the 32- to 64- bit conversion, and the only thing I can think of it a structure alignment difference. FSUIPC normally packs all structures for efficiency, but it is noticeable that many Windows API structures are used in 64-bit with only things like pointers becoming 8 byte instead of 4 and creating holes 9unused bytes) within.

So, I will look to re-compile the Lua interpreter parts of FSUIPC with default packing, Look out for a link to a test version soon.

Pete

 

Posted

Hi Pete,

thank you so much for your answer.

20 minutes ago, Pete Dowson said:

One thing I should ask: why are you opening and closing the same file every second? Why not open it once at the start and close it at the end? (You should also check that file is not nil after the io.open).

It was a deceased friend who wrote this code. I am a beginner in programming LUA.

What I can tell you is that it is in the backup ( Sauvegarde in french ) function. Here is the code:

function Sauvegarde ()
    Mod = ipc.get("Mod")
    pbk = ipc.get("pbk")
    RW = ipc.readUB(0x7003)
    stage = ipc.readUB(0x7001)
    dem = ipc.readUB(0x7000)
    nomlog = ipc.get("nomlog")
    nomlog2 = ipc.get("nomlog2")
    icaoI = ipc.readSTR(0x66E3,4)
    icaoD = ipc.readSTR(0x700A,4)
    DP = ipc.readUB(0x7004)
    voxatc = 0
    kml = ipc.get("kml")
    Pistpref=ipc.readSTR(0x700E,3)
    lonpist = ipc.readUW(0x66D1)
    lat2 = ipc.readDBL(0x7300)
    lon2 = ipc.readDBL(0x7308)
    PMDG = ipc.readSTR(0x7005,5)
    nomvar1 = {"Mod","pbk","dem","stage","mont","FRC","fin","baro","RW",
            "nogsx","tp","metper","tpv","chkl","prop","Chemin","FSXchem",
            "typ","AES","cd","cg","nomlog","nomlog2","icaoI","icaoD",
            "Chemlog","Chemsav","DP","voxatc","kml","Pistpref","lonpist","lat2","lon2","gmt","PMDG","Lastwp"}
    valvar1 = {Mod,pbk,dem,stage,mont,FRC,fin,baro,RW,nogsx,tp,metper,
            tpv,chkl,prop,Chemin,FSXchem,typ,AES,cd,cg,nomlog,
            nomlog2,icaoI,icaoD,Chemlog,Chemsav,DP,voxatc,kml,Pistpref,lonpist,lat2,lon2,gmt,PMDG,Lastwp}
    local count = 0
    for _ in pairs(nomvar1) do count = count + 1 end
    file = io.open(Chemlog.."Linda777.log", "w+")
    for i = 1 , count do
        if valvar1 == nil then valvar1 = "nil" end
    file:write(valvar1)
    file:write("\n")
    end
    file:close()

This function is called by the Timer function.

46 minutes ago, Pete Dowson said:

Anyway, none of this explains why FSUIPC crashes in P3D4 but not P3D3.

Yesterday I made a long-haul flight (8h with P3D4) without crash. Only the crash when the simulator is closing.

Event report 10/08/2017 02:27:56

Faulting application name: Prepar3D.exe, version: 4.0.28.21686, time stamp: 0x594a7255
Faulting module name: ntdll.dll, version: 6.1.7601.23807, time stamp: 0x5915fdce
Exception code: 0xc0000374
Fault offset: 0x00000000000bf3e2
Faulting process id: 0x1e04
Faulting application start time: 0x01d31126f7632cb4
Faulting application path: C:\P3D4\Prepar3D.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: c13264e4-7d62-11e7-a1f1-e03f491af142

Kinds regards.

Francis.

 

Posted

Please try this FSUIPC update (5.111). It will be released formally within the next few days. Among other things, not relevant here, it has the Lua interpreter only using unpacked Windows API structures.

FSUIPC5111.zip

Just unzip it and copy it into the Modules folder.

Pete

 

Posted

Hello Pete,

Everything was well when after 8 hours of flight I had a power cut due to a thunderstorm.

I ended my flight with the back-up file.

I'll do another flight tonight.

Francis.

Posted
3 hours ago, Nervures said:

Everything was well when after 8 hours of flight I had a power cut due to a thunderstorm.

I ended my flight with the back-up file.

I'll do another flight tonight.

Okay. After you'ver confirmed with a few flights I'll build a new use release. Thanks.

Pete

 

Posted

Hi Pete,

I have just looked at my file FSUIPC5.ini and it was modified. I suppose by the new .dll.

Can you tell me if it seems to you correct ?

New entries:

ConsoleWindow=25,25,702,384

38=777COM - Copy
39=777NGX - Copy
40=Demauto - Copy
41=GSX - Copy
42=GSX_Arr - Copy
43=Autobrake - Copy
44=choix - Copy
45=Followme - Copy
46=RAAS - Copy
47=RWstart - Copy

[Window.Message Window]
Docked=389, 4130, 15927, 234

[Window.SimConnect Message Window]
Docked=1438, 1105, 14183, 690
Undocked=3028, 616, 553, 275

[Window.SimConnectWindow]
Docked=67, 414, 16248, 15859
Undocked=2634, 552, 391, 417

Francis.

FSUIPC5.ini

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