49 views
in GUI Development by
Hello

I am developing an gui application which is running in a Linux based system over a STM32MP2 hardware platform.

In this GUI app I am implementing a Device interface to get data from another external process which manage my hardware. in this way I am trying to separate the Ew code from my underlying system.

In this device interface (DeviceDriver.c) I am creating a worker tread to receive data from the "external hardware process" through a POSIX message queue. And once a message is received I send the data received from the worker thread to the GUI main thread using "EwInvokeCopy" method. Trying to avoid to execute code which is out of the context of the GUI thread.

But I am experiencing some "segmentation fault" and I am checking pointers, stack size, and contexts but I can't find where is the issue...

I would like to assure that I am working in a sure way and I get doubts about the process:

- I create a worker thread to receive binary data from a POSIX queue.

- I am sending received data from the worker thread to the GUI Main thread using EwInvokeCopy.

- In tne context of main thread I copy (memcpy) the " void * aData " received in a global variable defined in "DeviceDriver.c"

- After that I am accessing this global variable from the chora code using "nateive {}" statment.

Is it sure to accessing this global variable from the GUI thread while this variable is constantly updated from the worker thread (via main thread invokation)?

How could I could send my code in private?

Thank you.

1 Answer

0 votes
by
 
Best answer

Hello,

let me ask you for the version of the Build Environment that you are using - with version 14.01.00.00 (which we have released last week) we have fixed an issue within the invocation queue. Please make sure to update to the latest version.

Does this solve the issue?

Best regards,

Manfred.

by
I have a "Small Bussines" license is it possible to update the Build Env?

Thank you.
by
Sorry I haven't seen the package update in my download center.

I will test it.

Thank you.
by
Hi Manfred,

it seems that my GUI app is stable now. It has been running without crashes for four days. Before the update it would crash after several hours.

So I consider my issue solved!

Thanks a lot!

Embedded Wizard Website | Privacy Policy | Imprint

...