0

Good evening, I inherited a project made using QT creator (C++ and Qt Quick). The target is a DaVinci DM8168 board with **Linux kernel 2.6.37 **on it.

In particular I'm using Qt Creator 4.2.0 (4.2.0) Based on Qt 5.7.1 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 64 bit)

I can build & run the application for the target and I can see it running.

I need to launch the profiler. But it does not work. When i run the application (on the target) using the parameter:

qmljsdebugger=port:xxxx

then the application does not start anymore!

I tried to add these options to the project's .pro file:

DEFINES   ''    +=  QMLJSDEBUGGER         
DEFINES   ''    +=  QT_DECLARATIVE_DEBUG   
PACKAGECONFIG_append = " qml-debug"

I, obviously, build in debug mode.

When I try to run the applicative on the target i get this message:

QML debugging is enabled. Only use this in a safe environment. Process killed by signal

I repeat: if the option "qmljsdebugger=port:xxxx" is removed then the application starts and works properly.. but of course the profiler wouldn't connect in this case.

As I said, I've inherited the project and I'm complete new to this environment.

Any help or suggestion?

update

these are now the lines I've added to the .pro file

DEFINES   ''    +=  QMLJSDEBUGGER
DEFINES   ''    +=  QT_QML_DEBUG
CONFIG          +=  qml_debug

I checked the various path for QT and exported PATH and LD_LIBRARY_PATH. Unfortunately nothing changes: If I launch my program using:

  /opt/MyPrefix/MyProgram -platform eglfs 

then it works.

if I use:

   /opt/MyPrefix/MyProgram -qmljsdebugger=port:3456 -platform eglfs 

then it crashes

QML debugging is enabled. Only use this in a safe environment. Segmentation fault

the program seems to start in Debug Mode and this is ok. The problem is the profiler :(

ps: As far as I know there are no firewalls running on the target. I'll check better for sure.

update 2

I tryed the same solutions as above but on a simple program as suggested(an "hello world" basically) and it does not crash when the "-qmljsdebugger=port:3456" option is specified... I really don't know what the problem is in my original application.

Andak
  • 124
  • 12
  • Which version of Qt are you using ? – Benjamin T Jul 08 '19 at 12:37
  • Qt Creator 4.2.0 (4.2.0) Based on Qt 5.7.1 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 64 bit). – Andak Jul 08 '19 at 12:45
  • I am not asking which version of Qt Creator you are using, but which version of Qt. – Benjamin T Jul 08 '19 at 12:52
  • Precisely which version of Qt is installed on the DM8168 board. You might have other Qt version installed (for your PC or other boards). – Benjamin T Jul 08 '19 at 12:59
  • I almost sure it still is Qt 5.7.1. It it meas anything my QTDIR system variable is .../DaVinci/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/arm-linux-gnueabihf/libc/opt/Qt5.7.1 I'm going to check the DM8168 right now in order to be 100% sure – Andak Jul 08 '19 at 13:19
  • On the Target (DM8168) in /opt/ are present Qt 5.7.1 and QtNeon5.7.1. I did not find any other version.. – Andak Jul 08 '19 at 14:30
  • Are you running a Firewall on your target? I had somewhat similar problems using a Yocto build (on a Raspberry Pi) that came with firewall rules enabled. Disabling the firewall on the target solved the problems. – jwernerny Jul 08 '19 at 17:36
  • No firewall on the target; I've updated the original question. – Andak Jul 09 '19 at 10:06

1 Answers1

0

First there are a few prerequisites to make qml debug run like being sure that Qt was built with the exact same toolchain as the binary. You should take a look at Qt Wiki: https://wiki.qt.io/How_To_Profile_QML_App_on_Embedded_Device

An important note is that how you make qml debugging works has changed between Qt Quick 1 and Qt Quick 2. As you are using Qt 5, I believe you should be using Qt Quick 2. So that means that you should not use QT_DECLARATIVE_DEBUG, but QT_QML_DEBUG.

More details: https://doc.qt.io/qt-5/qtquick-debugging.html#qml-debugging-infrastructure

If you still have issue after using the proper DEFINES and making sure that evry prerequisite was met, then you should try with a basic Qt program that does nothing, but display a simple QML item (like a Rectangle or a Button) ans see if you still have the issue.

Benjamin T
  • 8,120
  • 20
  • 37