Failed to load application settings from Sdl.ProjectApi.xml - NullReferenceException caused by Sdl.Desktop.Platform.PluginManagement.StudioPluginManager.Resolve[T]()

Hello everyone!

I'm facing problem with our integration with Trados after upgrading Trados from version 17.0.3.11695 to 17.2.8.18668.

Our application doesn't start properly and produce following log:

INFO 2024-01-09 09:42:54 – Starting application
INFO 2024-01-09 09:42:55 – Initializing singleton...
INFO 2024-01-09 09:42:55 – Trying to initialize application, initialized = False
INFO 2024-01-09 09:42:55 – Initializing project server
ERROR 2024-01-09 09:42:55 – Error during initialization
Sdl.ProjectApi.ProjectApiException: Failed to load application settings from 'C:\Users\{my_user_name}\AppData\Roaming\Trados\Trados Studio\Studio17\Sdl.ProjectApi.xml':
Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
in Sdl.Desktop.Platform.PluginManagement.StudioPluginManager.Resolve[T]()
in Sdl.ProjectApi.Implementation.Xml.Application.get_Serializer()
in Sdl.ProjectApi.Implementation.Xml.Application.Deserialize(Stream stream)
in Sdl.ProjectApi.Implementation.ApplicationRepository.Load()
--- End of inner exception stack trace ---
in Sdl.ProjectApi.Implementation.ApplicationRepository.Load()
in Sdl.ProjectApi.Implementation.ApplicationRepository..ctor(ILogger log, String applicationFilePath)
in Sdl.ProjectApi.Implementation.Factory.CreateApplication(ILanguageCloudService languageCloudService, IApiClientBuilder apiClientBuilder)
in Sdl.ProjectApi.ApplicationFactory.CreateApplication(ILanguageCloudService languageCloudService, IApiClientBuilder apiClientBuilder)
...
INFO 2024-01-09 09:42:56 – Trying to initialize application, initialized = False
INFO 2024-01-09 09:42:56 – Initializing project server

After some research I've found that the method Sdl.Desktop.Platform.PluginManagement.StudioPluginManager.Resolve[T]() itself is causing error without apparent reason.
I've created simple project that only runs this one line and it gives the same result:

Screenshot of code in Visual Studio showing an error message 'System.NullReferenceException: Object reference not set to an instance of an object.' in Sdl.Desktop.Platform.PluginManagement.StudioPluginManager.Resolve method.

Do you have any advice on how to fix it?

Cheers,
Wojtek



Generated Image Alt-Text
[edited by: Trados AI at 1:41 PM (GMT 0) on 5 Mar 2024]
Parents Reply
  • Hi Patrick,
    Many thanks for your response.

    In our actual application we specifically used ApplicationFactory from Sdl.ProjectApi, merely like this:
    IApplication application = ApplicationFactory.CreateApplication();
    and it breaks in this line and it seems to be unaffected by our code or execution context. It happens for pure installation of Trados without any additional plugins or anything else.

    We actually managed to implement workaround simply by not using ApplicationFactory, yet solution for this problem might be useful in future or if tests show that the workaround is not satisfactory.

    Unfortunatelly our code is not publicly accessible, but the usecase is exactly like described above.

Children
No Data