[PROGRAM] OpenYS - Open Source YSFlight Server!

Note that alterations to the YSFlight .EXE is forbidden
User avatar
Flake
Core Staff
Core Staff
Posts: 4271
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 816 times
Been thanked: 1162 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Tue Oct 25, 2016 10:42 am

I probably don't have the full picture of this. I'll look at that in the coming months.

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3760
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1544 times
Been thanked: 1663 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Thu Oct 27, 2016 12:09 am

I'm not getting any error logs at all, but this happened last night:
SpoilerShow
20161025(222813): dbd000 Logging in... xxx.xx.xxx.xx
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!

User avatar
Flake
Core Staff
Core Staff
Posts: 4271
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 816 times
Been thanked: 1162 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Oct 27, 2016 9:50 pm

Actually that's quite interesting. I never considered what changing to Async would do for recursion depth tests.

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 :)

Then it's onto those AAA/SAM as promised. 8-)

User avatar
Nodoka Hanamura
Veteran
Veteran
Posts: 923
Joined: Thu Apr 07, 2011 8:01 pm
Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
Has thanked: 513 times
Been thanked: 266 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Nodoka Hanamura » Fri Oct 28, 2016 7:30 am

That would be soon, IIRC - you said you'd be free in November back when you said you wanted to go for a flight with me one time in the mchat.

Unless I'm misreading/misunderstanding.
█████████████████████████████████████████████████████████████████████
Image

User avatar
Flake
Core Staff
Core Staff
Posts: 4271
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 816 times
Been thanked: 1162 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Oct 28, 2016 10:08 am

No you are right, and I haven't forgotten. My exams end 14th November. :)

User avatar
Barr
Veteran
Veteran
Posts: 1006
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: 201 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Barr » Sat Oct 29, 2016 9:09 pm

Hey remember that problem I had a few months ago where some user planes would not "update" and just fly nonstop, planes would just drop out of the sky and disappear even though the user would report that he's still flying or planes not spawning at all.

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

User avatar
Flake
Core Staff
Core Staff
Posts: 4271
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 816 times
Been thanked: 1162 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sat Oct 29, 2016 9:22 pm

Still not sure why that's happening. I'll have to investigate...

User avatar
Barr
Veteran
Veteran
Posts: 1006
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: 201 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Barr » Sat Oct 29, 2016 10:05 pm

Do you need any sort of logs?
Image
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.

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3760
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1544 times
Been thanked: 1663 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Sun Oct 30, 2016 12:24 am

Another crash on startup.
SpoilerShow
20161029(135048): --- Log Created ---
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.
SpoilerShow
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()

User avatar
Flake
Core Staff
Core Staff
Posts: 4271
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 816 times
Been thanked: 1162 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Nov 03, 2016 10:15 am

I'm gunna be honest folks.

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.

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3760
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1544 times
Been thanked: 1663 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Thu Nov 03, 2016 1:11 pm

If it makes you feel any better, the 20160302(1613) version is very stable.

User avatar
Flake
Core Staff
Core Staff
Posts: 4271
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 816 times
Been thanked: 1162 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Nov 04, 2016 6:24 am

Okay I'm up to speed again.

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.

User avatar
Dragon_Mech
Veteran
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: 93 times
Been thanked: 127 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon_Mech » Fri Nov 04, 2016 7:39 am

god speed dear Flake!
Owner, Dragonic Machine Industries
Image

User avatar
WARDC_sOnar
Newbie
Newbie
Posts: 6
Joined: Sun Jul 17, 2016 11:04 am
Favorite Aircraft: PZL P11-C
OS: Windows 7, Linux

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by WARDC_sOnar » Fri Nov 04, 2016 8:55 am

its sound like hyper-speed Dragon_Mech :lol:

I wish you Flake creative inspiration and enthusiasm for work. fingers crossed for your success.

Regards!
(sorry for my english)

User avatar
Flake
Core Staff
Core Staff
Posts: 4271
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 816 times
Been thanked: 1162 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Tue Nov 15, 2016 11:57 am

So I've started in building a heavily extensible library for my projects. Makes sense to not continuously re-invent the wheel... But that does mean I have to do it one more time. First step was units of measurement, so far I've got length, mass, volume and temperature conversions, I'll add the rest tomorrow. What the new encapsulation allows me to do is things like 1.Meters() + 5.Kilometers(); or 10.Kilometers().ToMiles(); What's important is I can't do much else that doesn't make sense. Example, I can't do 5.Kilograms() * 7.Kilometers() - the two unit types are different!

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.

User avatar
Nodoka Hanamura
Veteran
Veteran
Posts: 923
Joined: Thu Apr 07, 2011 8:01 pm
Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
Has thanked: 513 times
Been thanked: 266 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Nodoka Hanamura » Tue Nov 15, 2016 12:11 pm

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.
I haven't read a line of OYS, but already I know I can't read it.

Beep beep boop.
█████████████████████████████████████████████████████████████████████
Image

User avatar
C P
Contributor
Contributor
Posts: 100
Joined: Fri May 24, 2013 12:17 pm
Favorite Aircraft: F-18E SuperHornet
Location: Syracuse, NY
OS: WIN10 8CORE/4GHZ/16G
Has thanked: 18 times
Been thanked: 18 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by C P » Tue Nov 15, 2016 10:10 pm

Dragon_Mech wrote:god speed dear Flake!

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3760
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1544 times
Been thanked: 1663 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Wed Nov 23, 2016 12:26 am

Something interesting happened over the weekend. Two things, in fact. First, somebody I will not name here sent an emoticon from Discord and it kicked everybody off of the server. Second, strange things happen when the scheduler resets ground objects. Once it kicked me out of the server. Sunday night it teleported me to an open field.

This all happened using the 20160302(1613) version, so newer versions may not have this affect.

NightRaven
Senior Veteran
Senior Veteran
Posts: 1843
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: .
OS: windoze 10 64-bit
Has thanked: 530 times
Been thanked: 606 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by NightRaven » Wed Nov 23, 2016 4:02 am

Patrick31337 wrote:First, somebody I will not name here sent an emoticon from Discord and it kicked everybody off of the 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? ¯\_(ツ)_/¯

User avatar
Nodoka Hanamura
Veteran
Veteran
Posts: 923
Joined: Thu Apr 07, 2011 8:01 pm
Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
Has thanked: 513 times
Been thanked: 266 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Nodoka Hanamura » Wed Nov 23, 2016 7:22 am

NightRaven wrote:
Patrick31337 wrote:First, somebody I will not name here sent an emoticon from Discord and it kicked everybody off of the 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? ¯\_(ツ)_/¯
It's entirely possible to have a class under chat handling dedicated to filtering out other encodings.
Wouldn't take too many lines of code if done right.
█████████████████████████████████████████████████████████████████████
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest