IntelliJ IDEA Not Showing Variables In Debug For Kotlin Main Script (main.kts) - kotlin

I am running main.kts Kotlin script in a Kotlin console application project in IntelliJ IDEA. It runs fine, I can debug it too, but don't see any vars or vals defined further up in the script.
Message where the defined values/variables should be displayed is "Variables are not available". If I click around in the stack trace I can see other variables, such as the args that came in the main function of the Kotlin main script.
Any thoughts why declared values and variables cannot be seen in the debugger?
screenshot

MacOS 10.15.6 + IDEA CE 2020.3.1 + JDK adopt-openjdk-1.8 was the platform I experienced this problem upon, from where the screenshot came.
Windows 10 + IDEA CE 2020.3.1 + openjdk-15 did not experience this problem.
I fixed the problem by using adopt-openj9-15 with MacOS 10.15.6 + IDEA CE 2020.3.1. adopt-openj9-15 gives the warning for every main KTS run:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.util.ReflectionUtil (file:/Users/ducksnails/Library/Application%20Support/JetBrains/IdeaIC2020.3/plugins/Kotlin/kotlinc/lib/kotlin-compiler.jar) to method java.util.ResourceBundle.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
JDKs openjdk-15 & adopt-openjdk-15 do no run or debug main.kts scripts, or kts scripts, at all on MacOS 10.15.6 + IDEA CE 2020.3.1. The run / debug button silently becomes disabled, hung, and unavailable.
For the now I'll use adopt-openj9-15 and try to ignore the constant warnings, but I would like to use a JDK that doesn't give the constant warnings, plus see the debug variables.

Related

`vectorResource` throws RuntimeException when ProGuard applies optimizations

I am using Jetpack Compose 1.0.0-alpha09 with Kotlin 1.4.21. I use vectorResource to load an ImageVector from resources.
All works fine in the design previews and for debug builds. However, when I build a release build with ProGuard, I get the following exception at runtime:
org.xmlpull.v1.XmlPullParserException: Binary XML file line #1<VectorGraphic> tag requires viewportWidth > 0
at androidx.compose.ui.autofill.AndroidAutofillDebugUtilsKt.vectorResource(AndroidAutofillDebugUtils.kt:142)
at ...
After a long tedious process trying to identify differences between release and debug which may cause this, I have discovered that disabling optimization in ProGuard using -dontoptimize 'solves' this issue.
What exactly causes this discrepancy in behavior? Is this a bug in, Jetpack Compose, ProGuard, or in my configuration of ProGuard?

Problem building project in IntelliJ 2020.1

I'm trying to build my project but I can't.
I get this error:
Error:Cannot run program "C:\tools\jdk8.0.191\bin\java.exe" (in directory "C:\Users\"my user"\AppData\Local\JetBrains\IntelliJIdea2020.1\compile-server"): Malformed argument has embedded quote: -Djava.endorsed.dirs=\"\"
Do anyone know what to do about this? Iøm trying to build in IntelliJ 2020.1
Best Regards
It might be related to more strict command-line processing in JDK on Windows after JDK-8221858 (private) security patch see this comment for details.
Try following workaround: Help -> Edit Custom VM Options action and add the following line at the bottom of the file: -Djdk.lang.Process.allowAmbiguousCommands=true and restart IDE.

Flash Builder - Platform conversion failed error during release build

This is a very annoying problem while generating release build files. Here is the steps I did while building:
Select Project > Export Release Build
Select Signed Native Installer
Import certificate
Click Next.
I always got the following error:
https://forums.adobe.com/servlet/JiveServlet/showImage/2-6524012-651585/build_error.png
Platform conversion failed. Process exited with error 5. Output was
"[ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2
text="Unhandled exception Error: EndUpdateResource: Windows Error #5"
errorID=0]
I have the following setup:
OS: Windows 8.1
System type: 64-bit
Flash Builder Version: 4.6 Premium
Installed FB: FlashBuilder_4_6_LS10.exe
Please help. This is giving me a lot of headaches for a couple of days now.
Additionally, here's the stack trace:
java.io.IOException: Platform conversion failed. Process exited with
error 5. Output was "[ErrorEvent type="error" bubbles=false
cancelable=false eventPhase=2 text="Unhandled exception Error:
EndUpdateResource: Windows Error #5" errorID=0] " at
com.adobe.air.nai.NativePackager.conversionFail(NativePackager.java:222)
at
com.adobe.air.nai.NativePackager.invokePlatformConversion(NativePackager.java:203)
at
com.adobe.air.nai.NativePackager.createPackage(NativePackager.java:92)
at
com.adobe.flexbuilder.multisdk.apollo.export.AIRNativeInstallerPackager.create(AIRNativeI
nstallerPackager.java:129) at
com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionManager.doExport(Ex
portReleaseVersionManager.java:586) at
com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard$1.run(Exp
ortReleaseVersionWizard.java:208)
I also suspect this is because of the following settings:
Eclipse.ini
https://forums.adobe.com/servlet/JiveServlet/showImage/2-6525217-651726/eclipse.png
...
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher_library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502.jar
...
Notice that the plugin used is not intended for x64 processors.
#ActionScript3030 is correct, for anyone finding this later on, if you re-link your Library Paths (even if they look correct) this should rectify your issue.
The issue is caused by the links not being able to resolve to their GUID counterparts in your AppData/Local folder. This happens quite commonly when you create a new user profile and try to copy over your old user profiles information.
I already figured this out. I created a virtual machine with windows 7 32bit operating system and I'm happy now :)
If you initially created your project on a different system then try to compile it in another system, the class source and swc paths may not match. These paths could be there but not being implemented in code, so you will not get any run time errors while debugging, but it will give you the error 5 during compilation.
Solution:
Remove the idle paths not directly in use in your code. You can identify them by simply checking the path.
Found the same issue when trying to use Microsoft Essential Security on my Windows 7 x32. When i uinstall it - problem gone. So try to check your firewall settings if stucking the same problem.
Just to add an alternative solution (I'm on an x64 Windows and want to keep build exported for x64), in my case the error popped up when building the project with the AIR SDK defined in the app.xml (an older one, 3.9) and went away when I explicitly used a newer SDK (19).
(Disclaimer: I used the command line adt tool from the SDK to build, not Flash Builder).
A little late, but might possibly help someone.
I had the same error recently with FlashDevelop. Figured out that the my path was too long. When I renamed some long folder and file names, the error disappeared.
Try to disable UAC on Windows 8. Change it to "Never notify". The problem

ANTRL4: TestRig error

I am just trying to get ANTLR to run following those instructions: http://www.antlr.org/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4
The grammar is translated into code, but when I want to call TestRig, I'm getting the error "Can't load Hello as lexer or parser".
TestRig is located in file C:\bin\grun.cmd and contains this command
java -cp .;C:\LIBS\Java\ANTLR\antlr-4.1-complete.jar
org.antlr.v4.runtime.misc.TestRig %1 %2
Is anything wrong with that?
When I try to start TestRig from the ANTLWorks IDE I'm receiving warnings like:
warning: Supported source version 'RELEASE_6' from annotation
processor
'org.netbeans.modules.openide.modules.PatchedPublicProcessor' less
than -source '1.7'
warning: Supported source version 'RELEASE_6' from
annotation processor
'org.netbeans.modules.openide.util.ServiceProviderProcessor' less than
-source '1.7'
warning: Supported source version 'RELEASE_6' from annotation processor
'org.netbeans.modules.openide.util.NamedServiceProcessor' less than
-source '1.7'
warning: Supported source version 'RELEASE_6' from annotation processor
'org.netbeans.modules.openide.util.NbBundleProcessor' less than
-source '1.7'
and errors like:
line 1:7 token recognition error at: ' '
...........
line 1:0 missing 'hello' at 'grammar'
On Linux I'm experiencing another problem with ANTLRWorks2:
For whatever reason the menu bar doesn't work so that it's impossible to select anything from there. Anyway, clicking on an icon below the menu bar works.
What might be wrong here? Thanks for any help.
Almost a year late on this but in case others have the issue...
I am guessing you named your grammar file 'hello' instead of 'Hello' or you didn't copy the contents correctly.
https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4
The warnings about 'RELEASE_6' are supposedly harmless according to this bug report.
https://netbeans.org/bugzilla/show_bug.cgi?id=210286
I am still getting these warnings in ANTLRWorks2.1. According to the final post it may be fixed in the NetBeans plugin. However, as far as I can tell this plugin has been recently broken.
I can't help you with IDE issues on Linux.

Objective C error messages

I'm trying to debug an objective C program. It used to run, and I'm not sure what changes could have broken it, but it no longer runs at all. In the debugger, I now get:
.
.
.
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
unable to read unknown load command 0x80000022
Program loaded.
sharedlibrary apply-load-rules all
run
Error calling thread_get_state for GP registers for thread 0x16131lx506^error,msg="error on line 207 of \"/SourceCache/gdb/gdb-908/src/gdb/macosx/i386-macosx-nat-exec.c\" in function \"fetch_inferior_registers\": (os/kern) invalid argument (0x4)\n"
I've seen several places that claim te explain the 1st warning, but none of them seem appropriate. Nothing online claims to explain the error.
Any clues as to what these errors mean in conjunction?
ETA: I just upgraded to 10.6, so it may have started then, although I'm compiling to target 10.4...
Is this relevant? From the Xcode release notes:
Note: GCC 4.2 cannot be used with the
Mac OS X 10.4u SDK. If you want to
build targets using the 10.4u SDK on
Xcode 3.2, you must set the Compiler
Version to GCC 4.0