Bug 881 - defect: --sysroot parse problem
Summary: defect: --sysroot parse problem
Status: RESOLVED FIXED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium critical
Target Milestone: 1.0 M4
Assignee: Jessica
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-03-15 22:36 UTC by liping Ke
Modified: 2011-03-24 20:58 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description liping Ke 2011-03-15 22:36:51 UTC
If CFLAGS/CXXFLAGS changed to "--sysroot=....", with no leading space " ", eclipse plugin will meet unexpected exception, because
the matching pattern is " --sysroot" with a leading space " ".


The code can be refined to remove the problem, because it's possible that user might change CFLAGS.


Thanks& Regards,
criping
Comment 1 Lianhao Lu 2011-03-17 01:08:59 UTC
This bug will block poky-tree mode. In the environment files generated by meta-ide-support, there is no --sysroot in FLAGS.
Comment 2 Lianhao Lu 2011-03-17 01:14:35 UTC
(In reply to comment #1)
> This bug will block poky-tree mode. In the environment files generated by
> meta-ide-support, there is no --sysroot in xxFLAGS.

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1949)
	at org.yocto.sdk.ide.YoctoSDKProjectNature.configureAutotoolsOptions(YoctoSDKProjectNature.java:128)
	at org.yocto.sdk.ide.actions.ReconfigYoctoAction.run(ReconfigYoctoAction.java:58)
	at org.yocto.sdk.ide.actions.ReconfigYoctoHandler.execute(ReconfigYoctoHandler.java:29)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3552)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3171)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 3 liping Ke 2011-03-17 01:27:30 UTC
This bug should be fixed by below changeset:

http://git.pokylinux.org/cgit/cgit.cgi/eclipse-poky/commit/?id=9f9267649421422d7901ceb7904bb0e9fdd83dde