YSFLIGHT crashes when loading my addon

YSFlight addon development, questions, tutorials, & more!
Post Reply
User avatar
-DELTA-Maciej
Newbie
Newbie
Posts: 7
Joined: Tue Apr 02, 2019 6:16 pm
Favorite Aircraft: MiG-29
OS: Ubuntu / Windows 7
Has thanked: 2 times
Been thanked: 1 time
Contact:

YSFLIGHT crashes when loading my addon

Post by -DELTA-Maciej » Tue Apr 02, 2019 6:24 pm

So I recently decided to enter a STEM competition. Since I've been playing ysflight for some time now, I decided to make an addon of our project for testing (small, 5m wingspan UAV). i created the model, rigged it, animated, made all the srf and dat files- but when it came to booting it up, as soon as I select it the game crashes.

This is not due to the size of the model; I copied the B-2 dnm, scaled it down and used it and it still crashes. Any ideas?

Thanks in advance :D :D

here is the packaged addon. All done, just drag and drop into the main folder.
user.rar
(2 MiB) Downloaded 18 times
Paste this into your aircraft.lst: user/delta/x1/x1.dat user/delta/x1/x1.dnm user/delta/x1/x1col.srf user/delta/x1/x1cockpit.srf user/delta/x1/x1coarse.srf

User avatar
decaff_42
Staff
Staff
Posts: 3563
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 627 times
Been thanked: 1364 times
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by decaff_42 » Tue Apr 02, 2019 9:59 pm

(1) What operating system?
(2) What version of YSFlight?
(3) What errors if any do you receive?


Also what are you using to build your DNM? I'm seeing a weird path for the SRFs in the .dnm file.

Code: Select all

SRF "e:\Work\DELTAXYS\aill"
FIL Mesh.008
CLA 0
NST 2
STA -0.0000 0.0000 0.0000 0 0 0 0
STA -0.0000 0.0000 0.0000 0 0 0 0
POS -4.4587 0.8048 11.9849 0 0 0 1
CNT 0.00 0.00 0.00
REL DEP
NCH 0
END
END
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
waspe414
Staff
Staff
Posts: 1262
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa, Yak-130 Mitten
Location: Canada
Has thanked: 118 times
Been thanked: 230 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 » Tue Apr 02, 2019 10:37 pm

The filepath is just in the name field, so it isn't causing problems. The crashes look to me like the line count specified for one of the SRFs within the DNM is wrong:

PCK Mesh.036 170646
SURF

They look about a factor or two of ten too high on cursory inspection, compared to other .dnms.

Also you mispelled cockpit in the cockpit filename.

I popped the model into Blender, and a) it's 200,000-odd faces, which is way excessive, b) engine innards and aileron models are floating around at like five times the drone scale (the engines accounting for a good 50k faces each). It looks like you copied the wing geometry twice, because there are two wings, one above the other, and they both have waaaay more faces than they need for YS. The landing gear springs also have way too many faces, and you could get rid of them entirely.

Probably your best bet would be to rebuild a low-poly model from scratch, because that will be faster than trying to break down the existing model. I don't know specifically what is causing YS to crash, but it could well be the massive face count.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green

User avatar
decaff_42
Staff
Staff
Posts: 3563
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 627 times
Been thanked: 1364 times
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by decaff_42 » Tue Apr 02, 2019 10:56 pm

200k faces is excessive in the extreme. I think Flasheart's Concorde topped out at like 110k vertices
Normal models range from 2k to 20k with more detailed models getting up to 40-50k vertices
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
-DELTA-Maciej
Newbie
Newbie
Posts: 7
Joined: Tue Apr 02, 2019 6:16 pm
Favorite Aircraft: MiG-29
OS: Ubuntu / Windows 7
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by -DELTA-Maciej » Wed Apr 03, 2019 5:24 am

I'm going to remake the model from scratch, this was a temporary model taken from our renders. I just wanted to know why exactly is it crashing; like i said, even the B2 model crashed.

Also, does ysflight handle small values well? The model has a wingspan of around 5 meters

Thanks for the replies :D

EDIT:
Forgot to add; running windows 7 with the latest version of YS. Also tested on 2012 release, still crashes, same error code (after a quick google search, "occurs when a process (application, driver, etc.) tries to execute a processor command that references memory outside the space allocated to that process by the Operating System."
This doesnt quite fit; the B2 model crashes as well. Im very confused.

Edit #2: I'm using blender 2.49. These massive ailerons and engines should be gone, I deleted them because animating them was utter hell. Blender shouldn't be importing them, no clue why this is happening.

User avatar
waspe414
Staff
Staff
Posts: 1262
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa, Yak-130 Mitten
Location: Canada
Has thanked: 118 times
Been thanked: 230 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 » Wed Apr 03, 2019 2:35 pm

I replaced a stock aircraft with the X1 .dat file and it crashes YS. I've never experienced this before, but something in the .dat is the problem.

EDIT:
Aha! It's the WEAPONCH line that doesn't have a value after it, so it's reading it as a null (because the next value is RADARCRS which is a variable). You can delete it and it works fine.

It also has a negative CL slope error (negative coefficient of lift) and a negative CD constant (coefficient drag) error. You can fix these by setting REFTCRUS to more than REFTHRLD (I suggest 0.7 or 0.8 for cruise and 0.2 or 0.3 for landing), and decreasing landing speed to 62kt or less (or increasing cruise speed to 0.4).
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green

User avatar
-DELTA-Maciej
Newbie
Newbie
Posts: 7
Joined: Tue Apr 02, 2019 6:16 pm
Favorite Aircraft: MiG-29
OS: Ubuntu / Windows 7
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by -DELTA-Maciej » Wed Apr 03, 2019 3:11 pm

Holy jesus, thank you so much!!! :D :D Was thinking all day what was wrong, I tried checking if my files force ysflight to use memory it doesnt like. Again, thank you!
Also, for getting gear and cockpit positions, what would you recommend? I can't seem to find a way to do this well.

User avatar
waspe414
Staff
Staff
Posts: 1262
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa, Yak-130 Mitten
Location: Canada
Has thanked: 118 times
Been thanked: 230 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 » Wed Apr 03, 2019 5:31 pm

You can set gear and cockpit positions by trial and error (set a number, check where it sits relative to the model, modify number, check again), or find the location in Blender and use those coordinates. I tend to use trial and error, and Decaff will know more about the Blender process.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green

User avatar
-DELTA-Maciej
Newbie
Newbie
Posts: 7
Joined: Tue Apr 02, 2019 6:16 pm
Favorite Aircraft: MiG-29
OS: Ubuntu / Windows 7
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by -DELTA-Maciej » Wed Apr 03, 2019 7:37 pm

Trial and error is not an option- aircraft blows up as soon as I spawn on the ground.

User avatar
waspe414
Staff
Staff
Posts: 1262
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa, Yak-130 Mitten
Location: Canada
Has thanked: 118 times
Been thanked: 230 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 » Wed Apr 03, 2019 8:37 pm

Set the gear position lower. The aircraft is blowing up because the origin is crossing below the ground, or enough of the collision file is. Probably a good idea to double check the .coll anyway by changing aircraft quality to minimum with the Control menu in-flight.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green

User avatar
decaff_42
Staff
Staff
Posts: 3563
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 627 times
Been thanked: 1364 times
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by decaff_42 » Wed Apr 03, 2019 10:47 pm

I place an empty where I think the head position should be and take that coordinates (Y,Z,X) into the .dat file
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
-DELTA-Maciej
Newbie
Newbie
Posts: 7
Joined: Tue Apr 02, 2019 6:16 pm
Favorite Aircraft: MiG-29
OS: Ubuntu / Windows 7
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by -DELTA-Maciej » Thu Apr 04, 2019 5:14 am

Thanks a lot! I'll try it later today. I'll also start rebuilding the model, although this one works fine (no problems at all).

User avatar
Lupus 1
Newbie
Newbie
Posts: 17
Joined: Fri Nov 30, 2018 1:21 am
Favorite Aircraft: YF-23
OS: Windows 10
Has thanked: 2 times
Been thanked: 1 time

Re: YSFLIGHT crashes when loading my addon

Post by Lupus 1 » Mon Apr 08, 2019 2:20 pm

I would help you out, but I know nothing about creating mods. sorry.
The resident obscure WWII Trivia fanatic
P-39s are underrated.

Image
BRING BACK THE YF-23!!!

User avatar
waspe414
Staff
Staff
Posts: 1262
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa, Yak-130 Mitten
Location: Canada
Has thanked: 118 times
Been thanked: 230 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 » Mon Apr 08, 2019 4:39 pm

Lupus 1 wrote:
Mon Apr 08, 2019 2:20 pm
I would help you out, but I know nothing about creating mods. sorry.
It's a good thing the problem has already been solved, then.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green

User avatar
Lupus 1
Newbie
Newbie
Posts: 17
Joined: Fri Nov 30, 2018 1:21 am
Favorite Aircraft: YF-23
OS: Windows 10
Has thanked: 2 times
Been thanked: 1 time

Re: YSFLIGHT crashes when loading my addon

Post by Lupus 1 » Tue Apr 09, 2019 12:05 pm

waspe414 wrote:
Mon Apr 08, 2019 4:39 pm
It's a good thing the problem has already been solved, then.
yeah... I just saw that seconds after I posted...
The resident obscure WWII Trivia fanatic
P-39s are underrated.

Image
BRING BACK THE YF-23!!!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest