Jump to content
The simFlight Network Forums

SeanMick

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by SeanMick

  1. Hi Pete, Many thanks for that. Since I posted, I've added the event.terminate code to a full version of one of my interface modules and, as I expected, it works fine so I'll move on now to the next install in the re-building process!!! I'll certainly keep your cautions regarding Win10 in mind. Best regards, Mike.
  2. I also set TimeForLuaClosing=0 in the ini file and, on direct exit, the log file is as follows with a clean exit from FSX. ********* FSUIPC4, Version 4.958g (29th November 2016) by Pete Dowson ********* Windows version reported as 6.2.?.9200 fsx.exe version = 10.0.61637.0 Reading options from "F:\FSX\Modules\FSUIPC4.ini" Running inside FSX on Windows 8.0 or later Module base=779A0000 46735 LUA.0: Button event: calling "button_0" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 46735 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:16 46813 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:17 46985 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:18 47016 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:19 47016 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 51219 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 51219 Sim stopped: average frame rate for last 26 secs = 29.6 fps 51219 Max AI traffic was 19 aircraft 55469 Deactivated for PID=5636, "notepad++.exe" 55469 Lost focus to PID=5636, "notepad++.exe" 55485 === DLLStop called ... 55485 === About to kill and Lua plug-ins still running ... 55500 LUA.0: ended "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 55516 === Closing external processes we started ... 55516 === About to kill my timers ... 55719 === Restoring window procs ... 55719 === Unloading libraries ... 55719 === stopping other threads ... 55938 === NOTE: not calling SimConnect_Close ... 55938 === AI slots deleted! 55938 === Freeing button memory ... 55938 === Closing my Windows ... 55938 === Freeing FS libraries ... 56953 === Closing devices ... 56953 === Closing the Log ... Bye Bye! ... 56953 System time = 29/11/2016 21:07:09, Simulator time = 11:43:15 (19:43Z) 56953 *** FSUIPC log file being closed Minimum frame rate was 26.9 fps, Maximum was 30.0 fps Minimum available memory recorded was 3074Mb Average frame rate for running time of 26 secs = 29.6 fps G3D fix: Passes 10399, Null pointers 0, Bad pointers 0, Separate instances 0 Maximum AI traffic for session was 19 aircraft Memory managed: 19 Allocs, 19 Freed ********* FSUIPC Log file closed ***********
  3. Hi Pete, I have repeated the tests I ran earlier and hopefully have included your requests. I have set TimeForLuaClosing=5 in all of these, as it was in the previous tests I sent you. That's when the signal to lua threads to terminate is sent. So it's something to do with one or other of the things running or instigated in your lua plug=ins. Since I've no idea what they do I can't really comment further on tht. Using normal Lua library functions only, or some external drivers? The Lua test file is very simple, as given below. I comment out the event.terminate() call depending on the test. -- A Lua plugin to set controller buttons. -- Define the controllers CH_Fighter_Stick = 4 ipc.display("Default Cessna C172 Controllers defined! ",2) ipc.sleep(2000) -- BUTTON 0: Parking Brake function button_0 ( ) ipc.keypressplus(190) ipc.display("Testing button 0... Brakes ",2) end -- Button 0 event trapping event.button(CH_Fighter_Stick,0,1,"button_0") -- EXIT STRATEGY function exit_strategy ( ) ipc.display("Exiting... ",2) ipc.exit() end -- Exit mode --event.terminate("exit_strategy") I have installed Version 4958g and tested as follows. In each case, I run FSX, load the above lua file via key press combination, check that Button 0 is programmed correctly and then exit the sim via Ctrl+C. The FSUIPC log files for the following three cases are given below (1) with event.terminate enabled (2) with event.terminate disabled and I invoke LuaKillAll via a key press combination (3) with event.terminate disabled and I exit directly without invoking LuaKillAll (1) with event.terminate enabled ********* FSUIPC4, Version 4.958g (29th November 2016) by Pete Dowson ********* Windows version reported as 6.2.?.9200 fsx.exe version = 10.0.61637.0 Reading options from "F:\FSX\Modules\FSUIPC4.ini" Running inside FSX on Windows 8.0 or later Module base=779A0000 23375 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 25375 LUA.0: Button event: calling "button_0" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 25375 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:16 25437 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:17 25593 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:18 25609 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:19 25609 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 29781 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 34328 === DLLStop called ... 34328 === Getting Lua plug-ins to close ... 34328 LUA.0: Terminate event: calling "exit_strategy" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 34328 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:26 34328 List of Lua threads to be terminated: 34328 0 = "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 34797 === Closing external processes we started ... 34797 === About to kill my timers ... 35000 === Restoring window procs ... 35000 === Unloading libraries ... 35015 === stopping other threads ... 35218 === NOTE: not calling SimConnect_Close ... 35218 === AI slots deleted! 35218 === Freeing button memory ... 35218 === Closing my Windows ... 35218 === Freeing FS libraries ... 36218 === Closing devices ... 36218 === Closing the Log ... Bye Bye! ... 36234 System time = 29/11/2016 20:11:32, Simulator time = 11:43:11 (19:43Z) 36234 *** FSUIPC log file being closed Minimum frame rate was 28.4 fps, Maximum was 30.0 fps Minimum available memory recorded was 3091Mb Average frame rate for running time of 11 secs = 29.2 fps G3D fix: Passes 10509, Null pointers 0, Bad pointers 0, Separate instances 0 Maximum AI traffic for session was 19 aircraft Memory managed: 13 Allocs, 13 Freed ********* FSUIPC Log file closed *********** (2) With event.terminate disabled and I invoke LuaKillAll via a key press combination before FSX exit ********* FSUIPC4, Version 4.958g (29th November 2016) by Pete Dowson ********* Windows version reported as 6.2.?.9200 fsx.exe version = 10.0.61637.0 Reading options from "F:\FSX\Modules\FSUIPC4.ini" Running inside FSX on Windows 8.0 or later Module base=779A0000 29859 LUA.0: Button event: calling "button_0" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 29859 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:16 29922 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:17 30078 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:18 30094 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:19 30094 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 33359 LUA.0: ended "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 38813 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 42984 === DLLStop called ... 42984 === Getting Lua plug-ins to close ... 42984 List of Lua threads to be terminated: 42984 === Closing external processes we started ... 42984 === About to kill my timers ... 43188 === Restoring window procs ... 43188 === Unloading libraries ... 43188 === stopping other threads ... 43391 === NOTE: not calling SimConnect_Close ... 43391 === AI slots deleted! 43406 === Freeing button memory ... 43406 === Closing my Windows ... 43406 === Freeing FS libraries ... 44406 === Closing devices ... 44406 === Closing the Log ... Bye Bye! ... 44422 System time = 29/11/2016 20:29:36, Simulator time = 11:43:15 (19:43Z) 44422 *** FSUIPC log file being closed Minimum frame rate was 28.2 fps, Maximum was 30.0 fps Minimum available memory recorded was 3092Mb Average frame rate for running time of 15 secs = 29.4 fps G3D fix: Passes 10426, Null pointers 0, Bad pointers 0, Separate instances 0 Maximum AI traffic for session was 19 aircraft Memory managed: 14 Allocs, 14 Freed ********* FSUIPC Log file closed *********** (3) with event.terminate disabled and I exit directly without invoking LuaKillAll ********* FSUIPC4, Version 4.958g (29th November 2016) by Pete Dowson ********* Windows version reported as 6.2.?.9200 fsx.exe version = 10.0.61637.0 Reading options from "F:\FSX\Modules\FSUIPC4.ini" Running inside FSX on Windows 8.0 or later Module base=779A0000 33079 LUA.0: Button event: calling "button_0" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 33079 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:16 33141 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:17 33297 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:18 33313 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:19 33329 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 37204 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 41516 === DLLStop called ... 41516 === Getting Lua plug-ins to close ... 41516 List of Lua threads to be terminated: 41516 0 = "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 41797 ***ERROR C0000005 at 771D6B89 StopAllLuaThreads(0) 41797 *** Access violation trying to read address 3ACFF998 41797 *** EAX 3ACFF988 EBX 3ACFF988 ECX 3ACFF98A EDX 3ACFF988 EDI 3ACFF988 ESI 3ACFF98A 41797 *** EIP 771D6B89 EBP 000DF9CC ESP 000DF9A0 41813 ********** Modules List *********** 41813 00D90000-00E39000 xuipc.dll 41813 01000000-0129E000 fsx.exe 41813 04BB0000-04BEF000 object_placement.dll 41813 04BF0000-04C21000 simpropext.dll 41813 04DE0000-04E08000 traffictoolbox.dll 41813 04F70000-04F87000 visualfxtool.dll 41829 0B640000-0B64E000 SimConnect.dll 41829 0F770000-10545000 nvd3dum.dll 41829 11870000-12416000 ieframe.dll 41829 125C0000-13956000 mshtml.dll 41829 20000000-20054000 ablscpt.dll 41829 20060000-2008F000 acontain.dll 41829 20090000-200D1000 ai_player.dll 41844 200E0000-2021B000 API.DLL 41844 20220000-20285000 atc.dll 41844 20290000-202CD000 controls.dll 41844 202D0000-202E4000 demo.dll 41844 202F0000-20334000 facilities.dll 41844 20340000-20456000 fe.dll 41844 20460000-204DE000 flight.dll 41844 204E0000-2065A000 fsui.dll 41844 20660000-20715000 g2d.dll 41844 20720000-20849000 g3d.dll 41844 20850000-20873000 gps.dll 41860 20880000-208F4000 language.dll 41860 20900000-20921000 livingwater.dll 41860 20930000-20A25000 main.dll 41860 20A30000-20B26000 multiplayer.dll 41860 20B30000-20BAE000 panels.dll 41860 20BB0000-20C8A000 sim1.dll 41860 20C90000-20CBC000 simprop.dll 41860 20CC0000-20CCB000 simscheduler.dll 41860 20CD0000-20D01000 sound.dll 41860 20D10000-20D40000 symmap.dll 41860 20D40000-20E21000 terrain.dll 41860 20E30000-20E47000 fs-traffic.dll 41875 20E50000-20F33000 ui.dll 41875 20F40000-20F7D000 util.dll 41875 20F80000-20FB2000 visualfx.dll 41875 20FC0000-21013000 weather.dll 41875 21020000-2104D000 window.dll 41875 50010000-5001E000 msimtf.dll 41875 50020000-50041000 srpapi.dll 41875 50050000-50059000 msadp32.acm 41875 50060000-5006B000 XInput1_4.dll 41875 50070000-50095000 dinput.DLL 41875 500A0000-500A8000 midimap.dll 41875 500B0000-500E9000 wdmaud.drv 41875 500F0000-50171000 RICHED20.DLL 41875 50180000-503E3000 gameux.dll 41891 503F0000-50457000 msvcp110_win.dll 41891 50460000-50530000 d3d12.dll 41891 50530000-5058C000 d3d10_1core.dll 41891 50590000-506A5000 D3DCompiler_34.dll 41891 506B0000-506E1000 msls31.dll 41891 506F0000-507B7000 nvSCPAPI.dll 41891 507C0000-5091F000 d3d9.dll 41891 50920000-5098D000 d3dx10_34.dll 41891 50990000-50CFF000 d3dx9_34.dll 41891 50D00000-50D87000 MSVCP80.dll 41891 50D90000-50E9F000 MFC80.DLL 41891 50EA0000-50F8D000 DDRAW.dll 41891 50F90000-51207000 AcLayers.DLL 41891 55100000-5510A000 msacm32.drv 41891 55110000-55138000 uiautomationcore.dll 41891 55140000-55151000 winbrand.dll 41891 55480000-554C7000 dxdiagn.dll 41891 55540000-555D2000 apphelp.dll 41907 55F90000-55F99000 AVRT.dll 41907 55FA0000-55FD6000 DINPUT8.dll 41907 57370000-5738F000 gpapi.dll 41907 63A00000-63A16000 MPR.dll 41907 64140000-64174000 MLANG.dll 41907 65590000-6559A000 HID.DLL 41907 65970000-65B04000 urlmon.dll 41907 65B60000-65B67000 XInput9_1_0.dll 41907 65B70000-65C0B000 MSVCR80.dll 41907 65D50000-65D57000 ksuser.dll 41907 65D60000-65DF4000 COMCTL32.dll 41907 65E10000-65E1F000 sfc_os.DLL 41907 66430000-6645C000 d3d10_1.dll 41907 66460000-66466000 SHFOLDER.dll 41907 66680000-66683000 sfc.dll 41907 67FA0000-67FB8000 MSACM32.dll 41907 68230000-6823E000 MFC80ENU.DLL 41907 68290000-68297000 DCIMAN32.dll 41907 682A0000-6831A000 AcSpecfc.DLL 41907 68B30000-68EBB000 msi.dll 41907 69350000-69579000 iertutil.dll 41907 69580000-697AF000 WININET.dll 41907 69B10000-69C3F000 MSXML4.DLL 41907 69F20000-69FEF000 wintypes.dll 41907 69FF0000-6A06B000 AUDIOSES.DLL 41922 6A070000-6A0C8000 MMDevApi.dll 41922 6A0D0000-6A1C1000 twinapi.appcore.dll 41922 6A1D0000-6A2E3000 dcomp.dll 41922 6A2F0000-6A334000 dataexchange.dll 41922 6A340000-6A3C5000 mscms.dll 41922 6A3D0000-6A8A8000 d2d1.dll 41922 6BC70000-6BE9F000 d3d11.dll 41922 6C0F0000-6C23F000 PROPSYS.dll 41922 6C3C0000-6C5B5000 DWrite.dll 41922 6C610000-6C627000 USP10.dll 41922 6FCD0000-6FD92000 fastprox.dll 41922 6FDA0000-6FE07000 wbemcomn.dll 41922 702B0000-7041E000 WindowsCodecs.dll 41922 70420000-70589000 gdiplus.dll 41922 70690000-706B2000 DEVOBJ.dll 41922 70750000-7079E000 MSWSOCK.dll 41922 70980000-70990000 wbemsvc.dll 41922 70990000-7099D000 wbemprox.dll 41922 709A0000-709BF000 dwmapi.dll 41922 709C0000-70A44000 dxgi.dll 41922 714A0000-714CF000 rsaenh.dll 41922 714D0000-714E3000 CRYPTSP.dll 41922 714F0000-71533000 WINSTA.dll 41922 71540000-715B5000 uxtheme.dll 41922 72A50000-72A60000 WKSCLI.DLL 41922 72B50000-72B5A000 Secur32.dll 41922 734A0000-734AB000 NETUTILS.DLL 41922 73680000-7388A000 COMCTL32.dll 41922 73890000-73896000 MSIMG32.dll 41922 738A0000-738CF000 IPHLPAPI.DLL 41922 738D0000-738D8000 VERSION.dll 41922 738E0000-738F3000 NETAPI32.dll 41922 73960000-7397A000 USERENV.dll 41922 73980000-7398F000 WTSAPI32.DLL 41922 73990000-739B3000 WINMMBASE.dll 41922 739C0000-73A14000 OLEACC.dll 41922 73A20000-73A44000 WINMM.dll 41922 73A50000-73AD9000 DSOUND.dll 41922 73AE0000-73AFB000 bcrypt.dll 41922 73B00000-73B6A000 WINSPOOL.DRV 41922 73B70000-73B7A000 CRYPTBASE.dll 41922 73B80000-73B9E000 SspiCli.dll 41938 73BA0000-73D41000 KERNELBASE.dll 41938 73D50000-73E11000 RPCRT4.dll 41938 73EE0000-73F43000 WS2_32.dll 41938 73F50000-73FAA000 bcryptPrimitives.dll 41938 73FB0000-74090000 ucrtbase.dll 41938 74090000-7449B000 SETUPAPI.dll 41938 744A0000-74517000 advapi32.dll 41938 74520000-7467B000 gdi32full.dll 41938 74680000-7476A000 ole32.dll 41938 74770000-74785000 win32u.dll 41938 74790000-7480B000 msvcp_win.dll 41938 748B0000-74A0F000 USER32.dll 41938 74A10000-74A51000 sechost.dll 41938 74A60000-74B1E000 msvcrt.dll 41938 74C90000-74CD5000 powrprof.dll 41938 74CE0000-760B9000 SHELL32.dll 41938 760C0000-76144000 clbcatq.dll 41938 76150000-76285000 MSCTF.dll 41938 76390000-763A9000 imagehlp.dll 41938 763B0000-76438000 shcore.dll 41938 76440000-76446000 PSAPI.DLL 41938 76450000-76496000 shlwapi.dll 41938 764A0000-764CB000 GDI32.dll 41938 764D0000-76A3E000 windows.storage.dll 41938 76A40000-76B25000 COMDLG32.dll 41938 76B30000-76B74000 WINTRUST.dll 41938 76BE0000-76CC0000 KERNEL32.DLL 41938 76CC0000-76CF6000 cfgmgr32.dll 41938 76D10000-76F21000 combase.dll 41938 76F30000-76F55000 IMM32.dll 41938 76F60000-76FF4000 OLEAUT32.dll 41938 77000000-7717D000 CRYPT32.dll 41938 77180000-7718F000 profapi.dll 41938 77190000-7719D000 kernel.appcore.dll 41938 771A0000-771AE000 MSASN1.dll 41954 771B0000-77332000 ntdll.dll 41954 77600000-77752000 uiautomationcore.dll 41954 779A0000-77FF5000 FSUIPC4.dll 41954 *********************************** 41954 EIP 771D6B89 is in ntdll.dll, Base=771B0000 41954 Stack EBP 000DF9CC->771D6AED, which is ntdll.dll (Base=771B0000) 41954 Stack EBP 000DF9E0->771EF881, which is ntdll.dll (Base=771B0000) 41954 Stack EBP 000DF9F8->000DFDE4, which is (Base=00000000) 41954 Stack EBP 77A0818F->E8FFFC4D, which is (BAD) (Base=00000000) 41954 === Closing external processes we started ... 41954 === About to kill my timers ... 42157 === Restoring window procs ... 42157 === Unloading libraries ... 42157 === stopping other threads ... 42360 === NOTE: not calling SimConnect_Close ... 42360 === AI slots deleted! 42360 === Freeing button memory ... 42360 === Closing my Windows ... 42375 === Freeing FS libraries ... 43375 === Closing devices ... 43375 === Closing the Log ... Bye Bye! ... 43391 System time = 29/11/2016 20:31:06, Simulator time = 11:43:12 (19:43Z) 43391 *** FSUIPC log file being closed Minimum frame rate was 29.4 fps, Maximum was 30.0 fps Minimum available memory recorded was 3082Mb Average frame rate for running time of 12 secs = 29.4 fps G3D fix: Passes 10416, Null pointers 0, Bad pointers 0, Separate instances 0 Maximum AI traffic for session was 19 aircraft Memory managed: 12 Allocs, 12 Freed ********* FSUIPC Log file closed *********** In all cases, FSX exits without the "Fatal Error" message I was getting before. I'm not sure if this is what you wanted but just let me know if you need any further testing, Many thanks again for you support. Best regards, Mike.
  4. Hi Pete, Many thanks for your prompt reply. I too was a very satisfied Win7-64 customer but I intend to move to Prepar3D at some stage soon and decided that since that's in active development I'd go with the latest OS version for future-proofing... bad call on my part it seems! My apologies for not including the FSUIPC version details. I have tried both 9.958 and Version 9.934 which I used under Win7 and I have had the same crash-on-exit events in both cases. I am interfacing to simple USB based hardware, CH Product devices and Leo Bodnar controllers. I have the additional lines you suggested added to my FSUIPC ini file. In the last while I assigned a joystick button to LuaKillAll and I have found that invoking this prior to quitting FSX results in a clean exit from the sim. Moving on from that, I tried your suggestion regarding using event.terminate to call ipc.exit and this has solved the problem I think in that I now get a graceful exit with the usual panel asking me to confirm my exit from FSX. I am including below the last few lines of the log files in all of these cases if they are of any help, I'd really like to understand why this termination code is required now and not in my previous system. WITHOUT INVOKING LuaKillAll... 42765 LUA.0: Button event: calling "button_0" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 42765 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:21 42828 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:22 42984 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:23 43000 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:24 43000 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 52047 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 52047 Sim stopped: average frame rate for last 29 secs = 29.8 fps 52047 Max AI traffic was 15 aircraft 55890 === DLLStop called ... INVOKING LuaKillAll... 48703 LUA.0: Button event: calling "button_0" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 48703 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:21 48765 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:22 48921 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:23 48937 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:24 48953 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 55781 LUA.0: ended "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 61875 Memory in use: 981Mb, Avail=3115Mb 63328 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 63328 Sim stopped: average frame rate for last 41 secs = 29.8 fps 63328 Max AI traffic was 16 aircraft 67812 === DLLStop called ... 67812 === About to kill my timers ... 68015 === Restoring window procs ... 68015 === Unloading libraries ... 68031 === stopping other threads ... 68234 === NOTE: not calling SimConnect_Close ... 68234 === AI slots deleted! 68234 === Freeing button memory ... 68234 === Closing my Windows ... 68234 === Freeing FS libraries ... 69234 === Closing devices ... 69234 === Closing the Log ... Bye Bye! ... 69234 System time = 29/11/2016 14:43:39, Simulator time = 14:43:14 (22:43Z) 69250 *** FSUIPC log file being closed Minimum frame rate was 28.7 fps, Maximum was 30.0 fps Minimum available memory recorded was 3113Mb Average frame rate for running time of 41 secs = 29.8 fps G3D fix: Passes 10412, Null pointers 0, Bad pointers 0, Separate instances 0 Maximum AI traffic for session was 16 aircraft Memory managed: 26 Allocs, 26 Freed ********* FSUIPC Log file closed *********** WITH event.terminate/ipc.exit CODE ADDED 37157 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:240 37172 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:244 37172 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 48157 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 48157 Sim stopped: average frame rate for last 30 secs = 29.9 fps 48157 Max AI traffic was 23 aircraft 52719 === DLLStop called ... 52719 LUA.0: Terminate event: calling "exit_strategy" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 52719 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:1499 53000 === About to kill my timers ... 53203 === Restoring window procs ... 53203 === Unloading libraries ... 53203 === stopping other threads ... 53407 === NOTE: not calling SimConnect_Close ... 53407 === AI slots deleted! 53407 === Freeing button memory ... 53407 === Closing my Windows ... 53407 === Freeing FS libraries ... 54407 === Closing devices ... 54407 === Closing the Log ... Bye Bye! ... 54422 System time = 29/11/2016 16:16:21, Simulator time = 16:15:59 (00:15Z) 54422 *** FSUIPC log file being closed Minimum frame rate was 29.4 fps, Maximum was 30.0 fps Minimum available memory recorded was 3087Mb Average frame rate for running time of 30 secs = 29.9 fps G3D fix: Passes 10425, Null pointers 0, Bad pointers 0, Separate instances 0 Maximum AI traffic for session was 23 aircraft Memory managed: 86 Allocs, 86 Freed ********* FSUIPC Log file closed *********** It looks like this is a solution to my problem so many many thanks for your help and great support. I will add this terminating event to all of my lua control files and hopefully I can now move on to the next install issue, ie the next of very very many I suspect! I know now why I kept my last FSX machine for so long!!! Let me know if you would like me to do any further investigation. Best regards, Mike.
  5. Hello, I would really value any input on a problem I am having with FSUIPC although I'm fairly sure that it is not directly caused by the module. Firstly, some background. For the past number of years I have been running a slow, but very stable, FSX/Acceleration first on Win-XP and then Win7-64 with very little difficulty and I have developed LUA-based modules to automatically configure hardware interfaces for the aircraft in the simulator. However, the time came to update and recently I purchased an i7 system running Win10-64 and have started to replicate my old simulation environment on the new platform. The installs of FSX/Acceleration and the corresponding SDK went fine. I then installed FSUIPC and transferred my LUA files. Since then, I have been getting constant Crash On Exit errors, ie "A Fatal Error Occurred in FSX etc". The Windows Event Viewer gives the following: Faulting application name: fsx.exe, version: 10.0.61637.0, time stamp: 0x46fadb14 Faulting module name: ntdll.dll, version: 10.0.14393.447, time stamp: 0x5819be95 Exception code: 0xc0000005 Fault offset: 0x00026b89 Faulting process ID: 0x21c0 Faulting application start time: 0x01d249c747d4635f Faulting application path: F:\FSX\fsx.exe Faulting module path: C:\Windows\SYSTEM32\ntdll.dll Report ID: a9fa5732-b5ba-11e6-9628-38d547139b07 Faulting package full name: Faulting package-relative application ID: For my initial investigation, I reduced one of my LUA modules down to just a few statements displaying a message on the screen (ipc.display) and that works fine. If I then include an event.button() statement I get the crash and if I omit it again, FSX exits correctly. I've tested for the same result with an event.offset() statement. In the case of the fault, the log for a short flight looks like this... FSUIPC4 Key is provided WIDEFS7 not user registered, or expired 47 System time = 28/11/2016 23:19:44 47 FLT path = "...\Documents\Flight Simulator X Files\" 63 Trying to connect to SimConnect Acc/SP2 Oct07 ... 63 FS path = "F:\FSX\" 156 LogOptions=A0000000 00000001 156 SIM1 Frictions access gained 156 Wind smoothing fix is fully installed 156 G3D.DLL fix attempt installed ok 156 SimConnect_Open succeeded: waiting to check version okay 156 Trying to use SimConnect Acc/SP2 Oct07 3266 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0) 3266 Initialising SimConnect data requests now 3266 FSUIPC Menu entry added 3297 ..\Documents\Flight Simulator X Files\Default Initial Test Flight.FLT 3297 F:\FSX\SimObjects\Airplanes\C172\Cessna172SP.AIR 10672 *** EVENT: Cntrl= 66514 (0x000103d2), Param= 0 (0x00000000) ATC_MENU_CLOSE 22641 System time = 28/11/2016 23:20:07, Simulator time = 11:42:41 (19:42Z) 22641 Aircraft="Cessna Skyhawk 172SP Paint1" 23641 Starting everything now ... 23641 LUA.0: beginning "F:\FSX\Modules\ipcReady.lua" 23641 LUA.0: F:\FSX\Modules\ipcReady.lua:8 23641 LUA.0: Global: ipcPARAM = 0 23703 LUA.0: ended "F:\FSX\Modules\ipcReady.lua" 24860 Advanced Weather Interface Enabled 27110 LUA.0: beginning "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 27110 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:5 27110 LUA.0: Global: ipcPARAM = 0 27156 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:6 31172 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:10 31172 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:11 31172 LUA.0: Global: CH_Fighter_Stick = 4 31219 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:12 33235 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:24 33235 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:19 33235 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:26 33235 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 36594 LUA.0: Button event: calling "button_0" in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 36594 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:21 36656 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:22 36750 *** EVENT: Cntrl= 65588 (0x00010034), Param= 0 (0x00000000) BRAKES 36844 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:23 36906 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:24 36906 LUA.0: Waiting for an event in "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 41766 *** EVENT: Cntrl= 65732 (0x000100c4), Param= 0 (0x00000000) EXIT 41813 Sim stopped: average frame rate for last 20 secs = 19.8 fps In the case when I disable just the event.button statement, the log for a similar flight looks like this and FSX exits correctly... FSUIPC4 Key is provided WIDEFS7 not user registered, or expired 109 System time = 28/11/2016 23:23:52 109 FLT path = "...\Documents\Flight Simulator X Files\" 125 Trying to connect to SimConnect Acc/SP2 Oct07 ... 125 FS path = "F:\FSX\" 218 LogOptions=A0000000 00000001 218 SIM1 Frictions access gained 218 Wind smoothing fix is fully installed 218 G3D.DLL fix attempt installed ok 218 SimConnect_Open succeeded: waiting to check version okay 218 Trying to use SimConnect Acc/SP2 Oct07 3500 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0) 3500 Initialising SimConnect data requests now 3500 FSUIPC Menu entry added 3531 \Documents\Flight Simulator X Files\Default Initial Test Flight.FLT 3531 F:\FSX\SimObjects\Airplanes\C172\Cessna172SP.AIR 48718 *** EVENT: Cntrl= 66514 (0x000103d2), Param= 0 (0x00000000) ATC_MENU_CLOSE 56718 System time = 28/11/2016 23:24:49, Simulator time = 11:42:40 (19:42Z) 56734 Aircraft="Cessna Skyhawk 172SP Paint1" 57734 Starting everything now ... 57734 LUA.0: beginning "F:\FSX\Modules\ipcReady.lua" 57734 LUA.0: F:\FSX\Modules\ipcReady.lua:8 57734 LUA.0: Global: ipcPARAM = 0 57750 LUA.0: ended "F:\FSX\Modules\ipcReady.lua" 58890 Advanced Weather Interface Enabled 62703 *** EVENT: Cntrl= 65794 (0x00010102), Param= 0 (0x00000000) PAUSE_ON 66781 *** EVENT: Cntrl= 65561 (0x00010019), Param= 0 (0x00000000) PAUSE_TOGGLE 69187 LUA.0: beginning "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 69187 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:5 69187 LUA.0: Global: ipcPARAM = 0 69234 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:6 73250 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:10 73250 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:11 73250 LUA.0: Global: CH_Fighter_Stick = 4 73297 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:12 75312 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:24 75312 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:19 75312 LUA.0: F:\FSX\Modules\MGE_Cessna_Ctrl.lua:24 75312 LUA.0: ended "F:\FSX\Modules\MGE_Cessna_Ctrl.lua" 82656 *** EVENT: Cntrl= 65732 (0x000100c4), Param= 0 (0x00000000) EXIT 82703 Sim stopped: average frame rate for last 26 secs = 19.9 fps 88250 System time = 28/11/2016 23:25:21, Simulator time = 11:43:01 (19:43Z) 88250 *** FSUIPC log file being closed Average frame rate for running time of 26 secs = 19.9 fps G3D fix: Passes 10283, Null pointers 0, Bad pointers 0, Separate instances 0 Memory managed: 18 Allocs, 18 Freed ********* FSUIPC Log file closed *********** I have been searching the forums to try and track down anything similar and I think the nearest are perhaps the following but these all relate to P3D... http://forum.simflight.com/topic/82221-runif1kill-seems-not-to-work-properly-after-update-to-4957b/#comment-496636 http://www.prepar3d.com/forum/viewtopic.php?f=6310&t=122273 http://forum.simflight.com/topic/82312-timeforluaclosing/ I would really appreciate any insights you might have on the issue. Many thanks for your help, Best regards, Mike.
  6. Hi Pete, I have investigated a bit more and the problem is with the gauge itself, the code is operating fine. I may be able to get a workaround using lua. Many thanks.
  7. Hi Pete, Many thanks for the prompt reply. The mouse actions are equivalent to key combinations of the form ctrl+shift+win+A (or B or C etc). I had difficulty directly setting a button to combinations like this. Is this possible? The alternative approach I used in the Lua file was to detect the button (event.button) which I am setting to the mouse action I want to emulate and use this to call a lua function which uses ipc.keypress to send the appropriate key combination to FS, eg for ctrl+shift+win+C I use function button1( ) ipc.keypressplus(67,43) ipc.display(" Button activated ",2) end I was assuming that keypressplus was equivalent to a "press and release" key action. In the mouse action that I trying to emulate with buttons, clicking the on-screen hotspot gives one response while clicking and holding gives a different response. Best regards
  8. Hi Pete, All of the mouse-controlled functions on a Reality XP GNS can be mapped to a combination of keystrokes so I have coded a simple Lua program to map these mouse actions to a set of rotary encoders and switches. All works great except for two functions which have time-dependent responses, ie press momentarily for one action or hold for 2 seconds for another. However, it appears that the response from my Lua file (I'm using ipc.keypressplus with 0 for press/release to detect the controller button) is always that of the held action. Is it possible for me to get the momentary action response? Also, can you explain the concept of "focus" in the context of ipc.keypressplus, is this relevant to my problem? Many thanks for any help. Best regards
  9. Hi Pete, Many thanks for your help last week with the POV switches, I can access them individually now without any problem. Following this, I am looking for a way to emulate a "Repeat" function for these POV buttons to be defined using a Lua file setup. I came across the following method in one of your previous posts while ipc.testbutton(joy, btn) ~= 0 do ipc.control(65674) ipc.sleep(50) -- 50 = 20 repeats per second. Adjust to taste! end but I don't think that the ipc.testbutton(joy, btn) function works with the POV switches? Can you suggest an alternative way? Best regards Seanmick.
  10. Hi Pete, Many thanks for that, I'll update and try it out later but I'm sure that it'll work fine. And once again, great software, great support. Best regards, Seanmick.
  11. Hi Pete, I have tried it with downup =1, 2 and 3 and I get the same effect. For the button push action I simply activate it to any one of the 8 possible positions and then release it. The displayed sequence always starts at button 32. By the way, when I assign the FSX pan/view function to the hat switch and monitor "events" in FSUIPC logging I get the control 66416 (with the angle parameter) repeated and then the -1 parameter as soon as the button is released. This is what I am trying to duplicate in the lua file for one mode so that I can then use the POV switches for other functions in the remaining modes. Many thanks again, Best regards, Seanmick.
  12. Hi Pete, Many thanks for the prompt reply and great support. I was operating on the basis that the POV was simply a set of 8 separate buttons designated 32-39. So I put some test lines in my lua file for all of the POV buttons as follows, for example, for button 39 function button_39 ( ) ipc.display("Button 39 ",2) ipc.sleep(2000) end event.button(joynum,39,0,"button_39") When I push any single button on the HAT switch, the response is that all of the functions associated with buttons 32-39 appear to be activated in sequence, displaying the numbers 32 to 39 on screen in sequence, with a 2 second delay. Is this to be expected? If so, is there a way in which I can distinguish which button has been pushed?
  13. Hi Pete, Perhaps you could point me in the correct direction with the following (possible very simple!) problem? I am writing a lua script file to set up a joystick which has a set of buttons and a POV switch. The joystick also has the ability to set three different modes thus increasing the effective number of switches. Accordingly, I use calling "event.button" type commands with associated functions enclosing relevant "if" conditions depending on the mode status to assign the distinct operation to each individual button. All works fine. My problem is that I am uncertain as to how the 8-position POV switches are handled. Under FSX control for panning they work fine and I have monitored the associated operation using FSUIPC logging. When I implement a similar control to duplicate this operation using a lua file with event.button/functions for buttons 32-39 it appears to cycle through all of the associated functions in sequence on activation of any of the POV switches. Is this normal and if so how is the activating POV button press uniquely determined? Many thanks for any help, Best regards, Seanmick.
  14. Hi Pete, Following on from your suggestion, I've now done the following to check out the event logging in more detail: 1) I set a button to trigger a flaps inc/dec event followed by the pitot switch in rapid succession ipc.control(65758) ipc.sleep(10) ipc.control(65759) ipc.sleep(10) ipc.control(65858) and then activated FSUIPC logging to Buttons/Keys and Events. 2) In the P47, does the following suggest that the pitot switch is triggered but not the flaps? By the way, I notice that there is a continuous stream of other data in this case. 183953 FS Control Sent: Ctrl=65758, Param=0 183969 FS Control Sent: Ctrl=65759, Param=0 184000 FS Control Sent: Ctrl=65858, Param=0 184000 *** EVENT: Cntrl= 65858 (0x00010142), Param= 0 (0x00000000) PITOT_HEAT_TOGGLE 3) In another aircraft, with the same code, it looks like all of the events are registered? Also, there is no continuous stream of events in this case. 358047 FS Control Sent: Ctrl=65758, Param=0 358047 *** EVENT: Cntrl= 65758 (0x000100de), Param= 0 (0x00000000) FLAPS_INCR 358078 FS Control Sent: Ctrl=65759, Param=0 358078 *** EVENT: Cntrl= 65759 (0x000100df), Param= 0 (0x00000000) FLAPS_DECR 358125 FS Control Sent: Ctrl=65858, Param=0 358125 *** EVENT: Cntrl= 65858 (0x00010142), Param= 0 (0x00000000) PITOT_HEAT_TOGGLE 361750 FS Control Sent: Ctrl=65752, Param=32767 Presumably the Lua code is not triggered in the case of the P47 because the FS control does not trigger the *** Event in this case? What happens in the process between the FS Control Sent action occurring and the event subsequently being triggered? Many thanks again for all your help, it's only a small issue but it's useful I guess as it helps the learning process! Regards and best wishes,
  15. Hi Pete, Many thanks for the prompt reply and your suggestions. I have checked the log file and the lua program installs ok. I have checked that the flaps also activate on the standard key presses but no on-screen Lua display results. However, as in your own testing possibly, I have tried the same code on a native FSX model and it works fine so it look like the issue is aircraft specific. I also tried an offset based event trap using 0x0BDC and that works fine as well in the FSX aircraft but not in the P47 that I am coding for. So, in all cases the FSUIPC log catches the activity as it's being implemented, it's just that the Lua function for the flaps is not being activated in the P47. It's strange that the other switches that I've tried (eg pitot) seem to work ok in the P47. Thanks again for the help, Best Regards.
  16. Hi Pete, Is there any reason why I would have difficulty trapping a flap inc/dec event using Lua controls and calling a simple Lua function to display the flap activation on the screen. I'm using event.control(65758,"flaps_inc") event.control(65759,"flaps_dec") below the function definition as, for example, function flaps_inc(controlnum,param) ipc.display("Flaps Increment",2) end This seems to work fine with other controls, pitot heat for example, event.control(65858,"pitot_on") and a similar display function. I have set up the flap control in FSUIPC using an axis to give the two commands for a fixed range of values ( inc or dec) and they work fine, the controls are shown as logged and they are activated but no on-screen Lua display. The standard FSX key presses are still defined. Is there some basic error here? Many thanks for any help, Regards
  17. Hi Pete, Firstly, I want to thank you for all your help, FSUIPC is a great piece of software but the support is even better! I started to read a bit more about LUA and so I used it to investigate my issue by trying to extract some data. I set up FSUIPC/LUA logging and when going through the positions with the mouse I discovered that the parameters for the relevant Lvar were in fact 0,1,2,3. I then wrote a short lua file for the button which I debugged by writing to the screen (a really useful tool!). Basically it's an if/then/else statement which is called on the button toggle, reads the state of the variable, increments by 1 and cycles 0-1-2-3. I haven't thoroughly tested it yet but so far it seems to work fine. I've done the same now for a set of radio switches, also seems to work fine. The loose end I guess is the meaning of the FSUIPC logged parameters, 0,5,6,7 ??? In any case, I'm very impressed with the FSUIIPC/Lua combination, it seems really powerful and I'm looking forward to exploring and learning more. Many thanks again for your help Regards and best wishes.
  18. Hi Pete, Many thanks for the very prompt reply and the excellent support. I have tried what you suggested, it all seems logical. In FSX/FSUIPC I set up the button to Offset Byte Inc, x66C0 with parameter 1/3 for the 4 way option, no event on release. I used FSUIPC logging to track the commands as I make them with the mouse...extract below... so it looks like C65962 is the command I need in all 4 cases and the 4 positions had parameters 0, 5,6 and 7. Is this correct? 69157 *** EVENT: Cntrl= 66508 (0x000103cc), Param= 99 (0x00000063) PANEL_ID_CLOSE 69157 *** EVENT: Cntrl= 66507 (0x000103cb), Param= 100 (0x00000064) PANEL_ID_OPEN 69157 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 0 (0x00000000) FUEL_SELECTOR_SET 69157 *** EVENT: Cntrl= 66488 (0x000103b8), Param= 1 (0x00000001) ANTI_ICE_SET_ENG1 69204 *** EVENT: Cntrl= 66508 (0x000103cc), Param= 99 (0x00000063) PANEL_ID_CLOSE 69204 *** EVENT: Cntrl= 66507 (0x000103cb), Param= 100 (0x00000064) PANEL_ID_OPEN 69204 *** EVENT: Cntrl= 65962 (0x000101aa), Param= 0 (0x00000000) FUEL_SELECTOR_SET 69204 *** EVENT: Cntrl= 66488 (0x000103b8), Param= 1 (0x00000001) ANTI_ICE_SET_ENG1 I edited FSUIPC.ini as below in the aircraft specific button section (also tried the general section) using the same button as I set up in FSUIPC/FSX originally 0=P2,1,Cx510066C0,x00030001 1=B66C0=0 P2,1,C65962,0 2=B66C0=1 P2,1,C65962,5 3=B66C0=2 P2,1,C65962,6 4=B66C0=3 P2,1,C65962,7 Unfortunately, nothing is activated on reloading but I notice that the button is now "grayed out" in FSUIPC. Really grateful for any help, Many thanks.
  19. Hi All, I am trying to set joystick buttons for the A2A P47 as per a number of very helpful contributions here and elsewhere. The simple on/off toggle switches operate fine when allocated to a button but I have difficulty setting, multi-position switches, for example, the fuel selector. Can I set this up so that it cycles through the limited options ( main, aux etc) on each button press? Many thanks for any help, Best Regards.
  20. Hi Pete, Many thanks for your prompt reply, I see the issue now. By the way, I have not used it to date but does FSUIPC return data on AI aircraft in CFS2? Regards, Mike
  21. Hi All, I would like to ask a question about moving carriers in FSX. Is it possible, for example using FSUIPC or otherwise, to dynamically extract the latitude and longitude of the moving carriers in FSX for programming use? On face value, it seems like it should be relatively simple but I can't seem to find any pointers as to how to do it. Maybe I'm just not looking in the right places. Also, and I appreciate that this is a tougher ask (!), is there any chance that it could be done for CFS2, again via FSUIPC perhaps? Many thanks for any help, this is a really useful forum. Regards.
×
×
  • 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.