cancel
Showing results for 
Search instead for 
Did you mean: 

Windows PC Simulation crashes when using a single widget (Button). Works fine with no widgets (only hard-coded text). Help!

VSimu.1
Associate III

Windows PC Simulation crashes when using a single widget (Button). Works fine with no widgets (only hard-coded text). Help!

Everything works fine when using TouchGFX Designer to run a simulation on a Windows PC. But we are trying to build everything with CMake in Eclipse. And when using a single button we get the following stack trace (see attachment). It seems that it is a nullptr that is the problem. We do not have the sources for this to further debug (no thanks ASM).

When using only hardcoded text, Eclipse/CMake works exactly as TouchGFX Designer Windows simulation. ✔�?

When using a toggle button, the simulation does not crash (as it does when using a Button), but the toggle button is NOT drawn. However the hard-coded text is drawn fine.

When using a Slider, we get an assertion statement (see attachment). When continuing, the source pointer is 0x3, i.e. in restricted memory.

Absolutely any insight or tips would be greatly appreciated!

7 REPLIES 7
Martin KJELDSEN
Chief III

This assert tells us that your assets for the slider do not align properly. Did you verify what is claimed?

/Martin

VSimu.1
Associate III

We just put a new slider into our TouchGFX. We are using the example getting started project and we are doing absolutely nothing special. Out-of-the-box, we cannot get this to work as a Windows Simulation.

However we have had success making this work on the target.

Do you think maybe some compiler flags, linker flags or Compiler Versions could be the cause of this?

Regarding the slider assertion again, if I continue in the code, a memcpy is performed by the library. It is trying to access invalid memory by trying to copy some 700 bytes from location 0x3. So there must be something we have not figured out in the settings to reproduce this in our build.

I highly doubt it's anything to do with compiler flags. assert() could do nothing in your target compiler making it run fine ( but might look wrong ). The code for Slider.cpp tells us:

assert(sliderBackground.getWidth() == sliderBackgroundSelected.getWidth() &&
           sliderBackground.getHeight() == sliderBackgroundSelected.getHeight() &&
           "Slider::setBitmaps - background and backgroundFilled must have same dimensions");

Can i see your project?

/Martin

VSimu.1
Associate III

Yes I can show you the project. Can I send you our CMake project privately somehow? Or maybe you guys already have an existing CMake project that creates the Windows simulation?

We cannot use the Makefile provided in our build system. This is why we need to recreate it with our CMake build system.

You could send it in a private message if it'll fit, or use some web-share. We don't use or provide CMake projects, sorry!

/Martin

VSimu.1
Associate III

Hi Martin,

We were able to resolve our problems with building with CMake.

Basically we started with TouchGFX version 4.9.3 which we could not get to work.

Then we tried with 4.13.0 and we got it to work with this by using the compiler installed in C:\TouchGFX\4.13.0\env\MinGW\bin\gcc.exe and the g++.exe from the same folder.

We tried to use the same solution that we used to get 4.13.0 to work, on the 4.9.3. But we were not able to get 4.9.3 to work whatsoever.

So it seems 4.9.3 had some issue. But we are happy now to get going with the 4.13.0, because we do not care about an older version of the library.

Cheers!

Oh, i didn't realize you were using an older version. Glad you solved it!