Unhandled Exception Caught

Are you having problems with using or developing a plugin? Let me know here.
Post Reply
LincsVRS
Posts: 10
Joined: Wed Jan 01, 2014 11:33 pm

Unhandled Exception Caught

Post by LincsVRS » Thu Jan 02, 2014 12:24 am

Having a little trouble with my new setup, I think the problem is within the plugin and the database file I am running.

Setup:

I have checked and I am running the latest versions of VRS and the plugin.

The Receiver is actually PlanePlotter configured as per: http://www.nicstorey.co.uk/planeplotter/VRS Outputting TCP/IP data on port: 30003

PlanePlotter is being fed by a TV dongle and has been up and running over 6 months so appears to be fine.

The basestation database I am using comes from this website as it seems to be the most up to date for the UK/Military and made for PlanePlotter specificly http://chrisglobe.co.uk/planeplotter-ai ... ation-sqb/ direct link to download: http://chrisglobe.co.uk/wp-content/uplo ... 131012.zip

When it comes to understanding the databases please treat me like an idiot but I am guessing there is an issue the plugin has with this database? Any help appreciated.

The error comes up as:

---------------------------
Unhandled Exception Caught
---------------------------
An unhandled exception was caught: Specified cast is not valid.
Full message:System.InvalidCastException: Specified cast is not valid.
at VirtualRadar.Database.Sql.GetDateTime(IDataReader reader, Int32 ordinal)
at VirtualRadar.Database.BaseStation.AircraftTable.DecodeFullAircraft(IDataReader reader, Int32& ordinal)
at VirtualRadar.Database.BaseStation.AircraftTable.GetByIcao(IDbConnection connection, IDbTransaction transaction, TextWriter log, String icao)
at VirtualRadar.Database.BaseStation.Database.GetAircraftByCode(String icao24)
at VirtualRadar.Library.BaseStation.BaseStationAircraftList.LoadAircraftDetails(DatabaseLookup databaseLookup, BaseStationAircraft baseStationAircraft)
at VirtualRadar.Library.BaseStation.BaseStationAircraftList.LoadAircraftDetails(DatabaseLookup databaseLookup)
at VirtualRadar.Interface.BackgroundThreadQueue`1.BackgroundThreadMethod()

---------------------------
OK
---------------------------

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Unhandled Exception Caught

Post by agw » Thu Jan 02, 2014 12:43 am

LincsVRS wrote:An unhandled exception was caught: Specified cast is not valid.
Full message:System.InvalidCastException: Specified cast is not valid.
at VirtualRadar.Database.Sql.GetDateTime(IDataReader reader, Int32 ordinal)
Unfortunately SQLite gives you something like three different ways of storing dates. VRS assumes that the dates are stored using the same format that BaseStation uses - from the look of the exception that database might be using one of the other formats.

I'm about to go to bed and I'm working tomorrow, but tomorrow evening I'll download the database from that link and take a look at it.

LincsVRS
Posts: 10
Joined: Wed Jan 01, 2014 11:33 pm

Re: Unhandled Exception Caught

Post by LincsVRS » Thu Jan 02, 2014 12:46 am

Thanks for the prompt reply, didn't expect too much at this time of night so thank you. It would be much appreciated and hopefully it will be something simple like that then perhaps a quick alteration of date formats might solve it.

Much appreciated
LincsVRS

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Unhandled Exception Caught

Post by agw » Fri Jan 03, 2014 1:40 am

I've downloaded the file that you linked to but I can't unzip it, the file is corrupt. I've tried both the direct link and downloading it from the web page. There are a bunch of comments on the page from others having the same problem - someone suggests using 7-zip but I'd sooner feed my arm into a wood chipper than install that :)

If you could upload the SQB you've got to a file sharing site like DropBox, SkyDrive, Google Drive etc. and send me a link to the file then I'll download it and take a look. My guess is that he was FTPing the file to the web server and he uploaded it as a text file, which would have caused the corruption of the ZIP (and the SQB). But I might be wrong.

LincsVRS
Posts: 10
Joined: Wed Jan 01, 2014 11:33 pm

Re: Unhandled Exception Caught

Post by LincsVRS » Fri Jan 03, 2014 8:52 pm

Yep, I will get that sorted for you. Thanks for helping me. It works fine with PlanePlotter or should a say as far as I can tell it works fine, as I don't know a corruption would manifest other than being totally unserviceable.

LincsVRS
Posts: 10
Joined: Wed Jan 01, 2014 11:33 pm

Re: Unhandled Exception Caught

Post by LincsVRS » Fri Jan 03, 2014 11:28 pm

Hi agw,

Thanks for all your help. After consideration to my question in the other section on the forum I have decided to abandon the project for now. I was working on it to provide secondary radar within a browser for aircraft arriving and departing RAF Waddington & using the LARS service in addition to the service offered by the twitter stream @EGXWinfo (https://twitter.com/EGXWinfo). If in the future VRS looks like a solution I will work from this point again.

Unfortunately I have several hurdles to overcome on several ideas I want to get up and running. I also want to automate as much of the processes as possible to free up my time to add more features. I am already giving people access to PlanePlotter logs and as much as possible covering RAF Waddington as best as possible myself so I can tweet heads up and movements to people in the area who don't have access to the type of equipment/expertise we do. I'm going to try and focus on solving some of the other problems as VRS does not look like the solution any more.

I really appreciate you trying to solve the problem for me, its certainly something I could not solve myself and it sounded like we may have been able to solve the database problem with a little time. However I thought it only fair and right to bring a halt to things now before you put any more time into it.

Cheers again
LincsVRS

Nic
Posts: 10
Joined: Sat Mar 03, 2012 10:47 am

Re: Unhandled Exception Caught

Post by Nic » Mon Jan 13, 2014 12:53 pm

Hi aqw, lincsVRS


ChrisG's Sbq wont work with VRS as it only contains one table 'Aircraft'. so not in the default Basestation format.

It can be made to work with VRS (I have just done this to make sure).
Download ChrisG's Basestation.sqb and place it somewhere safe.
Then in VRS DatabaseWriterPlugin create a new blank database.
Then with Charlies update script http://www.g4est.me.uk/PPmain.html you can import all of Chris's data in to your blank database which will then work with VRS.

Hope this Helps.

Regards
Nic

LincsVRS
Posts: 10
Joined: Wed Jan 01, 2014 11:33 pm

Re: Unhandled Exception Caught

Post by LincsVRS » Mon Jan 13, 2014 9:25 pm

Thank you for taking the time to have a look at it Nick. Its difficult to know what is the best data source when your not into databases much yourself.

Post Reply