[PROGRAM] OpenYS - Open Source YSFlight Server!

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

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

Post by Flake »

I probably don't have the full picture of this. I'll look at that in the coming months.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

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

Post by Neocon »

I'm not getting any error logs at all, but this happened last night: 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
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

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-)
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Nodoka Hanamura
Veteran
Veteran
Posts: 947
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: 276 times

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

Post by Nodoka Hanamura »

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.
█████████████████████████████████████████████████████████████████████
Member of YSCE Development Committee - I don't code, I compile.
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

No you are right, and I haven't forgotten. My exams end 14th November. :)
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Barr
Veteran
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!

Post by Barr »

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
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

Still not sure why that's happening. I'll have to investigate...
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Barr
Veteran
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!

Post by Barr »

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: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

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

Post by Neocon »

Another crash on startup. 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. 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
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

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.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

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

Post by Neocon »

If it makes you feel any better, the 20160302(1613) version is very stable.
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

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.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
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: 94 times
Been thanked: 127 times

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

Post by Dragon_Mech »

god speed dear Flake!
Owner, Dragonic Machine Industries
Image
User avatar
WARDC_sOnar
Newbie
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!

Post by WARDC_sOnar »

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
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

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.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Nodoka Hanamura
Veteran
Veteran
Posts: 947
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: 276 times

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

Post by Nodoka Hanamura »

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.
█████████████████████████████████████████████████████████████████████
Member of YSCE Development Committee - I don't code, I compile.
User avatar
C P
Contributor
Contributor
Posts: 102
Joined: Fri May 24, 2013 12:17 pm
Favorite Aircraft: F-18E SuperHornet
Location: Syracuse, NY
OS: WIN10 8CORE/4GHZ/16G
Has thanked: 22 times
Been thanked: 25 times
Contact:

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

Post by C P »

Dragon_Mech wrote:god speed dear Flake!
User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

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

Post by Neocon »

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

Post by NightRaven »

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: 947
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: 276 times

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

Post by Nodoka Hanamura »

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.
█████████████████████████████████████████████████████████████████████
Member of YSCE Development Committee - I don't code, I compile.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests