google / google/sagetv

STV ApplicationStarted hook fires before plugins are fully loaded

Open
#201 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
287
Forks
172
PR merge metrics
No merged PRs in 30d

Description

I have been working on Gemstone 2 for v9 and have a call under ApplicationStarted that disables plugins that I know will not work with Gemstone. This worked fine in V7 as this hook was the last thing to run and all plugins were loaded.

In v9 my calls to PluginAPI functions fail with a null pointer exception and as well if you check the logs there are numerous plugin move/load calls AFTER the ApplicationStarted hook has been called.

I also tried with just the base SageTV7.xml with phoenix core installed so there were plugins to see loading and the same is true. The logs show entries like "Hidden Extras are no longer hidden" which is logged from ApplicationStarted hook, prior to the final move of plugins.

I know stuckless changed the v9 code to load the new v9 plugins xml but something seems to be missing that should make the ApplicationStarted hook not fire until the plugins are fully loaded.

Feel free to correct my assumption that this event should be AFTER the plugin process has completed but if it runs prior to that then the STV is not finalized yet so that could cause issues.

As well, if the PluginAPI calls are made prior to the plugins being loaded I would think they should not fail with a null pointer error.

Log file attached.... [sagetv_0.txt](https://github.com/google/sagetv/files/552127/sagetv_0.txt).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.