cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing data from a constantly crashing STM32CubeIDE

AWu
Associate II

Dear experts,

I have started with STM32CubeIDE (tried 1.0.0 and 1.0.1) on Xubuntu Linux. After generating code and trying to open main.c I'm getting error messages telling me that no more handles were available and there were "SWT errors". The IDE suggests these were non-recoverable errors and I should exit and restart the IDE (no other options, anyway). Following this recommendation, I'm immediately caught in the same endless loop, unable to access my work.

While after some googling, I conclude that this is an Eclipse related editor problem, I suppose that preventing the IDE to automatically open any file with the internal editor might do the trick that I could at least complete the MCU configuration and then take my code to a different IDE (MSVSC with Platformio Plugin intended), other than restarting from scratch and avoiding to open any file within the IDE.

Any clues where the list of files to be opened is stored (or how to fix the underlying Eclipse related problem)? Is there a way to specify an external editor?

Thanks for your help!

Wolfgang

Edit: Here is a snippet from the logfile:

!SESSION 2019-06-22 22:04:35.098 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_202
java.vendor=AdoptOpenJdk
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64
 
This is a continuation of log file /home/[user]/STM32CubeIDE/[project_name]/.metadata/.bak_0.log
Created Time: 2019-06-22 22:05:30.692
 
!ENTRY org.eclipse.ui 4 0 2019-06-22 22:05:30.692
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTError: No more handles
	at org.eclipse.swt.SWT.error(SWT.java:4725)
	at org.eclipse.swt.SWT.error(SWT.java:4614)
	at org.eclipse.swt.SWT.error(SWT.java:4585)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:530)
	at org.eclipse.swt.widgets.Control.drawBackground(Control.java:219)

4 REPLIES 4
Markus GIRDLAND
ST Employee

Does this always happen after you generate code and try to open main.c? And with every project?

Or do you have a reliable way to recreate it?

You should be able to clear cache of the workspace by by going to:

$workspace_path\.metadata\.plugins\org.eclipse.cdt.core

and delete all the .pdom files. It is important that STM32CubeIDE is shut down while doing this, though.

File association can be accessed through [Windows -> Preferences -> STM32Cube -> File Association] as well as [Windows -> Preferences -> General -> Editors -> File Associations].

Edit: Removed TrueSTUDIO for STM32CubeIDE, some habits die hard 🙂

Hi Markus,

deleting the file (in my case, changing the extension) the doesn't help, unfortunately. The error is happening as before and the .pdom file is recreated.

Deleting all the contents of the directory also does not help. All files just are recreated.

The described problem is happening every time, as soon as I'm trying to open any file after I have generated code.

AWu
Associate II

Not a solution, but a workaround (as it does not provide recovery of existing data, it only prevents the problem to occur in a new project):

The SWT Error Issue indeed seems to be associated with the internal editor of Eclipse, as defining a file type *.c and associating it with an external editor (e.g. Scite) seems to help. One has to do it before a generated file is opened.

0690X000008jGbAQAU.png

AWu
Associate II

The issue is probably solvable:

Ibus, a standard accessory for multi language support in Linux, and Eclipse are conflicting. After removing ibus, the problem was gone.

As a fix (hopefully),

export GTK_IM_MODULE=ibus

before starting the IDE seems to do the trick.

I then created a script to start STM32CubeIDE:

#!/bin/sh
 
# for ibus, to prevent problems with eclipse based programs 
# e.g. STM32CubeIDE
 
# Kudos:
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=542675, comment 10
# https://community.st.com/s/question/0D50X0000BFwKKFSQ3/unhandled-event-loop-exception
# https://wiki.archlinux.org/index.php/IBus#Use_xinitrc_to_export
 
export GTK_IM_MODULE=ibus
 
/opt/st/stm32cubeide_1.0.1/stm32cubeide