• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • A Getting Started Guide
  • Troubleshooting

Supported Platforms A Getting Started Guide

Troubleshooting

Introduction

This is an overview to help you resolve issues you may come across when developing CDP Studio applications. We guide you in identifying the problem and how to solve it. The following sections will highlight various problems related to assembling, building, deploying, and debugging applications, and attempt to give you specific solutions to various common problems.

Where Do I Start?

A good place to start is to look at the different panes at the bottom of the CDP Studio window. Error and warning messages, together with relevant information, are shown here and often give informative indications of the problem.

Go through the relevant panes and check any errors against the ones in the sections below. If you do not find an exact match, look for similar error messages, as these may have a similar cause.

The panes can contain information that assists in discovering inconsistencies in your system that can otherwise be difficult to find. As an example, if you have a component subscribing to a source that is missing or deleted, it is listed as warnings in the Issues pane.

Below is a description of the panes; some contain information relevant to troubleshooting application problems.

Pane nameDescription
IssuesThis pane shows possible problems, either from CDP Studio itself or from the application build tools. Any issues here could indicate problems with your application that may cause it to not start, or behave incorrectly when it is running.
AlarmsThis pane shows which Alarms are set in the application when it is running. Alarms typically indicate an application process data problem, such as no contact with an I/O device, a low value of a process variable and similar.
Search ResultsThis pane shows the results of your search. Each found item can be clicked to open that item. There is a History pull-down menu that shows your most recent searches.
Application OutputThis pane shows the output from your applications. It contains information such as library build dates, version control IDs, and debug information from components.
Compile OutputThis pane shows messages from the tools that generate machine-readable code from your c++ code. Typical problems are pre-processor errors (definitions / structure / include-file related), compile-time errors (code syntax) and linker errors (problems resolving references/links between libraries and the application).
QML Debugger ConsoleThis pane can be used to manipulate values temporarily when debugging applications with QML widgets.
General MessagesThis pane shows information from the makefile (build instructions) generator, device pairing messages and deploy issues. CDP Studio uses qmake to generate makefiles, assisted by the files in the $TOOLCHAIN/$CDPVERSION/qmakefeatures folder.
Version ControlThis pane shows information from the version control system
Connection InfoThis pane shows information about the connection between CDP Studio and running applications, such as connect, disconnect, access information, message-throttling, time-sync and other relevant messages.

My Application Does Not Start

Below are various solutions related to getting the application to start.

Note: See also Troubleshooting Run Failure for more tips on how to resolve the failure to run applications.

Problem: 'Unable to find model for....'

ExampleThe issues pane is full of error messages:
WebAssemblyDemoApp:16: error: Unable to find model for 'Subcomponent Name="HeaterControllerSim"'. Model
'HomeControlSim.HeaterControllerSim' does not exist. Make sure the library 'HomeControlSim' has been built.
WebAssemblyDemoApp:17: error: Unable to find model for 'Subcomponent Name="LampControllerSim"'. Model
'HomeControlSim.LampControllerSim' does not exist. Make sure the library 'HomeControlSim' has been built.
WebAssemblyDemoApp:18: error: Unable to find model for 'Subcomponent Name="ThermostatSim"'. Model
'HomeControlSim.ThermostatSim' does not exist. Make sure the library 'HomeControlSim' has been built.
....
CauseThe mentioned models can not be found.
SolutionMake sure that you have opened the library that contains the model, and that it is using the same Toolkit as the Application. The library name is usually given as the first part of the library name. In the above example, the model name 'HomeControlSim.HeaterControllerSim' implies that the library is called 'HomeControlSim'. Right-click the 'HomeControlSim' library and select Build .

Problem: 'No such file or directory'

Example:The code:
#include "somelib.h"

gives an error message:

../../MyApp/MyAppApp/CDPMain.cpp:3:10: fatal error: somelib.h: No such file or directory
#include "somelib.h"
        ^~~~~~~~~~~
CauseYou are trying to include a file that the build system can not find. It could be that the file name is not written correctly, or that the external library that you are including the file from has not been imported correctly (the library is not in the path), or that the library has not been built for the selected Toolkit.
Solution
  • Verify and, if needed, fix, the filename and case in the #include statement.
  • Make sure the library has been built for the Toolkit you have selected for your target computer.
  • If you have manually imported an external 3rd party library, make sure you have followed the Third-party Library support instructions.
  • If you still have problems, try to Clean the library before building it, then Clean the application and build it.

Problem: 'not declared in this scope'

ExampleThe code:
Output = Output + 1;

gives an error message:

../RecipeLib/RecipeHandler.cpp:49:3: error: 'Output' was not declared in this scope
CauseA variable or function with that name is not found in any of the current namespaces.
Solution
  • Make sure that the variable or function name is typed correctly.
  • That the file that defines the variable or function is included in the file that is using it.
  • That the variable or function is in the namespace that you are currently in.

Problem: 'invalid user-defined conversion'

ExampleThe code:
MyProperty.SetValue(1);

gives an error message:

../RecipeLib/RecipeHandler.cpp:39:25: error: invalid user-defined conversion from 'int' to 'const string& {aka
const std::basic_string<char>&}' [-fpermissive]
In file included from /home/user/CDPStudio/toolkits/linux_x86_64_12/toolchain/bin/../lib/gcc/x86_64-pc-linux-gnu/4.7.4/
../../../../x86_64-pc-linux-gnu/include/c++/4.7.4/string:54:0,
               from ../../../CDPStudio/toolkits/linux_x86_64_12/CDP-4.9/include/CDPCore/CDPSystem/Base/CDPObject.h:14,
               from ../../../CDPStudio/toolkits/linux_x86_64_12/CDP-4.9/include/CDPCore/CDPSystem/Base/CDPComponent.h:17,
               from ../RecipeLib/RecipeHandler.h:4,
               from ../RecipeLib/RecipeHandler.cpp:1:
/home/user/CDPStudio/toolkits/linux_x86_64_12/toolchain/bin/../lib/gcc/x86_64-pc-linux-gnu/4.7.4/../../../../
x86_64-pc-linux-gnu/include/c++/4.7.4/bits/basic_string.h:487:7: note: candidate is:
std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&)
[with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>] <near match>
CauseYou are passing an unexpected (wrong) type to a function or a variable. In the case of the std:: library, these messages can be quite verbose. The (shortened) example above shows someone passing an int when the API expects to receive a const std::string&.
SolutionVerify that you pass the correct argument type to the function or variable. Example:
MyProperty.SetValue("1")

Problem: 'version GLIBC_X.YY not found'

ExampleWhen trying to run the application on the target computer, it refuses to start, and shows messages similar to these:
15:35:32: Starting /home/pi/RevPiTest1/RevPiTest1App/RevPiTest1App ...
/home/pi/RevPiTest1/RevPiTest1App/RevPiTest1App: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.25' not found
(required by /home/pi/RevPiTest1/RevPiTest1App/lib/libRevolutionPiIO.so)
/home/pi/RevPiTest1/RevPiTest1App/RevPiTest1App: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found
(required by /home/pi/RevPiTest1/RevPiTest1App/lib/libStudioAPIServer.so)
/home/pi/RevPiTest1/RevPiTest1App/RevPiTest1App: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found
(required by /home/pi/RevPiTest1/RevPiTest1App/lib/libWebSocketLib.so)
/home/pi/RevPiTest1/RevPiTest1App/RevPiTest1App: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.25' not found
(required by /home/pi/RevPiTest1/RevPiTest1App/lib/libcrypto.so.1.1)
/home/pi/RevPiTest1/RevPiTest1App/RevPiTest1App: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.11'
not found (required by /home/pi/RevPiTest1/RevPiTest1App/lib/libCDPCore.so)
/home/pi/RevPiTest1/RevPiTest1App/RevPiTest1App: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found
(required by /home/pi/RevPiTest1/RevPiTest1App/lib/libCDPCore.so)
/home/pi/RevPiTest1/RevPiTest1App/RevPiTest1App: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.11'
not found (required by /home/pi/RevPiTest1/RevPiTest1App/lib/libCDPConfigurator.so)
15:35:32: Application finished with exit code 1.
CauseThe target computer is running an operating system that is not compatible with the selected toolkit.
SolutionMake sure that you have selected the correct Toolkit for the target that is chosen in the Deploy Configuration. Search for Toolkit in the Help to find the Toolkit documentation, and verify that the target computer is running an operating system that is compatible with the Toolkit. If necessary, upgrade the target operating system, or change the Toolkit. For an example toolkit, see documentation for the Linux Toolkit.

Problem: 'Failed to start program. Path or permissions wrong?'

ExampleWhen trying to run the application locally or remote, I get the message:
16:23:01: Starting /home/user/CDPStudioWorkspace/deployments/systems/CDP_4.10_INSYS_SmartBox_ARMv7_32bit/
WebAssemblyDemo/WebAssemblyDemoApp/WebAssemblyDemoApp ...
16:23:01: Failed to start program. Path or permissions wrong?
CauseThe most likely cause is that you are trying to run an application built with an incompatible Toolkit or that the device you are deploying to is not properly Paired.
SolutionMake sure that you have selected the correct Toolkit for the target that is chosen in the Deploy Configuration. Search for Toolkit in the Help, and verify that the target computer is running an operating system that is compatible with the Toolkit.

Problem: 'gdbserver: not found'

ExampleWhen I try to debug the application, I get the error:
15:14:17: Debugging starts
bash: line 0: exec: gdbserver: not found
CauseThe target device does not have gdbserver installed, or it is not reachable from any of the locations defined in the PATH variable. gdbserver is required for remote debugging to work.
SolutionInstall gdbserver on the target device. The gdbserver must be available in the $PATH of the target device. gdbserver can be copied from the correct toolkit folder, for instance:
$HOME/CDPStudio/toolkits/raspbian_armv6_13/toolchain/arm-rpi-linux-gnueabihf/debug-root/usr/bin/gdbserver

Search for Toolkit in the Help, and see the Toolkit documentation for the correct paths to the various toolkits.

My Application Does Not Work

Even if the application builds and starts, it may not work properly. This may be due to various configuration errors. Some issues could be:

Problem: <Component> Is Not Working!?

ExampleSome component is not performing as expected, and you don't know why.
CauseMany components print out warnings/errors when the Debug property is set to a value greater than 0. A larger number means more debug information. Note that excessive message printouts may impact the application's performance.
SolutionCheck the documentation for the component in question. Pressing F1 when the component is selected should take you to the correct help page, or you can search for the model name in the Help. On most components, you can set the Debug property to 1 or 2 to get more information about what it is doing. This may assist you in finding the cause of the problem.

Problem: Modbus Communication Issue

ExampleThe communication with the Modbus Slave or modbus master device does not seem to work.
CauseThe Modbus master or Modbus slave is not set up correctly, or they are not connected, or are attempting communication on different interfaces.
SolutionSee the Modbus Setup Guide for an example of how to set up both a modbus master and a modbus slave. The Modbus Configuration Manual contains generic information on modbus setup. See also the Troubleshooting paragraph, which may aid in finding faults.

Problem: Web UI Does Not Work

ExampleThe web page does not show or only partially shows.
CauseThis could be caused by incorrect values in the WebFilesToServe property in your application, Content Security Policy violations or an error in one of the files in the www folder.
SolutionHave a look at common issues encountered while developing web interfaces.

Problem: The Signals Do Not Change

ExampleThe applications starts, but when I click into the components, the signal values do not change.
CauseThis normally happens if you run an individual application, and forget to go to the system and choose 'Connect'.
SolutionRight-click the system and choose 'Connect'.

Problem: Remote Application Starts, but I Am Unable to Connect

ExampleWhen I try to run the application on a remote machine, the application starts (I can see the messagelog, and the app-icon shows that the app is running), but I can not connect to it.
CauseA firewall (most likely on the target) is blocking the application from communicating with external devices.
SolutionSet up the firewall to allow the application to communicate with external devices. See allowing applications through the Windows firewall for more information about how this can be done for a Windows target.

My Application Crashes

Application crashes may happen due to issues such as faulty or non-defensive programming. If a component crashes, the application will handle the crash by printing a stack trace of where the problem occurs and suspending the component. This will trigger the Component Suspended alarm, which can be used to put the system in a safe state. If you can reproduce the problem, you may run the application in Debug Mode to identify the root cause of the problem.

Problem: My Application Experiences Random or Strange Crashes

ExampleMy application, which works fine on another CDP framework version, crashes on CDP version X.YY.
CauseAs the applications use dynamic library linking, there is a rare case where a crash might happen due to changes in a dependent library. This might happen if the same library is used in multiple projects and has different versions and implementation for different CDP Framework versions. If you use the same target and switch between these versions, and are not careful to clean the target directory before deploy, there is a chance that an old incompatible library is left on the target. This might cause the application to crash when (some) functions or variable from that library is used.
SolutionTo avoid this issue:
  • Make sure you have rebuilt all your libraries which are used by the system, especially after CDP Studio updates, or when switching between CDP framework versions.
  • Avoid using the same target for different CDP framework versions.

Supported Platforms A Getting Started Guide

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top