[PROGRAM] OpenYS - Open Source YSFlight Server!
- Flake
- VFA-49
- Posts: 4378
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 862 times
- Been thanked: 1281 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
- Neocon
- First Class Membership
- Posts: 3962
- Joined: Wed Oct 19, 2011 5:01 am
- Favorite Aircraft: Baron 58
- Location: Tennessee
- OS: Win 10
- Has thanked: 1775 times
- Been thanked: 1813 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
20161025(222813): dbd000 Joined the server.
20161025(222841): dbd000 Login Complete!
20161025(222937): dbd000 took off (MOA_A320NEO)
20161025(224144): dbd000 recursion depth > 20. For OYS safety, connection terminated!
20161025(224144): dbd000 recursion depth > 20. For OYS safety, connection terminated!
20161025(224144): dbd000 recursion depth > 20. For OYS safety, connection terminated!
20161025(224144): dbd000 left the server.
20161025(224144): dbd000 recursion depth > 20. For OYS safety, connection terminated!
- Flake
- VFA-49
- Posts: 4378
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 862 times
- Been thanked: 1281 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
What I'm going to do after exams is add some exception handling to the main interface and other locations to hopefully stop the program from crashing randomly
![Smile :)](./images/smilies/icon_e_smile.gif)
Then it's onto those AAA/SAM as promised.
![Cool 8-)](./images/smilies/icon_cool.gif)
- Nodoka Hanamura
- Veteran
- Posts: 948
- Joined: Thu Apr 07, 2011 8:01 pm
- Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
- OS: Windows 10 / Linux
- Has thanked: 539 times
- Been thanked: 277 times
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
Unless I'm misreading/misunderstanding.
- Flake
- VFA-49
- Posts: 4378
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 862 times
- Been thanked: 1281 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
![Smile :)](./images/smilies/icon_e_smile.gif)
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
Well I experienced it today during the event and so did dave, dan and a few others.
So it may be a open ys issues
![Image](https://i.imgur.com/XVxYbz4.png)
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- Flake
- VFA-49
- Posts: 4378
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 862 times
- Been thanked: 1281 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
- Barr
- Veteran
- Posts: 1012
- Joined: Wed Mar 28, 2012 8:49 pm
- Favorite Aircraft: The Boeing 757
- Location: Providence, Rhode Island
- OS: Windows 10/Gentoo
- Has thanked: 272 times
- Been thanked: 206 times
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
![Image](https://i.imgur.com/XVxYbz4.png)
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
- Neocon
- First Class Membership
- Posts: 3962
- Joined: Wed Oct 19, 2011 5:01 am
- Favorite Aircraft: Baron 58
- Location: Tennessee
- OS: Win 10
- Has thanked: 1775 times
- Been thanked: 1813 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
20161029(135048): MESSAGE: Object reference not set to an instance of an object.
20161029(135048): START TRACE:
20161029(135048): METHOD: Void Run(System.String[])
20161029(135048): LINENUMBER: 231
20161029(135048): COLUMNNUMBER: 25
20161029(135048): END TRACE.
20161029(135048):
20161029(135048): Also, OYS crashed while running, with two people online. No error report. Application: OpenYS-ServerMode.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException
Stack:
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Delegate.DynamicInvokeImpl(System.Object[])
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.RichTextBox.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
at OpenYS.OpenYS_Server+Program+<>c__DisplayClass9_0.<Run>b__0()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
- Flake
- VFA-49
- Posts: 4378
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 862 times
- Been thanked: 1281 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
I know how to write code, I don't know how to program.
Wait, what?
This video will explain.
https://www.youtube.com/watch?v=tDh1KIh7w-I
My code, is frankly, disgustingly hard to manage for what it is.
I need to build a better system.
I could code up the SAM/AAA but truth be told that would probably be broken too like half the program, I just keep putting bandaids on.
I'll be learning how to code cleanly over the exam period for gits and shiggles. Then I'll come back to the program. Sorry! This is one of those "better in the long run" ideas.
- Neocon
- First Class Membership
- Posts: 3962
- Joined: Wed Oct 19, 2011 5:01 am
- Favorite Aircraft: Baron 58
- Location: Tennessee
- OS: Win 10
- Has thanked: 1775 times
- Been thanked: 1813 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
- Flake
- VFA-49
- Posts: 4378
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 862 times
- Been thanked: 1281 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
Most of the program is salvagable, though it will take some refactoring*. During the refactoring* I'll aim to reduce Class Coupling* where high complexity is closely related to crashes. (*New words in my terminology! I must have learned something.)
I'll also make the program more beautiful code wise, and make it more compatible as an API for TCP/IP sockets, YS netcode, and other like stuff.
It's pretty much the same approach I've always had except much cleaner. I've learned to not judge the quality of a code project by the number of lines, that's like measuring aircraft construction progress by measuring weight of raw materials.
Time to get to work.
- Dragon_Mech
- Veteran
- Posts: 571
- Joined: Wed Jul 15, 2015 12:18 pm
- Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
- Location: Mansfield, Mo. USA
- OS: Windows 7 Ultimate
- Has thanked: 94 times
- Been thanked: 127 times
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
![Image](https://i.imgur.com/P8VhbYL.jpg)
- WARDC_sOnar
- Newbie
- Posts: 7
- Joined: Sun Jul 17, 2016 11:04 am
- Favorite Aircraft: PZL P11-C
- OS: Windows 7, Linux
- Has thanked: 1 time
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
![Laughing :lol:](./images/smilies/icon_lol.gif)
I wish you Flake creative inspiration and enthusiasm for work. fingers crossed for your success.
Regards!
- Flake
- VFA-49
- Posts: 4378
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 862 times
- Been thanked: 1281 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
What's next? Library implementations of file IO, very low level stuff.
So why the basic stuff first? Because I can build on top of that through repeated inheritance - the DAT file reader will be it's own class as well, which will inherit from the file IO class I will write, see? Thanks to my segmentation and encapsulation, debugging will be more meaningful: "OpenYS.Core" as a method name is useless. "OpenYS.Client.PacketHandler.FromClient.FlightData.SendToAllClients()" is a mouthful, yes, but debugging wise it's so easy for me to see what is wrong.
I'm re-writing code in the following ways:
First, I'm re-classifying classes into seperate namespaces. I'm going to reference areas as I need them using clauses such as "using static Com.OfficerFlake.Libraries.IO.Files;". By packing things into namespaces, code get's much easier to manage as I can use the same name multiple times in the program, much easier to read code. No more silly underscores everywhere.
Second, I'm using the 3 (4) pillars of object oriented coding on my classes: Encapsulation, Inheritance, Abstraction/Polymorphism. If you are a novice coder, who knows the language but needs to jump the gap to making GOOD programs, learn this. My classes are being seperated and common elements identified -> inherited. reduces code-reuce dramaticly, makes the classes much easier to read.
Third, the variables in my classes are being hidden. I am now using properties to control access to variables and how they are accessed. This increases coding safety by making it clear, intrinsicly, how classes and their methods/variables should be used. It also stops you from using them unsafely, which is always a big plus for compatibility, readability and maintainability.
Fourth, the methods in my program are being heavily refactored - I used to follow the old 1999 coding techniques of saving program space by cramming as much calculations onto a line of code as possible (for computing efficiency). yeah that's just not efficient, not easy to read, and just plain wrong. I'm seperating these methods into multiple layers of methods that all work together. Instead of a method that: checks if a file exists, reads from that file, prepares the data as an array; then draws the array to the screen... I instead have methods that: GetAStringArrayFromFile(...); DrawStringToScreen(...) for example. Easy to read from a developer point of view. Oh and I've fixed my variable use convention with the help of ReSharper.
I'll finish today with a quote: "Programming is the art of writing code for humans to understand." Notice that says humans, not machines.
- Nodoka Hanamura
- Veteran
- Posts: 948
- Joined: Thu Apr 07, 2011 8:01 pm
- Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
- OS: Windows 10 / Linux
- Has thanked: 539 times
- Been thanked: 277 times
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
I haven't read a line of OYS, but already I know I can't read it.xX_SuperSic58_Xx wrote:I'll finish today with a quote: "Programming is the art of writing code for humans to understand." Notice that says humans, not machines.
Beep beep boop.
- Neocon
- First Class Membership
- Posts: 3962
- Joined: Wed Oct 19, 2011 5:01 am
- Favorite Aircraft: Baron 58
- Location: Tennessee
- OS: Win 10
- Has thanked: 1775 times
- Been thanked: 1813 times
- Contact:
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
This all happened using the 20160302(1613) version, so newer versions may not have this affect.
-
- Senior Veteran
- Posts: 1851
- Joined: Tue Feb 07, 2012 10:00 am
- Favorite Aircraft: .
- OS: windoze 10 64-bit
- Has thanked: 617 times
- Been thanked: 619 times
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
Hi, that must be me. This has been happening ever since OYS-IRC support was implemented, and I have managed to crash many people's YS from sending my healthy dose of non-UTF-8 emoticons. Maybe Flake can implement some kind of blocking for non supported characters? ¯\_(ツ)_/¯Patrick31337 wrote:First, somebody I will not name here sent an emoticon from Discord and it kicked everybody off of the server.
- Nodoka Hanamura
- Veteran
- Posts: 948
- Joined: Thu Apr 07, 2011 8:01 pm
- Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
- OS: Windows 10 / Linux
- Has thanked: 539 times
- Been thanked: 277 times
Re: [PROGRAM] OpenYS - Open Source YSFlight Server!
It's entirely possible to have a class under chat handling dedicated to filtering out other encodings.NightRaven wrote:Hi, that must be me. This has been happening ever since OYS-IRC support was implemented, and I have managed to crash many people's YS from sending my healthy dose of non-UTF-8 emoticons. Maybe Flake can implement some kind of blocking for non supported characters? ¯\_(ツ)_/¯Patrick31337 wrote:First, somebody I will not name here sent an emoticon from Discord and it kicked everybody off of the server.
Wouldn't take too many lines of code if done right.
Who is online
Users browsing this forum: No registered users and 1 guest