Jump to content
The simFlight Network Forums

andydeforest

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Southern California

andydeforest's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi John, Yes, mouse look is what I was referring to. I tested FSUICPC6 in P3Dv4 and could not reproduce the behavior, so it must be something with v5. Thanks for the tip! Andrew
  2. Hello, I have successfully installed FSUIPC6 into P5D, and all my axes are working as they did in P3Dv4. One thing that is bothering me, though, is I can't get the middle mouse view panning to work like it with previous iterations. It's much more sluggish, the vertical mouse controls are inverted (moving the mouse up pans the view down and vice versa), and I have to move the mouse back to the center of the screen to stop panning in whatever direction I was going. I have Advanced Mouse Controls disabled, and when I disable the middle mouse view panning in FSUIPC, the middle mouse does not respond to anything, so I'm assuming there are no conflicting inputs. Is this this expected behavior in FSUIPC6? Andrew
  3. Hi Paul, Thanks for all the help. I completely removed the previously-opened FSUIPCConnection from the other form and it seems to have solved the issue, so it looks like there was some overlap between the two connections causing issues. Thanks again, Andrew
  4. Paul, Thanks for the insight, that's exactly what's happening. I'm going to completely rework the logic tonight and see if that fixes anything before I bother you with my code. In the mean time, what is the proper way to check and make sure FSUIPC (and FSX/P3D) is still running each time updateInfoTimerTick() fires? I'm trying to make my program robust enough so that if FSX/P3D crashed, I can pause the app and reconnect once the simulator is repoened.
  5. I've found that 20 minutes isn't entirely accurate. Last night, I was trying to reproduce the error and my app ran fine for an hour before finally crashing. Today it took 10 minutes. So it's kind of all over the place. Anyway, here is the info you requested Paul: {FSUIPC.StatsProcess} BytesRead: 8.0 bytesRead: 8.0 bytesWritten: 0.0 BytesWritten: 0.0 fsuipcMemoryFileSizeBytes: 40.0 FsuipcMemoryFileSizeBytes: 40.0 groupsProcessed: {string[1]} GroupsProcessed: {string[1]} GroupsProcessedString: "~SystemOffsets~" OffsetsCount: 2.0 offsetsCount: 2.0 offsetsReadCount: 2.0 OffsetsReadCount: 2.0 OffsetsWriteCount: 0.0 offsetsWriteCount: 0.0 TimeForIPC: 22.0012 timeForIPC: 22.0012 TimeForProcessCall: 22.0012 timeForProcessCall: 22.0012
  6. Hi Paul, Here's the stack trace: System.AccessViolationException was unhandled HResult=-2147467261 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=mscorlib StackTrace: at System.Runtime.InteropServices.Marshal.CopyToNative(Object source, Int32 startIndex, IntPtr destination, Int32 length) at System.Runtime.InteropServices.Marshal.Copy(Int32[] source, Int32 startIndex, IntPtr destination, Int32 length) at FSUIPC.FSUIPCConnection.Process(Byte ClassInstance, IEnumerable`1 GroupNames) in C:\Dev\FsuipcClient\fsuipcClient\fsuipcClient\fsuipcConnection.cs:line 777 at FSUIPC.FSUIPCConnection.Process(Byte ClassInstance, String GroupName) in C:\Dev\FsuipcClient\fsuipcClient\fsuipcClient\fsuipcConnection.cs:line 597 at FSUIPC.FSUIPCConnection.Process() in C:\Dev\FsuipcClient\fsuipcClient\fsuipcClient\fsuipcConnection.cs:line 558 at IntelliCARS.FlightForm.updateInfoTimerTick(Object sender, EventArgs e) in e:\DropBox\c#\IntelliCARS\IntelliCARS\FlightForm.cs:line 174 at System.Windows.Forms.Timer.OnTick(EventArgs e) at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.RunDialog(Form form) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at System.Windows.Forms.Form.ShowDialog() at IntelliCARS.IntelliCARS.flyFlightButton_Click(Object sender, EventArgs e) in e:\DropBox\c#\IntelliCARS\IntelliCARS\AcarsForm.cs:line 182 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.RunDialog(Form form) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at System.Windows.Forms.Form.ShowDialog() at IntelliCARS.LoginForm.loginButton_Click(Object sender, EventArgs e) in e:\DropBox\c#\IntelliCARS\IntelliCARS\LoginForm.cs:line 45 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at IntelliCARS.Program.Main() in e:\DropBox\c#\IntelliCARS\IntelliCARS\Program.cs:line 16 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:
  7. Hi Paul, Thanks for the prompt reply. I'm using 2.4.0.0 of the DLL. I tried it with the 3.0 RC1 and had the same issue. The offsets are declared like this: public partial class FlightForm : Form { private Offset<int> ias = new Offset<int>(0x02BC); private Offset<int> tas = new Offset<int>(0x02B8); private Offset<int> gs = new Offset<int>(0x02B4); public FlightForm(User u, Flight f) { InitializeComponent(); // other program logic } private void updateInfoTimerTick(object sender, EventArgs e) { try { FSUIPCConnection.Process(); // GS: Ground Speed, as 65536*metres/sec double groundspeed = this.metersSecToKnots((double)gs.Value / 65536); } catch(FSUIPCException ex) { if(ex.FSUIPCErrorCode == FSUIPCError.FSUIPC_ERR_SENDMSG) { FSUIPCConnection.Close(); } } } catch(Exception) { } } I omitted most of the program logic for clarity. I just wanted to give you an idea of how I do things. Offsets are defined as class variables, then I access them in the updateInfoTimerTick() method after calling FSUIPCConnection.Process().
  8. I checked the app's logs, and I'm getting this every 2 minutes: [12:24 PM]: FSUIPC Error #9: FSUIPC_ERR_NOTOPEN. The connection to FSUIPC is not open. [12:26 PM]: FSUIPC Error #9: FSUIPC_ERR_NOTOPEN. The connection to FSUIPC is not open. [12:28 PM]: FSUIPC Error #9: FSUIPC_ERR_NOTOPEN. The connection to FSUIPC is not open.
  9. Hello, My program usually runs fine for about 20 minutes, then crashes from a System.AccessViolationException. I tried rebuilding the program with x86 architecture targeted as was suggested on Stack Overflow, but the problem still persists. Here are the relevant parts of the code: private bool fsuipc_state = true; private Timer updateInfoTimer; public FlightForm(User u, Flight f) { InitializeComponent(); try { FSUIPCConnection.Open(); this.fsuipc_state = true; } catch(FSUIPCException e) { if(e.FSUIPCErrorCode == FSUIPCError.FSUIPC_ERR_SENDMSG) { this.log("Error connecting to FSUIPC"); this.fsuipc_state = false; } } this.showFsuipcState(); // This timer updates form info with FSUIPC data this.updateInfoTimer = new Timer(); this.updateInfoTimer.Tick += new EventHandler(this.updateInfoTimerTick); this.updateInfoTimer.Interval = 1000; this.updateInfoTimer.Start() } private void updateInfoTimerTick(object sender, EventArgs e) { try { FSUIPCConnection.Process(); // This is where the AccessViolationException occurs if(!this.fsuipc_state) { this.log("Reconnected to FSUIPC"); } this.fsuipc_state = true; this.showFsuipcState(); // Various FSUIPC offsets processed here } catch(FSUIPCException ex) { if(ex.FSUIPCErrorCode == FSUIPCError.FSUIPC_ERR_SENDMSG) { this.log("Connection to FSUIPC lost"); this.fsuipc_state = false; this.showFsuipcState(); } } catch(Exception) { // catch-all } } The updateInfoTimerTick fires every 1 second and updates my UI with FSUIPC offsets. Everything runs smoothly until the Exception. Regards, Andrew
×
×
  • 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.