cancel
Showing results for 
Search instead for 
Did you mean: 

Live Expression stopped working "Failed to evaluate expression" For 2 years I have been using STM32CubeIDE debugging with Live Expression view without any problems. Starting Oct 2022 I only get "Failed to...."

wvan .1
Associate

This only happens to new variables added to my C code after Oct 2022. "Old" variables still work fine. When I add failing variables to the "Expression" tab I get "Error: Multiple errors reported". Reported are:

Multiple errors reported.

1) Failed to execute MI command:

-var-create - * HelloWorld

Error message from debugger back end:

-var-create: unable to create variable object

2) Unable to create variable object

3) Failed to execute MI command:

-data-evaluate-expression HelloWorld

Error message from debugger back end:

No symbol "HelloWorld" in current context.

4) Failed to execute MI command:

-var-create - * HelloWorld

Error message from debugger back end:

-var-create: unable to create variable object

Does anyone have an idea? Looks like the debugger is not getting resources from Windows. I use 1.10.1 Build 12716_20220707_0928 (UTC)

Windows 11 Pro version 22H2

7 REPLIES 7
Semer CHERNI
ST Employee

Hello @wvan .1​ 

First let me thank you for posting.

Could you please provide the GDB client and server log, so I be able to further analyze the issue.

Kind regards,

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

AScha.3
Chief II

i have similar problem: in debug / beakpoint no more variables shown at all ! shows declaration as if its in C editor mode. live expressions also no more working...just error msg.

see:

0693W00000WIB43QAH.pngand blue -> detail:

0693W00000WIB4DQAX.pngis still same, when on OpenOCD instead of ST-LINK GDB-server.

problem maybe here:

0693W00000WIB6xQAH.png or here, the root of all evil ?

0693W00000WIBMqQAP.png and view expressions is now :

0693W00000WIBtuQAH.png 

what can i do now , to get it working again ?

If you feel a post has answered your question, please click "Accept as Solution".
AScha.3
Chief II

Java in linux system seem ok, all up to date.

$ java -version

openjdk version "1.8.0_332"

If you feel a post has answered your question, please click "Accept as Solution".
mattias norlander
ST Employee

To analyze this further we need full log-files. Not only screenshots.

  • GDB traces
  • ST-LINK GDB server log-file

Is it even possible for you to share the projects with us? Would they be possible to run on an ST board? ... Hard to re-produce this issue!

What if you create a new debug configuration in the project with issues?

What if you create a new project, do you still have the same problem?

If same issue in a new project, then what if you change workspace?

Same problem? Re-installation of CubeIDE?

... Trying to go from a narrow scope to a wider scope to understand the issue.

Kind regards, Mattias

AScha.3
Chief II

thx for your answer , Mattias .

-- even hard to describe all the "symptoms". ��

+

just some "impressions" from last days:

  • debug session start is/was at "main" (default). now it shows a line in startup.s file -- but running.
  • switching from "C/C++" to Cube/configuration perspective was always perfect (on this linux system), now looks like IDE "forgot" something: switch to xx.ioc file opens big window for Cube/configuration perspective, renders chip picture and left menu - then switch back to "C/C++" perspective , but showing chip/Cube in center "C" editor window. click on "MX" then opens big Cube window again, as it did before. (since CubeIDE 1.0.0. to 1.10.1 Build: 12716_20220707_0928 it worked without such problem ).
  • opening an old (test) project, with F303 cpu, nothing changed, just click "debug" , shows same behaviour : debug running, but on stop cannot see actual variables, just declaration, as in "C/C++" perspective.
  • so seems not a problem with the H743 project, more a problem in IDE /java scripts.
  • maybe has any relation to the problem, that came after update to CubeIDE 1.10.1 : no more building , just error msg. see here:
  • https://community.st.com/s/feed/0D53W00001fQbmMSAS

 i installed older toolchain (gnu-tools-for-stm32.9-2020-q2-update), then working again.

i suppose, this actual problem is not to reproduce, because something happened in the IDE, similar a crash. I closed IDE , restart, looks ok. But was not really ok....

next i try to find some log files... and as test: make new project, as you recommend.

If you feel a post has answered your question, please click "Accept as Solution".
AScha.3
Chief II

ok, big problem found : sitting at keyboard . ��

for a speed test, i changed in a test project many optimizer and other setting, just also debug:

0693W00000WIQP1QAP.pngfor some (idiot) reason, seems all projects got changed settings.... so turn to standard:

0693W00000WIQPaQAP.pngnow variables shown in debug session again and start at "main" again.

other (small) problems with curious window switching in IDE still there.

need a beer now.

If you feel a post has answered your question, please click "Accept as Solution".
wvan .1
Associate

Dear Matthias, Ascha3,

Thanks for responding to my question on this forum. Un fortunately I am not able to share the code/project in which this problem occurred. I have however the following additional remarks:

  1. I was using a 'blue pill' as hardware (STM32F103C8T6)
  2. I could circumvene the problem by initializing the variables in the 'user code 2' section (in main just before while(1) section). If I initialize the varibles in the declaration itself ('User code PV' ) the problem remains.
  3. In a later, completely new started project, i do not have this problem.
  4. As already mentioned I am using Windows 10, not Linux.

I am not a proficient SDK specialist and do not know how to extract the GDB log files.

Friendly regards Willem