Dart Editor not launching referenced project - dart

In project a's pubspec, I have this code to import stuff from project b:
dependencies:
project_b:
path: /home/vilix/Program Files/Dart/workspace/project_b
project_b is a library and so everything is in a lib forlder. After saving pubspec from project_a, Pub Get starts working and get's all the dependencies (even devendencies needed for project_b) to project_a. After I try launching it, nothing really happens (only two lines in the console about starting pub serve and loading source assets) and after about 30 seconds the console says that there is exhausted heap space. In interval of about 5 seconds it tries to allocate more and more. After 96 bytes a warning dialog pops out saying: Could not start pub serve or connect to pub
Console output:
--- 9:06:37 PM Starting pub serve : project_a ---
Loading source assets...
Exhausted heap space, trying to allocate 48 bytes.
Exhausted heap space, trying to allocate 64 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 96 bytes.
Unhandled exception:
Out of memory
Please note that I am not even using any of those packages, just having it in pubspec.yaml file and in packages folder of project_a.
pubspec.yaml of project_a
name: sample
description: A sample web application
dependencies:
project_b:
path: /home/vilix/Program Files/Dart/workspace/project_b
pubspec.yaml of project_b
name: project_b
version: 0.0.1+11
author: name + email
description: description
homepage: homepage
environment:
sdk: '>=1.6.0'
dependencies:
browser: '>=0.10.0+2 <0.11.0'
crypto: '>=0.9.0 <1.0.0'

I have the same problem if one of my packages has a symbolic link to packages.
Apparently pub goes into an endless loop.
I have opened a bug report:
https://code.google.com/p/dart/issues/detail?id=21031
Might not be your problem.

Sounds very similar to this issue http://dartbug.com/21006 or http://dartbug.com/19659.

Related

MikTex, package miktex-latex could not be installed

I "upgraded" from Windows 10 to Windows 11, and my MikTex developed problems. It still works, but gives this warning:
======================================================================
starting package maintenance...
installation directory: C:\Users\ccc31\AppData\Local\Programs\MiKTeX
package repository: https://mirror2.sandyriver.net/pub/ctan/systems/win32/miktex/tm/packages/
package repository digest: 01f4511dd3ba7934c7348b504d466b34
going to download 1262 bytes
going to install 4 file(s) (1 package(s))
downloading https://mirror2.sandyriver.net/pub/ctan/systems/win32/miktex/tm/packages/miktex-latex.tar.lzma...
0.00 MB, 0.03 Mbit/s
Unfortunately, the package miktex-latex could not be installed.
Please check the log file:
C:\Users\ccc31\AppData\Local\MiKTeX\miktex\log\pdflatex.log
======================================================================
I noticed from my settings file it says the OS is Windows 10. Here is a portion of my settings file:
ReportDate: 2023-01-31 16:00:55
CurrentVersion: 20.7
SetupDate: 2022-12-19 12:42:00
SetupVersion: 20.6.29
Configuration: Regular
GitInfo: d26133b / 2020-07-31 18:20:50
OS: Windows 10 Home, 64-bit, build 22621
SharedSetup: no
LinkTargetDirectory: C:\Program Files\MiKTeX\miktex\bin\x64
PathOkay: yes
LastUpdateCheck: 2023-01-31 15:48:30
LastUpdate: 2023-01-31 15:49:21
LastUpdateDb: 2023-01-31 15:50:42
SystemAdmin: yes
RootPrivileges: no
AdminMode: no
In trying to troubleshoot this problem, I noticed that I had Miktex in \Program Files and also in AppData\Local\Programs. I am a long time user of latexpdf, so it wouldn't surprise me to learn that I had installed it multiple times in multiple locations.
Any hints on how to diagnose the warning, and how to fix it? Thanks.

Amazon Device Messeging (ADM) 1.1.0 IncompatibleClassChangeError Exception

After I apply the 1.1.0 adm to our app, some devices crash by the exception "java.lang.IncompatibleClassChangeError"
I cannot reproduce this error on the some Fire devices,
but the crash report says so.
I applied the the gradle setting from the manual.
so the adm jar was not included in the apk, I think so.
compileOnly files('libs/amazon-device-messaging-1.1.0.jar')
not all the device, but Sepcially the Fire 7 2019, Fire hd 8 2018 are the major crashed devices.
Here is the detail crash log
Fatal Exception: java.lang.IncompatibleClassChangeError: Structural change of com.amazon.device.messaging.ADMMessageReceiver is hazardous (/data/app/com.xxxx-1/oat/arm/base.odex at compile time, /system/priv-app/DeviceMessagingAndroidSDK/oat/arm/DeviceMessagingAndroidSDK.odex at runtime): Instance field count off: 0 vs 3
Lcom/amazon/device/messaging/ADMMessageReceiver; (Compile time):
Static fields:
Instance fields:
Direct methods:
<init>()V
<init>(Ljava/lang/Class;)V
<init>(Ljava/lang/Class;I)V
Virtual methods:
onReceive(Landroid/content/Context;Landroid/content/Intent;)V
registerIntentServiceClass(Ljava/lang/Class;)V
registerJobServiceClass(Ljava/lang/Class;I)V
Lcom/amazon/device/messaging/ADMMessageReceiver; (Runtime):
Static fields:
Instance fields:
I mJobId
Z mServiceClassIsJob
Ljava/lang/String; mServiceClassName
Direct methods:
<init>()V
<init>(Ljava/lang/Class;)V
<init>(Ljava/lang/Class;I)V
Virtual methods:
onReceive(Landroid/content/Context;Landroid/content/Intent;)V
registerIntentServiceClass(Ljava/lang/Class;)V
registerJobServiceClass(Ljava/lang/Class;I)V
(declaration of 'com.xxxx.adm.ADMReceiver' appears in /data/app/com.xxxx-1/base.apk)
We have resolved the issue.
It's because of the missed configuration in the build.gradle.
compile fileTree(include: ['*.jar'], dir: 'libs')
...
compileOnly files('libs/amazon-device-messaging-1.1.0.jar')
We used the same libs directory for the ADM,
so the stubed jar was included in the game apk.
The configuration compile fileTree(include: ['*.jar'], dir: 'libs') caused the issue.
We changed the adm jar's directory from libs to libs2 and that has solved the problem.

Probable bug in java compiler for openjdk8, how to report and get it fixed?

I've prepared docker image that demonstrate the problem:
https://drive.google.com/uc?id=1i04_dVL0Rp5rxXCMuHaS4LYREkZjAAW1&export=download
This image is basically alpine:3.11 + apk add openjdk8 maven + my maven project containing sample minimal java class that shows problem
Which you can try with following commands:
# docker load -i bugexample.img
# docker run -w /root/bug-example --name bugtest bugexample /bin/ash build-until-sha-different.sh
If you are lucky enough (sometimes require several attempts) you will get following output:
Found! Sha1 of two subsequent otherwise identical builds are different!
--- 1.sha1
+++ 2.sha1
## -1,3 +1,3 ##
d8d46555c93da579adefc629f1764965a5493edb com/SimpleBug$1.class
75007242aab1e1877d24124d432cb246a79476a8 com/SimpleBug$SimpleBugBuilder.class
-23e8d0ea909b95a7955e0ec0adb4d12ae2193dd1 com/SimpleBug.class
+6a303d69d3f382b23ca04caee4102ee1cd7151e3 com/SimpleBug.class
The core issue with this build is that it produce different bytecode almost each time it get build even though nothing else (neither environment, nor code itself) had changed.
When I do compare these different class files I see that they differ in one single byte:
# cmp -lb 1_SimpleBug.class 2_SimpleBug.class
4053 66 6 65 5
Digging deeper into class file structure I've found that this difference come from stackmapframe constant pool pointers (StackMapTable attribute -> stack_map_frame entry with tag Object_variable_info -> cpool_index)
1_SimpleBug.class
#35 = Utf8 supSetStringParameter10
#36 = Utf8 Lcom/google/common/base/Supplier;
2_SimpleBug.class
#35 = Utf8 supSetStringParameter10
#36 = Utf8 Lcom/google/common/base/Supplier;
So one file points to #35 and another to #36. I don't think this is correct behavior.
I would like to sumbit this to a proper issue tracker but I don't know how to do that since all related JDK trackers are for devs only.
# java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (IcedTea 3.15.0) (Alpine 8.242.08-r0)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
# mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/share/java/maven-3
Java version: 1.8.0_242, vendor: IcedTea, runtime: /usr/lib/jvm/java-1.8-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-1050-kvm", arch: "amd64", family: "unix"
And here is archive with java project:
https://drive.google.com/uc?id=1ZBdRzUk00QtpkGGnKAzipMjMtcnkKGN4&export=download
Well... The Mountain in Labour...
All of this was for nothing. Maven was main culprit. First time I ran my build it downloads lots of stuff that maven require (apart from my project dependencies) and then start compilation in same jvm. Second time build runs there is no need to download so compilation starts immediately. I don't know exactly why but first invocation of compiler is somehow affected by state of the jvm and this cause it to produce slightly different bytecode.
Solution was to add <fork>true<fork> to my pom.xml file and build now is totally reproducible... though takes ~2x more time :)
I still believe that this should not happen even if initial compilation happened inside maven jvm, and it may still be topic for improvement in javac but this "workaround" is acceptable.

Executing a dart application prints errors to console

I am using Dart Editor|
Dart Editor version 1.10.0.dev_01_01 (DEV)
Dart SDK version 1.10.0-dev.1.1
I open polymer_snippet and run the app and it executes as expected.
I attempted to run epimss_app but it does not run and displays the following errors to Tools Ouput (console)
--- 1:20:06 PM Starting pub serve : polymer_snippet ---
Loading source assets...
The null object does not have a getter 'pubspec'.
NoSuchMethodError: method not found: 'pubspec'
Receiver: null
Arguments: []
dart:core Object.noSuchMethod
e:\b\build\slave\dart-editor-win-dev\build\dart\sdk\lib\_internal\pub\lib\src\barback\dependency_computer.dart 48 DependencyComputer.DependencyComputer.<fn>
dart:collection SetMixin.every
e:\b\build\slave\dart-editor-win-dev\build\dart\sdk\lib\_internal\pub\lib\src\barback\dependency_computer.dart 47 DependencyComputer.DependencyComputer
e:\b\build\slave\dart-editor-win-dev\build\dart\sdk\lib\_internal\pub\lib\src\barback\load_all_transformers.dart 33 loadAllTransformers.<async>
dart:isolate _RawReceivePortImpl._handleMessage
This is an unexpected error. Please run
pub --trace 'serve' 'web' '--port' '8080' '--admin-port' '49923' '--hostname' 'localhost'
and include the results in a bug report on http://dartbug.com/new.
I tried to run polymer-snippet again with the same result. I closed Dart Editor did a pub cache repair and attempted running either application again with the same result.
The GUI (if dart-eclipse-editor is used) says Error Launching application - Could not start pub serve or connect to pub.
Why is this happening? I would expect to be able to change from one dart app to another and run either without any issues.
Thanks

Error occurs in jenkins build of unity

Machine:Mac
UnityVer:4.6.2
error of the following will appear when you have made a jenkins build of unity.
----- Total AssetImport time: 6.818127s, AssetImport time: 6.808909s, Asset hashing: 0.005416s [60.9 KB, 10.972655 mb/s]
Platform assembly: /Applications/Unity4.6.2/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/System.Data.dll (this message is harmless)
System memory in use before: 71.7 MB.
Unloading 137 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
System memory in use after: 66.8 MB.
Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 6940.
Total: 18.863014 ms (FindLiveObjects: 0.248059 ms CreateObjectMapping: 0.096515 ms MarkObjects: 1.745080 ms DeleteObjects: 0.012070 ms)
Scripts have compiler errors.
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Utilities/Argv.cpp Line: 127)
Aborting batchmode due to failure:
Scripts have compiler errors.
Thread 'UnityLookForNewInputDevices' is still running!
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Threads/Thread.cpp Line: 68)
Thread was not cleaned up!
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Threads/Posix/PlatformThread.cpp Line: 45)
FATAL: Unity3d command line execution failed with status 1
Build step 'Invoke Unity3d Editor' marked build as failure
FTP: Current build result is [FAILURE], not going to run.
Finished: FAILURE
Try search "error" in Jenkins console output. It's very easy to overlook what actually causing build fail. The error show in the bottom of console output is the result. The useful information is where all warnings and errors are shown like you normally see in IDE like visual studio. I spend a whole afternoon found out I should always use Control + F instead of my eyes to search through things like Jenkins console output.
The output shows you the problem: you have script errors. Until you fix your script errors, you won't be able to build.
You haven't included the script errors, so no-one can give you any more info. When you fix them, you'll probably find that it's nothing to do with Jenkins, and the question title is unrelated.
Usual causes of this:
You have some editor scripts in you project
You forgot to put #if guards around editor scripts and/or external scripts
You forgot to copy/paste one of your 3rd party libraries or plugins onto the machine where you're doign the build - and it's not in source control already (where it should be).

Resources