Hello,
I get an error -1 calling UaPlatformLayer::init() on an computer without an debugger.
To call LibT::initTrace() before UaPlatformLayer::init() is not posible because of the UaStrings for traceFile and appName.
Is there a other posibillity to see which part of the init() return with errorcode ?
I only got the assert uaplatformlayer.cpp line 179. But this don't tell me if there is a problem with ssl or with xml or somthing else.
Thanks Frank
Logging from UaPlatformLayer::init() not possible
Moderator: uasdkcpp
-
- Jr. Member
- Posts: 4
- Joined: 03 Sep 2012, 10:50
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re:Logging from UaPlatformLayer::init() not possible
Hi Frank,
With the current version of the OPC UA stack it is not possible to use any of the SDK classes before the stack platform layer is not initialized since all calls use a call pointer table to access the OPC UA stack platform layer. This is a limitation of the current OPC UA stack. The next SDK version will use a updated version of the stack that allows static linking of the platform layer. With the new version it will be possible to activate trace before the platform layer is initialized.
The only option with the current version is to add your own print outputs to console or to a text file.
Best Regards,
Unified Automation Support Team
With the current version of the OPC UA stack it is not possible to use any of the SDK classes before the stack platform layer is not initialized since all calls use a call pointer table to access the OPC UA stack platform layer. This is a limitation of the current OPC UA stack. The next SDK version will use a updated version of the stack that allows static linking of the platform layer. With the new version it will be possible to activate trace before the platform layer is initialized.
The only option with the current version is to add your own print outputs to console or to a text file.
Best Regards,
Unified Automation Support Team
Best regards
Unified Automation Support Team
Unified Automation Support Team
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re:Logging from UaPlatformLayer::init() not possible
Hi Frank,
A typical reason for failing UaPlatformLayer::init() is that the platform layer is already initialized and the stack is already used e.g. a OPC UA client DLL and a server DLL are used in the same process and both are doing their own init calls.
Best Regards,
Unified Automation Support Team
A typical reason for failing UaPlatformLayer::init() is that the platform layer is already initialized and the stack is already used e.g. a OPC UA client DLL and a server DLL are used in the same process and both are doing their own init calls.
Best Regards,
Unified Automation Support Team
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Jr. Member
- Posts: 4
- Joined: 03 Sep 2012, 10:50
Re:Logging from UaPlatformLayer::init() not possible
Hello Support Team,
thank you for answers.
The program is running on other computers without problems. It is only one init()-call in my code.
It dosn't make sense to return sevaral errorcodes from OpcUa_P_Initialize() if the init() just return -1 or 0.
you should return the last errorcode to the caller of init().
Up to now I don`t changed the sources and just used them for debugging with the original DLLs. To solve the problem I have to make some changes to printout an error state ...
Best Regards,
Frank
thank you for answers.
The program is running on other computers without problems. It is only one init()-call in my code.
It dosn't make sense to return sevaral errorcodes from OpcUa_P_Initialize() if the init() just return -1 or 0.
you should return the last errorcode to the caller of init().
Up to now I don`t changed the sources and just used them for debugging with the original DLLs. To solve the problem I have to make some changes to printout an error state ...
Best Regards,
Frank