java.lang.IllegalArgumentException thrown at debug launch in Eclipse CDT - c

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.

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.

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.

Related

Apex replay debugger is throwing Java 8 is required to run

I am following this trail and I have completed all the steps correctly. Even I able to download the debug logs.
But Problem occurs when I am trying to run the following command
> SFDX: Launch Apex Replay Debugger with Current File
It shows the below error.
But, the thing is, I have jdk-12.0.1 installed on my PC. After that, I have installed the Java 8 also and thus jdk-1.8.0_181 is also installed.
My Java Home setting in VS code is following
I have also restarted my PC, But no luck. It is throwing the same error.
How to solve this ?
You have to set the path as 'C://Program Files//Java//jdk1.8.0_181' and then restart the vs code
In case any Mac users needed help:
I installed Java 11 and then ran this code:
/usr/libexec/java_home -v 11 to find the exact directory and then pasted it in the user settings you have marked with a red rectangle. Then I restarted VS code and it worked.
Edit: Looked at your screenshots...
You did this: C:\Program Files\Java\jdk1.8.0_181
You wanted this: C:/Program Files/Java/jdk1.8.0_181
From the Trailhead unit you linked:

Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index

Android Studio 3.4.
Project SDK (Android API 19 Platform).
Not using FindBugs or SpotBugs.
Every attempt to build, I get this error:
Information:9/05/2019 4:02 PM - Compilation completed with 1 error and 0 warnings in 1 s 763 ms
Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
java.lang.ClassNotFoundException: com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.intellij.util.indexing.counters.IndexCounters.<clinit>(IndexCounters.java:34)
at com.intellij.util.indexing.impl.MapReduceIndex.<init>(MapReduceIndex.java:86)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex$CompilerMapReduceIndex.<init>(CompilerReferenceIndex.java:214)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex.<init>(CompilerReferenceIndex.java:73)
at org.jetbrains.jps.backwardRefs.JavaCompilerBackwardReferenceIndex.<init>(JavaCompilerBackwardReferenceIndex.java:12)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexWriter.initialize(JavaBackwardReferenceIndexWriter.java:74)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexBuilder.buildStarted(JavaBackwardReferenceIndexBuilder.java:40)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:358)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:135)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:229)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Solved for me, finally, after months. Note that I have never used FindBugs or SpotBugs, although most posts related to this error mention it.
The solution is to change the compiler from javac to Eclipse. I followed the picture here (don't worry if you don't read Chinese; you won't need to; the picture just makes it clear how to change the compiler).
I have no idea why this works and would highly appreciate informed commentary.
I am facing the same issue with android studio 3.4 and 3.4.1 as well but this work fine with android studio 2.3.3 and 3.0 as well.
Bug seems to be in Android Studio 3.4.x so I downloaded beta version of Android Studio 3.5 and error is gone.
You can download preview version from here :
https://developer.android.com/studio/preview/index.html
Partial and temporary fix.
I downgraded Android Studio to 2.3.3 (!) and it worked. I will need to track down what is hard-linking the project to this particular version and fix that, but I need to ship a fix now for the issue at hand.
I get this error message in a Flutter project, when I try to build the project (menu Build/Make Module) whith Android Studio 3.4.2. But I don't get the error when I run the app (menu Run/Run). Running the app does build the project correctly. It seems that menu Build/Make module does not build the app correctly...
So, the solution for me is to run the app, not build it ;-)
Solution
I was able to fix this problem by deleting the system subfolder in Android Studio's configuration folder. No user data is lost and the build starts working again!
Android Studio configuration folder can be found under this locations (for more information see this question):
Linux / MacOSX: /home/USERNAME/.AndroidStudio
Windows: C:/Users/USERNAME/.AndroidStudio
Note that the name of the configuration folder can vary based on the version: it could be .AndroidStudio3.5, .AndroidStudioBeta or others.
Cause
This problem is most probably caused by some corrupted/invalid gradle build files in your project, that cause the system-wide Android Studio configuration to break. So if the problem shows up again after using the solution above, remove cache and build files generated by gradle by following these steps:
./gradlew clean (Linux/MacOS) or .\gradlew.bat clean (Windows): this should work, as it should clean all files generated by gradle.
If you are in a git repository try to remove all untracked files (but please note that this could delete files you want to keep... be sure to commit them first!)
Manually delete build folders, in case the above steps did not work.

KDS -- Error in final launch sequence

I am using Kinetis Design Studio v 3.0 and am trying to launch a C application on my FRDM-K64 board. The project builds just fine; however, when I try to debug, I get this error:
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Don't know how to run. Try "help target".
Don't know how to run. Try "help target".
I haven't a clue why this is happening. Other projects (such as the "bubble" example) launch just fine, and I am using basically the same launch configuration. I'm using Segger J-Link, although I tried using OpenOCD as well and got the same message. Any ideas of how to fix this?
I solved the problem--apparently my software needed to be updated. So if anyone is getting the same error, be sure you have tried checking for updates.

End of script output before headers Apache 2.4 Error

We have just upgraded to Apache 2.4 from 2.2 and our fastcgi apps are now causing the error message 'End of script output before headers'.
All the apps and libraries, which are all in C, have been recompiled using the latest libraries from fastcgi.com and they worked fine before the upgrade.
Any clues as to the cause of the problem would be appreciated.
The server is Fedora 19
As it turned out the problem was with a shared object file that wasn't of the correct version. For some odd reason that error did not show in the log.
So, question should be closed.
As it turned out the problem was with a shared object file that wasn't of the correct version. For some odd reason that error did not show in the log.

Error while starting a GAE/GWT project: Unable to restore the previous TimeZone

When I try to run a GWT App Engine project using the Eclipse plugin, I get the following error:
Initializing App Engine server
[ERROR] Unable to start App Engine server
java.lang.RuntimeException: Unable to restore the previous TimeZone
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:228)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:164)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.NoSuchFieldException: defaultZoneTL
at java.lang.Class.getDeclaredField(Class.java:1899)
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:222)
... 6 more
[ERROR] shell failed in doStartupServer method
Unable to start embedded HTTP server
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:102)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Chris Cashwell provided the correct answer. But for people like myself who are relatively new to Eclipse, here are more explicit instructions (which I came across here):
Right-click project directory in Project Explorer window
Select Run As > Run Configurations...
Go to Arguments tab
In VM Arguments textbox, add one of the following parameters mentioned by Chris:
-Dappengine.user.timezone.impl=UTC (this worked in my case)
-Dappengine.user.timezone=UTC
Click Apply then Run
In my case, this was done specifically in the context of a PlayN project I am working on, so I was right-clicking the HTML folder. In the end, my VM arguments looked something like this:
-Xmx512m -javaagent:/long/path/to/appengine-agent.jar -Dappengine.user.timezone.impl=UTC
See this bug report. For me, it was fixed by downgrading the JDK from 1.7.0_03 -> 1.7.0_02. Other things that have been purported to work are adding -Dappengine.user.timezone=UTC (or in some cases -Dappengine.user.timezone.impl=UTC) to the JVM flags.
i got this error, and found port already in use in the console.
I closed eclipse and killed javaw.exe. Then everything worked fine.

Resources