YSFLIGHT crashes when loading my addon

YSFlight addon development, questions, tutorials, & more!
Post Reply
Deleted User 4151

YSFLIGHT crashes when loading my addon

Post by Deleted User 4151 »

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 415 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: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by decaff_42 »

(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 my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
waspe414
Staff
Staff
Posts: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 »

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: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by decaff_42 »

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 my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
Deleted User 4151

Re: YSFLIGHT crashes when loading my addon

Post by Deleted User 4151 »

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: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 »

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
Deleted User 4151

Re: YSFLIGHT crashes when loading my addon

Post by Deleted User 4151 »

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: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 »

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
Deleted User 4151

Re: YSFLIGHT crashes when loading my addon

Post by Deleted User 4151 »

Trial and error is not an option- aircraft blows up as soon as I spawn on the ground.
User avatar
waspe414
Staff
Staff
Posts: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 »

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: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: YSFLIGHT crashes when loading my addon

Post by decaff_42 »

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 my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
Deleted User 4151

Re: YSFLIGHT crashes when loading my addon

Post by Deleted User 4151 »

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).
Deleted User 3849

Re: YSFLIGHT crashes when loading my addon

Post by Deleted User 3849 »

I would help you out, but I know nothing about creating mods. sorry.
User avatar
waspe414
Staff
Staff
Posts: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

Re: YSFLIGHT crashes when loading my addon

Post by waspe414 »

Lupus 1 wrote: Mon Apr 08, 2019 2:20 pmI 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
Deleted User 3849

Re: YSFLIGHT crashes when loading my addon

Post by Deleted User 3849 »

waspe414 wrote: Mon Apr 08, 2019 4:39 pmIt's a good thing the problem has already been solved, then.
yeah... I just saw that seconds after I posted...
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests