Category: Development

Beta 11 Will Have Major SDK Changes

I’ve been quiet on the blog both because I was out sick for a few days but also because Sandy and I have been bashing pretty heavily on plugins, trying to determine the best way to prevent plugins from conflicting with each other.  The way 32-bit plugins link on OS X/Linux allows one plugin to interfere with another one’s code, which causes support problems in-field.  We are looking for any way we can to minimize this for 64-bit plugins.

The short of it is this:

  • Name & shame is probably not going to work for DLL linkage.  (It will work if you crash!)
  • Beta 11 should ship with a new XPLM implementation.
  • You should not be shipping 64-bit plugins now.  You should expect to retest your plugins against the next beta, and possibly even recompile your 64-bit Mac plugin

I cannot emphasize this enough: it’s not over until it’s over.  Just because 64-bit plugins appear to be working does not mean that we have worked out all of the bugs and won’t be making radical changes.  Once we are out of beta, things should be very stable, but during beta, this is our only time to get things right.

The last plugin ABI lasted over a decade, so it’s important that we get 64-bit right.

Posted in Development by | 3 Comments

10.20 Beta 10: Name and Shame for Plugins

X-Plane 10.20 beta 10 is out, and it features a new XPLM with two new features that help plugin authors detect problems with their plugins; I am jokingly  calling it “name and shame” because the new code lists the particular name of the plugin that failed.  This will help plugin authors figure out which plugin failed in a multi-plugin environment and help users report bugs to the right third party developer.

  • If a Linux or Mac 64-bit plugin incorrectly links against a number of common libraries, the plugin manager will log this on plugin load.  This will help authors detect linker setting errors and prevent a recurrence of the plugin conflicts that are quite common for 32-bit plugins.  (We do not log these problems with 32-bit plugins because they are very common; in fact, the sample templates for the SDK had the linker set up incorrectly until recently, so fixing these problems is “new” for most authors.)
  • If a crash is cause by a plugin (and thus not auto-reported to LR) we log the name of the plugin that crashed.

To this second point, your plugin is charged with the crash if ones of its callbacks was running during the crash.  This includes calls in X-Plane code due to your plugin.  For example if you call XPLMDrawObject with a bad object pointer and the sim crashes, your plugin gets dinged.

This beta (10.20 beta 10) is the beta to test!  If you have a 64-bit plugin, go test it against this new beta to see how well it really works!

Posted in Development by | 14 Comments

Plugin Changes Coming After Beta 8

Edit: Beta 8 isn’t particularly live; the autogen library is screwed up again (by me).  I’m fixing it now and will then recut the beta. I’m looking at what I can do to improve the library generation process – it’s a series of scripts, and as you might guess from the number of times it’s gone sideways in 10.20, it’s held together by shoe strings.

X-Plane 10.20 Beta 8 is now live.  This beta does not contain all of the bug fixes I wanted to get into the next beta.  But we had to change the networking protocol between X-Plane and Xavion, so this beta is timed to app-store approval.

With that in mind, there are some key bug fixes: hopefully the facade engine is back to sanity (if not, please re-report facade bugs) and I finally found the cause of incorrect fog on the horizon in 2x SSAA mode.

Here’s the main point though: there are still plugin system changes coming for 64-bit that are not yet in this beta. Please be prepared to test your 64-bit plugins against a future beta; do not assume that your plugin is ready to go just because it works now!

Posted in Development by | 6 Comments

Looking for a Tester for Mac/Win NVidia Testing

Please read the requirements below twice – this is a very particular setup I need.  To run this test you must have either:

  1. A functioning hackintosh running the latest Mountain Lion release (OS X 10.8.x) or a functioning Mac Pro running the latest Mountain Lion release (OS X 10.8.x) and
  2. An NVidia 560,57,580 or 660,670, or 680 desktop GPU in that machine and
  3. The computer must also be set up to run of Windows Vista or Windows 7 in Bootcamp and
  4. You have or are willing to run the 10.20 beta (at least as a demo and)
  5. You can run command-line fps tests if given instructions.

Please do not reply to this if you do not meet all three hardware requirements; I am looking for someone who can do a clean apples-to-apples comparison of NVidia driver performance between Mac and Windows.

Please do not comment on the post if you do not meet these requirements; I am going to clip the comments pretty tightly on this one.

EDIT: thanks, but a user already sent me the test data I needed!

Posted in Development, Hardware by | 2 Comments

Timing for 10.20 Beta

I hate to put time estimates on anything.  The reason: timing is subject to change and always has a ton of uncertainty. What we internally is not a schedule.  A railway has a schedule; we have a plan, a roadmap, or some goals. Betas are full of uncertainty. We don’t know what bugs are in the sim – if we did, beta would be over a lot faster.

So: this is my current thinking on the timing of the rest of the 10.20 beta, as of now.  It will be obsolete within five minutes.  Since most of the time schedules get screwed up by things being late (if we were ahead of schedule we could just choose to not release to be on schedule 🙂 this is post may be useful for third party developers trying to plan releases.

If things go well, I believe we will be able to build a 10.20 release candidate this year.  (That’s a tighter goal than it sounds – there are only two weeks left.)  I think we will not finalize that release candidate this year; more likely we’ll sit on the release candidate into a little bit of January.  The release candidate will hopefully be settled enough that there are not any engineering surprises for third parties if we have to recut the release candidate.

If things go badly, we won’t be RC this year – there’s always the chance that someone could have a sick kid, a power outage, new bugs could be found, you name it.  Life is full of uncertainty!

I do not know what autogen will get dropped into the beta or when. If we have autogen that is almost ready for 10.20 but misses the release deadline, we’ll drop new art assets into a 10.21 or 10.22 – it’s very easy for us to do a bug fix patch with more “stuff” in it.

If I was gambling, I’d bet that there will be a 10.21 anyway – what we found with 10.10 is that a lot of users didn’t participate in the beta, and thus we got a flood of bug reports right after 10.10 went final.  This can be frustrating for us (in that it means that our beta coverage isn’t as good as we’d like in terms of hardware configurations) but it’s also good in that it means that the entire community isn’t in on the beta (something we don’t want – we don’t want to expose every X-Plane user to beta bugs!).

Posted in Development, News by | 5 Comments

Look, Shiny!

Edit: Normally I label the overly technical posts as being for a target audience, but I did not this time.  My bad — this post is really only of interest (and will only make sense) to serious 3-d modelers – the advanced airplane and scenery nerds!

The brightness of specular hilights is out of sync between HDR and non-HDR mode in X-Plane 10.11.  This wasn’t intentional – it’s a bug.  10.20 will fix this; specualr hilights will have the brightness you see in non-HDR mode (which we think is more like they were supposed to work*) but the tinting of HDR mode (non-HDR mode was overly red in 10.11).

I get a lot of requests for ‘hardness’ control – that is, the exponent that controls how wide a specular hilight is.  We’ll get this feature eventually – it’s too important to ignore.  The main delay in having this feature is that X-Plane uses a deferred renderer, so the specular exponent has to be stored in the G-Buffer somewhere, and storage is tight.

For similar reasons, it is very very unlikely that we’ll ever have RGB tinting of specular hilights.  Doing so is 3x as expensive in G-Buffer storage, and we need that storage for other features.

* That is, unless we discover that non-HDR mode looks spectacularly bad in some cases, in which case we may have to push things a little more toward how HDR was.

Posted in Development, Modeling by | 16 Comments

What Would Make the Library Less Error-Prone?

There is one particular library problem I see all of the time:

  • Scenery pack A exports a pile of art assets to the library.
  • Scenery pack B uses them.
  • User X installs scenery pack B but not A, and can’t run X-Plane.

X-Plane provides a way to work around this: a library pack can contain an EXPORT_BACKUP directive that tells X-Plane “use this art asset if you can’t find it anywhere else” – it’s for place-holder art of last resort.

So scenery pack Bcould contain a library.txt with the backup art to allow it to function (badly) without scenery pack A.

But, even though OpenSceneryX provides this “backup” library, I see over and over again scenery packs with no backup, and confused users who don’t understand why their sim doesn’t work.

I am open to ideas on how to fix this.*  One idea I had (which may or may not be useful): allow scenery pack B to list in its library.txt the scenery packs it requires by some human-readable name.

Then if/when X-Plane can’t find library files, it can provide a useful message like:

The scenery pack “Awesome Downtown NY” could not be loaded because you have not installed the scenery pack “OpenSceneryX.”  Download and install “OpenSceneryX”, then restart X-Plane.

But I am skeptical: given the low adoption rate of EXPORT_BACKUP I am not sure that authors of scenery are paying a lot of attention to library dependencies.

* But not this idea: just load the pack without art assets. I strongly believe that if X-Plane allows broken data to load, the amount of broken data in the scenery packs out there will go way up.  We have seen this happen over and over again; the quality of third party data is proportional to the severity of error checking.

Posted in Development by | 15 Comments

You Have to Link Against the Libraries You Need

Beta 7 is now out – see the links to the right for release notes and bug reporting. Beta 7 fixes a few fire drills with beta 6.  Good times!

Plugin Developers: you have to link against the libraries you use.  You cannot depend on X-Plane to provide those libraries for you!

Historically, due to poorly chosen project settings in X-Plane, X-Plane would “leak” libpng, libfreetype, and (in 10.10) libcurl.  Plugins that used these libraries without properly linking against them would still function: X-Plane would accidentally export these libraries, hiding the fact that the plugins accidentally didn’t link against them, and two wrongs made a right-for-now-until-something-changes.

If your plugin won’t run with X-Plane 10 beta 7 (32-bit or 64-bit), it means you’re not linking properly. The 64-bit build in particular does not share any static libraries.  So whatever library you need, go find the .a or .so or .dylib or .dll or .lib and link against it!  If you are on Unix or Mac, you can type

nm mac.xpl | grep "U "

To see a list of undefined symbols.  You should only see libpng in there if you linked against libpng.dylib or libpng.so.  If you are trying to link statically to your support libraries (and this is definitely the path I recommend) the only “U ” symbols you should see are XPLM and XPWidgets routines.

I will try to post additional SDK documentation on linker settings this week!

Posted in Development by | Comments Off on You Have to Link Against the Libraries You Need

X-Plane 10.20 beta 6: the Fastest Way to Crash Your Computer

Update: this crash may only be happening to users who have ‘runway follows contours’ off.  I still don’t ever see this on my machines, even when I do what I think should cause the bug based on the code and crash reports, but we’ll get this fixed somehow.

To hack around this, open X-Plane.prf in your favorite text editor, find the line that says

renopt_sloped_runways 0

and change the 0 to 1.  You might be (temporarily) back in business with beta 6.

Ever wonder where your crash reports go?  Let me show you!

That’s a screenshot from the back-end tool we use to look at crash reports – in this case, it is a view of all crash reports submitted against 10.20 beta 6 on all platforms, sorted by how they crashed.  Clicking on the links drills down for more details, but in this case, the one picture says it all: the code to “inflate” airports (that’s the code that turns an apt.dat file into real 3-d triangles) is crashing.

As far as I can tell, it’s bad luck that this crash happens at some airports but not the ones that I visited during testing; anyway, beta 7 “real soon” – realistically it’ll be 24 hours before I can get another beta posted.

It’s always a good idea to auto-report crashes – we don’t have to worry about “too many reports” because, as you can see, the reporting software gets us a very nice, clear picture of what’s going on.

Anyway, I’m sorry about the delay – we’ll get this fixed and then regular testing can resume.

Posted in Development by | 6 Comments

X-Plane 10.20 Beta 6:

10.20 Beta 6 is out – this build fixes the missing paths in the library that were causing the dreaded “Could not load fac/forest/beach” error. This build also puts in some important changes to 64-bit plugis, so below I will try to point out what matters to select audiences:

Users:

If you don’t make an add-on but you are still testing 10.20, there is still a kind of testing that we need (but you may not like it): is anything broken in the 32-bit edition of 10.20 that worked in 10.11?

This kind of bug (it worked in the old version but is broken now) is called a regression bug in the tech lingo, because the sim has “regressed” – it has gone backward.  This is the most important kind of bug for us to find for three reasons:

  1. No one wants to go backward.
  2. It’s easier for us to find the bugs in new features than random bugs in features we didn’t think we had changed.
  3. If you report a regression bug against two versions of the sim (it worked in 10.11, broken in 10.20) we have tools to see only the code changes from 10.11 to 10.20, which makes finding the bug much quicker.

So: please try the 32-bit 10.20 and if it fails at something that 10.11 did, please let us know ASAP!

Aircraft Developers

This build fixes the prop disc and airspeed indicator, and finally provides more datarefs for the anti-ice system; I suggest rechecking your airplane with these systems.  At this point I think I only have two airplane issues floating around on my radar:

  • The new light billboards and spill can be tricky to use, particularly when lights crash through the fuselage of an airplane.
  • The manifold pressure indication is FUBAR on helicopters.

Both of these bugs were present in 10.11.

In fact, we have no regression bugs on file in the airplane system between 10.11 and 10.20 32-bit.  So if you know of something broken with your airplane that is newly broken in 10.20 32-bit, please report it ASAP.  (You do not need to re-report bugs that were already present in 10.11 like the manifold pressure.)

Plugin Authors

This build integrates a fix for LuaJIT on 64-bit Macs; see the release notes and plugin SDK for how to use it.

This build also strips out the symbols of libpng, libcurl, and libfreetype2 on Mac and Linux.  These symbols never should have been visible in X-Plane, but they have been for years.

  • If your 32-bit plugin used to work on X-Plane 10.11 but stops working on 10.20 32-bit beta 6, please file a bug and we will figure out what to do.
  • If your 64-bit plugin use to work on 10.20 beta 5 but stops working on beta 6, your makefile or X-Code settings have a bug; post to the x-plane-dev mailing list to get help.

There may be future changes to 64-bit like this one; this is why I recommend not releasing while we are in beta!  Our goal is to ‘get 64 bit right’ now during beta while we can try and test.

Scenery

There are no open regression bugs from 10.11 against scenery; facade textures were borked and are now fixed, and the library should be restored.  So if your scenery pack worked in 10.11 and fails in 10.20, please report this ASAP!

I do have one open bug (present in all of the v10 run) that line markings are losing line segments; I hope to get that fixed by the end of beta.

(We also have a report that certain incorrect ATC/apt.dat files will hard-crash the sim – I think Chris will probably be able to get some better validation in place before beta ends.)

Posted in Development, News, Scenery by | 2 Comments