在 Eclipse CDT 中调试启动时引发 java.lang.IllegalArgumentException

发布于 2024-10-15 14:43:23 字数 2460 浏览 5 评论 0原文

我正在 Windows XP 下使用 Eclipse CDT 和 MinGW 来开发一个小 C 程序,将其自身导出为 JNI 兼容的 DLL。

从 Java 调用调试程序并不容易,因此我在项目中添加了“调试”配置和测试某些功能的 main 方法。

当我启动调试时,我收到这个奇怪的 Java 错误:

An internal error occurred during: "Launching NuanceWrapper.exe".
java.lang.IllegalArgumentException

看起来很像是 Eclipse 内部问题。我在 .metadata 文件夹的 .log 文件中获得了异常的堆栈跟踪:

!ENTRY org.eclipse.core.jobs 4 2 2011-02-04 14:08:31.531
!MESSAGE An internal error occurred during: "Launching Wrapper.exe".
!STACK 0
java.lang.IllegalArgumentException
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.getBundles(PackageAdminImpl.java:571)
    at org.eclipse.core.internal.runtime.InternalPlatform.getBundle(InternalPlatform.java:181)
    at org.eclipse.core.runtime.Platform.getBundle(Platform.java:1416)
    at org.springframework.ide.eclipse.core.BundleStateLocationVariableResolver.resolveValue(BundleStateLocationVariableResolver.java:32)
    at org.eclipse.core.internal.variables.DynamicVariable.getValue(DynamicVariable.java:54)
    at org.eclipse.cdt.internal.core.cdtvariables.EclipseVariablesVariableSupplier$EclipseVarMacro.loadValue(EclipseVariablesVariableSupplier.java:103)
    at org.eclipse.cdt.internal.core.cdtvariables.EclipseVariablesVariableSupplier$EclipseVarMacro.getStringValue(EclipseVariablesVariableSupplier.java:90)
    at org.eclipse.cdt.dsf.gdb.launching.LaunchUtils.getLaunchEnvironment(LaunchUtils.java:385)
    at org.eclipse.cdt.dsf.gdb.launching.LaunchUtils.getGDBVersion(LaunchUtils.java:281)
    at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.getGDBVersion(GdbLaunchDelegate.java:243)
    at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:129)
    at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:83)
    at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:72)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

知道可能是什么问题吗?我真的需要这个调试功能来了解我的代码中的问题。

谢谢您的回答。

I am using Eclipse CDT, with MinGW and under Windows XP, to developp a little C program exporting itself as a JNI-compliant DLL.

Debugging the program from the Java calls is not easy, and thus I added a "Debug" configuration to my project and a main method that tests some functions.

When I launch the debug, i get this weird Java error :

An internal error occurred during: "Launching NuanceWrapper.exe".
java.lang.IllegalArgumentException

It seems very much like it is an internal Eclipse problem. I got the stacktrace of the exception in the .log file of the .metadata folder :

!ENTRY org.eclipse.core.jobs 4 2 2011-02-04 14:08:31.531
!MESSAGE An internal error occurred during: "Launching Wrapper.exe".
!STACK 0
java.lang.IllegalArgumentException
    at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.getBundles(PackageAdminImpl.java:571)
    at org.eclipse.core.internal.runtime.InternalPlatform.getBundle(InternalPlatform.java:181)
    at org.eclipse.core.runtime.Platform.getBundle(Platform.java:1416)
    at org.springframework.ide.eclipse.core.BundleStateLocationVariableResolver.resolveValue(BundleStateLocationVariableResolver.java:32)
    at org.eclipse.core.internal.variables.DynamicVariable.getValue(DynamicVariable.java:54)
    at org.eclipse.cdt.internal.core.cdtvariables.EclipseVariablesVariableSupplier$EclipseVarMacro.loadValue(EclipseVariablesVariableSupplier.java:103)
    at org.eclipse.cdt.internal.core.cdtvariables.EclipseVariablesVariableSupplier$EclipseVarMacro.getStringValue(EclipseVariablesVariableSupplier.java:90)
    at org.eclipse.cdt.dsf.gdb.launching.LaunchUtils.getLaunchEnvironment(LaunchUtils.java:385)
    at org.eclipse.cdt.dsf.gdb.launching.LaunchUtils.getGDBVersion(LaunchUtils.java:281)
    at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.getGDBVersion(GdbLaunchDelegate.java:243)
    at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:129)
    at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:83)
    at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:72)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Any idea what could be the problem ? I really need this debug functionality in order to understand what is wrong in my code.

Thank you for your answers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

内心荒芜 2024-10-22 14:43:24

我查看了堆栈跟踪的不同文件的源代码,这似乎是您的 CDT 项目配置的问题。您应该检查此处的设置并尝试更改它们。

CDT 构建变量之一似乎是错误的。在 LaunchUtils.java,第 390 行,var.getStringValue() 导致了该问题,因为在此变量中( var),其中包含名称和关联值,该值为 null。

希望这有帮助。

I looked at the source code of the different files of your stack trace, and it seems to be a problem with your CDT project's configuration. You should check the settings here and try to change them.

One of the CDT build variables seems to be wrong. In LaunchUtils.java, line 390, var.getStringValue() is causing the issue because in this variable (var), which contains a name and an associated value, the value is null.

Hope this helps.

拥抱没勇气 2024-10-22 14:43:24

有同样的问题。异常堆栈跟踪中的下一个字符串:

at org.springframework.ide.eclipse.core.BundleStateLocationVariableResolver.resolveValue(BundleStateLocationVariableResolver.java:32)

让我想到 SpringSource ToolSuite (或 Spring IDE)可能会导致问题。卸载它及其所有组件后,问题就消失了。

希望这有帮助。

Had the same problem. the next string from the exception stack trace:

at org.springframework.ide.eclipse.core.BundleStateLocationVariableResolver.resolveValue(BundleStateLocationVariableResolver.java:32)

led me to the idea that SpringSource ToolSuite (or Spring IDE) could cause the issue. After uninstalling it and all its components the problem was gone.

Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文