Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single whitespace in checkbox entry causes assertion failure #97

Open
EmergReanimator opened this issue Apr 29, 2021 · 0 comments
Open

Comments

@EmergReanimator
Copy link

There is a small bug in configuration parser.
It causes an assertion failure like one at the bottom.

The reason to assert is single whitespace between checkbox entry name and it value.
So in the example below the CAN0_ENABLED could be controlled in CMSIS Configuratzion Wizard, but CAN1_ENABLED causes the assertion failure message with CMSIS Config 2.6.0.202005271109;

// <<< Use Configuration Wizard in Context Menu >>>

// <e>CAN0 configuration enable
// ============================
//
// <i> Enables CAN0 configuration.
#ifndef CAN0_ENABLED
 #define CAN0_ENABLED  1
#endif
// </e>

// <e>CAN1 configuration enable
// ============================
//
// <i> Enables CAN1 configuration.
#ifndef CAN1_ENABLED
 #define CAN1_ENABLED 1
#endif
// </e>

// <<< end of configuration section >>>
eclipse.buildId=unknown
java.version=11.0.5
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments:  -os linux -ws gtk -arch x86_64

org.eclipse.jface
Error
Thu Apr 29 18:01:55 CEST 2021
Problems occurred when invoking code from plug-in: "org.eclipse.jface".

org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:113)
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:99)
	at com.arm.cmsis.parser.ConfigWizardParser.updateDocument(ConfigWizardParser.java:1158)
	at com.arm.cmsis.parser.ConfigWizardParser.updateBooleanValue(ConfigWizardParser.java:996)
	at com.arm.cmsis.parser.ConfigWizardParser.updateModel(ConfigWizardParser.java:979)
	at com.arm.cmsis.config.editors.ConfigEditor$ConfigColumnAdvisor.setCheck(ConfigEditor.java:654)
	at com.arm.cmsis.pack.ui.tree.AdvisedEditingSupport.setValue(AdvisedEditingSupport.java:161)
	at org.eclipse.jface.viewers.EditingSupport.saveCellEditorValue(EditingSupport.java:116)
	at org.eclipse.jface.viewers.ColumnViewerEditor.saveEditorValue(ColumnViewerEditor.java:446)
	at org.eclipse.jface.viewers.ColumnViewerEditor.applyEditorValue(ColumnViewerEditor.java:312)
	at org.eclipse.jface.viewers.ColumnViewerEditor$1.applyEditorValue(ColumnViewerEditor.java:165)
	at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:335)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:332)
	at org.eclipse.jface.viewers.CheckboxCellEditor.activate(CheckboxCellEditor.java:89)
	at org.eclipse.jface.viewers.CellEditor.activate(CellEditor.java:897)
	at org.eclipse.jface.viewers.CheckboxCellEditor.activate(CheckboxCellEditor.java:135)
	at org.eclipse.jface.viewers.ColumnViewerEditor.activateCellEditor(ColumnViewerEditor.java:212)
	at org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorActivationEvent(ColumnViewerEditor.java:435)
	at org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivationEvent(ColumnViewer.java:680)
	at org.eclipse.jface.viewers.ColumnViewer.handleMouseDown(ColumnViewer.java:655)
	at org.eclipse.jface.viewers.ColumnViewer.access$0(ColumnViewer.java:651)
	at org.eclipse.jface.viewers.ColumnViewer$1.mouseDown(ColumnViewer.java:100)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:196)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5687)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1423)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4955)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4448)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant