Plugins loading... problems (1 Viewer)

maniac's

Portal Pro
July 7, 2004
70
0
Paris, FRANCE
Just a small talk about plugins loading.

In Mediaportal's old versions each plugin resided in its own library. A problem during a pluging loading have no impact expect on itself (cause an exception just stop the process for the current plugin's dll).

Since many plugins are included in the same library (i.e. windowsplugins.dll), the exception management of plugins loading must be improved to manage this architecture choice.

For example, if an exception occurs within a plugin instance creation ( Activator.CreateInstance(...) ), next plugins will never be loaded because the dll's type loop is in the try-catch block !

I've got this problem, and it makes me unable to use in MP : I saw the first plugin (in name order) screen @ Mp startup and I cannot navigate.

The use of reflection must be protected against exceptions ! So at least each Activator.CreateInstance(..) calls must have its own try-catch block.
This is the same in Configuration.exe !

To finish, the plugins loader must check if the current type is not an abstract class (that could not been instanciated), I've not seen this test.

Thanks !
 

Users who are viewing this thread

Top Bottom