Jump to content
The simFlight Network Forums

Approach Now error


Recommended Posts

just upgraded to 3.2 but was also getting this error in 3.1 every now and then. Not consistently - sometimes I would be able to use the Approach Now feature and after a while it would go bad. Sometimes I wouldn't have any trouble. Other times I could never get an aircraft to approach from the start. Here is the error that I get:

11/8/2012 10:31:06 AM.967

System.ArgumentException: An item with the same key has already been added.

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)

at Traffic_Board.TrafficBoard.ApproachNow(Object sender, EventArgs e) in C:\Users\Simon Jones\Documents\FS Projects\Traffic Board\STB V3.2 FSX\Client\Traffic Board\TrafficBoard.cs:line 11081

at System.Windows.Forms.MenuItem.OnClick(EventArgs e)

at System.Windows.Forms.MenuItem.MenuItemData.Execute()

at System.Windows.Forms.Command.Invoke()

at System.Windows.Forms.Command.DispatchID(Int32 id)

at System.Windows.Forms.Control.WmCommand(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.DataGridView.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Link to comment
Share on other sites

OK, not sure why this is happening yet, and unfortunately I've not found a way to reproduce it here. In fact the only way I can imagine it happening is if a thread dies (or crashes) without fully completing the routine that inserts entries into the collection. Did you see any other errors messages from STB during your sessions, in addition to the one described above?

Perhaps you could run a trace for me please? It's described in Appendix C of the user guide. When you have the trace file, if it is too big to upload here please email it to the address found in



Link to comment
Share on other sites

OK here is the trace:


Note that wasn't the name of the file specified in the manual, but it wiped with every program start so I figure that's the log file. Looks like one, anyway.

Better yet, I think this is replicable. If you have the latest DB release for UT2 (the winter/spring 2013 beta release) load up LFRD then set first the Summer season then the Day time. When you load up and enable UT2 transmission a Cessna 208B should be at the top of the Arrivals list. Calling that down produces the error, as well as any other plane afterwards. Simply disconnecting and reconnecting then choosing another plane works fine.

Who knows it may be the first Arrival aircraft in any listing. Certainly that's usually the one I pick to call down any random plane for a quick test

Link to comment
Share on other sites

OK, the trace shows some interesting things. Firstly the error is subtley different to the original report, so that may still be out there to be found. In the trace, I can see the approach now applied to a flight that departs and arrives at the same airport. This is challenging the formula used to calculate when the new flight created by approach now should arrived, which relies on the distance between the departure and arrival airports as a factor. Clearly here that distance is zero, so a failure occurs.

I'll work on a fix to this situation. In the mean time should you see another error which involves approach now for separate departure and arrival airports, I'd be very interested in seeing a trace for that also.


Link to comment
Share on other sites

Looks like we are stuck between a rock and a hard place here. When an aircraft is scheduled to leave from and arrive at the same airport, FSX thinks it has a zero nautical miles flight plan. Any attempt to create such an AI, as per Approach Now, results in the aircraft being created at a parking place rather than in the air. This seems to be one of the inbuilt rules in FSX that cannot be circumvented.

Best I can do is to display a nice message when Approach Now is attempted on such flights, and suggest you consider "Depart Now" as an alternative that effectively does the same thing as I described above.

All other flights, those leaving from and flying to separate airports, should continue to be business as usual.

Once I've gathered together all of the user experiences with 3.2, I'll created an update. As matters stand right now, this is the only one on the list.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


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