Giter Site home page Giter Site logo

Comments (5)

TwinFan avatar TwinFan commented on August 25, 2024

Check if same occurs with completely empty plugin, which just returns 0. If so -> file bug with Laminar

from livetraffic.

TwinFan avatar TwinFan commented on August 25, 2024

Checked with Hello World Plugin...if that just returns 0 everything else works just fine. So it is a LiveTraffic issue I'm afraid.

Fetching plugins for /Users/birger/Applications/X-Plane 11/Resources/plugins

Loaded: /Users/birger/Applications/X-Plane 11/Resources/plugins/PluginAdmin/mac.xpl (xpsdk.examples.pluginadmin).

Failed: /Users/birger/Applications/X-Plane 11/Resources/plugins/Hello-World-SDK-3.xpl. (The plugin refused to start by returning 0 from XPluginStart.)

Loaded: /Users/birger/Applications/X-Plane 11/Resources/plugins/DataRefEditor/mac.xpl (xplanesdk.examples.DataRefEditor).

Found stats plugin: 2
I found the following scenery packages (prioritized in this order):
  0 Custom Scenery/yOrtho4XP_Overlays/
  1 Custom Scenery/zOrtho4XP_+27+089/

Idea: Check for static variables, which will be initialised and what they might change.

from livetraffic.

TwinFan avatar TwinFan commented on August 25, 2024

Reason was that along the way of initialization SHOW_MSG was called, which had called XPLMCreateWindowEx to create the window for the message area. Apparently, X-Plane doesn't clean up window handles if the plugin returns 0 from XPluginStart.
Now we call DestroyWindow() before returning 0 from XPluginStart and the crash has gone.

from livetraffic.

TwinFan avatar TwinFan commented on August 25, 2024

User reports crash after startup failed with LiveTraffic not loading the config file:

LiveTraffic: LiveTraffic 1.22.190829 starting up...
LiveTraffic 1575146591.5 ERROR src\DataRefs.cpp:1611/LoadConfigFile: Config file 'D:\Program Files (x86)/Steam/steamapps/common/X-Plane 11/Output/preferences/LiveTraffic.prf' first line: Unsupported format or version:
Failed: D:\Program Files (x86)/Steam/steamapps/common/X-Plane 11/Resources/plugins/LiveTraffic/64/win.xpl. (The plugin refused to start by returning 0 from XPluginStart.)

(Workaround is to remove the preferences file to make LiveTraffic create a new one.)

from livetraffic.

TwinFan avatar TwinFan commented on August 25, 2024

Culprit was a call to XPLMRegisterFlightLoopCallback. This is now delayed to the XPluginEnable function. Together with another fix this also fixes the long-known never anylzed issue, that the plugin didn't auto-start after disabled and re-enabling in the plugin admin.

from livetraffic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.