[Android release build issue] -  Exception: AOT snapshotter exited with code 9  (android_aot_release_android-arm64 failed)

I have issues making release builds for one of my flutter application for android. The app works fine in debug mode in both the simulators and actual devices. But when I try to run in Release mode or try building it for a store release, both crashes with the following error
[ +10 ms] [+268305 ms] Dart snapshot generator failed with exit code -9
[ +29 ms] [  +21 ms] Target android_aot_release_android-arm64 failed:
 Exception: AOT snapshotter exited with code -9
[   +1 ms] build failed.

I have been stuck with this for the last few hours and nothing seemed to work. I tried removing external plugins, changing Flutter/Gradle and Android SDK versions. It throws the same error again and again.
So I started commenting out my Widgets one by one for the last few hours and found the issue. And it's baffling me.
In one of my widget, I have this code
final uniqOrderId = widget.lists.where((element) => element.orderId != null).map((cart) => cart.orderId).toSet();
if (uniqOrderId.length > 0){
	final order = await Order().find(uniqOrderId.elementAt(0));
	return order;
}

It suddenly started working after commented out the above part, specifically final order = await Order().find(uniqOrderId.elementAt(0));
It seems fine and works fine in debug environments without even throwing a warning. But it fails on release builds.
So I changed the method  .elementAt(0) to .first and the release builds started working without an issue.
I am confused and curious why flutter build behaves this way.

What's wrong with elementAt and why the IDE doesn't show any warning or errors if there is an issue?
Why the compiler doesn't throw an error when running in debug mode?
Why the release builds just throws  Exception: AOT snapshotter exited with code -9 but doesn't show any meaningful message to debug?

I am really confused and curious about this issue? any ideas?
Heres the full stack trace
   +1 ms] [   +1 ms] aot_android_asset_bundle: Complete
[+268439 ms] [  +59 ms] Persisting file store
[  +12 ms] [  +30 ms] Done persisting file store
[        ] [  +19 ms] "flutter assemble" took 2,88,729ms.
[  +10 ms] [+268305 ms] Dart snapshot generator failed with exit code -9
[  +29 ms] [  +21 ms] Target android_aot_release_android-arm64 failed: Exception: AOT snapshotter exited with code -9
[   +1 ms] build failed.
[        ] #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
[        ] #1      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:197:7)
[        ] #2      _rootRunUnary (dart:async/zone.dart:1192:38)
[        ] #3      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[        ] #4      _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[        ] #5      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[        ] #6      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[        ] #7      Future._completeWithValue (dart:async/future_impl.dart:526:5)
[        ] #8      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[        ] #9      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[   +1 ms] #10     BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1192:38)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[        ] #13     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[        ] #14     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[        ] #15     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[        ] #16     Future._completeWithValue (dart:async/future_impl.dart:526:5)
[        ] #17     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[        ] #18     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[        ] #19     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart)
[        ] #20     _rootRunUnary (dart:async/zone.dart:1192:38)
[        ] #21     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[        ] #22     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[        ] #23     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[   +1 ms] #24     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[        ] #25     Future._completeWithValue (dart:async/future_impl.dart:526:5)
[        ] #26     Future.wait.<anonymous closure> (dart:async/future.dart:402:22)
[        ] #27     _rootRunUnary (dart:async/zone.dart:1192:38)
[        ] #28     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[        ] #29     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[        ] #30     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[        ] #31     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[        ] #32     Future._completeWithValue (dart:async/future_impl.dart:526:5)
[        ] #33     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[        ] #34     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[        ] #35     _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart)
[        ] #36     _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:86:61)
[        ] #37     _rootRunBinary (dart:async/zone.dart:1204:38)
[        ] #38     _CustomZone.runBinary (dart:async/zone.dart:1093:19)
[        ] #39     _FutureListener.handleError (dart:async/future_impl.dart:155:20)
[        ] #40     Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47)
[        ] #41     Future._propagateToListeners (dart:async/future_impl.dart:715:24)
[        ] #42     Future._completeError (dart:async/future_impl.dart:534:5)
[        ] #43     _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15)
[        ] #44     AndroidAot.build (package:flutter_tools/src/build_system/targets/android.dart)
[        ] #45     _rootRunUnary (dart:async/zone.dart:1192:38)
[        ] #46     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[        ] #47     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[        ] #48     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[        ] #49     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[        ] #50     Future._completeWithValue (dart:async/future_impl.dart:526:5)
[        ] #51     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[        ] #52     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[        ] #53     AOTSnapshotter.build (package:flutter_tools/src/base/build.dart)
[        ] #54     _rootRunUnary (dart:async/zone.dart:1192:38)
[        ] #55     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[        ] #56     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[        ] #57     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[        ] #58     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[        ] #59     Future._completeWithValue (dart:async/future_impl.dart:526:5)
[        ] #60     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[        ] #61     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[        ] #62     _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
[        ] #63     _rootRunUnary (dart:async/zone.dart:1192:38)
[        ] #64     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[        ] #65     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[        ] #66     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[        ] #67     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[        ] #68     Future._completeWithValue (dart:async/future_impl.dart:526:5)
[        ] #69     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
[        ] #70     _rootRun (dart:async/zone.dart:1184:13)
[        ] #71     _CustomZone.run (dart:async/zone.dart:1077:19)
[        ] #72     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
[        ] #73     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
[        ] #74     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
[        ] #75     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
[        ] #76     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
[        ] #77     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[ +691 ms] > Task :app:compileFlutterBuildRelease FAILED
[ +395 ms] FAILURE: Build failed with an exception.
[        ] * Where:
[        ] Script '/Users/rameshvel/work/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 882
[        ] * What went wrong:
[        ] Execution failed for task ':app:compileFlutterBuildRelease'.
[        ] > Process 'command '/Users/rameshvel/work/flutter/bin/flutter'' finished with non-zero exit value 1
[        ] * Try:
[        ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
[        ] * Get more help at https://help.gradle.org
[        ] BUILD FAILED in 4m 53s
[        ] 1 actionable task: 1 executed
[ +977 ms] Running Gradle task 'assembleRelease'... (completed in 294.9s, longer than expected)
[  +12 ms] "flutter run" took 3,00,536ms.
Gradle task assembleRelease failed with exit code 1

#0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1      buildGradleApp (package:flutter_tools/src/android/gradle.dart:408:7)
#2      _rootRunUnary (dart:async/zone.dart:1192:38)
#3      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#4      _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#5      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#6      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#7      Future._completeWithValue (dart:async/future_impl.dart:526:5)
#8      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#9      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#10     _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
#11     _rootRunUnary (dart:async/zone.dart:1192:38)
#12     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#13     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#14     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#15     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#16     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#17     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
#18     _rootRun (dart:async/zone.dart:1184:13)
#19     _CustomZone.run (dart:async/zone.dart:1077:19)
#20     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#21     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
#22     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#23     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#24     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#25     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

This is my flutter environment
[✓] Flutter (Channel master, v1.16.4-pre.69, on Mac OS X 10.15 19A573a, locale en-IN)
    • Flutter version 1.16.4-pre.69 at /Users/rameshvel/work/flutter
    • Framework revision 19e7db585d (2 days ago), 2020-04-01 11:16:01 -0700
    • Engine revision c9506cb8e9
    • Dart version 2.8.0 (build 2.8.0-dev.18.0 eea9717938)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/rameshvel/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.0, Build version 11A420a
    ! CocoaPods 1.7.5 out of date (1.8.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on
        the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade:
        sudo gem install cocoapods

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] IntelliJ IDEA Community Edition (version 2018.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.43.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.8.1

[✓] Connected device (3 available)
    • Redmi Note 7 • bb64c474   • android-arm64  • Android 9 (API 28)
    • Chrome       • chrome     • web-javascript • Google Chrome 80.0.3987.149
    • Web Server   • web-server • web-javascript • Flutter Tools

Looks like a crash in the snapshotter, there is no bug in your own code @Rameshv, that is why no other tool is notifying you about anything. The bug is in the Dart AOT compiler.
Could you try running flutter build aot --release -v to produce more meaningful stack trace for the crash?
@mkustermann can this also be related to the Function drop change?

Heres the stack trace from `flutter build aot --release -v' @mraleph
> flutter build aot --release -v

[  +19 ms] executing: [/Users/rameshvel/work/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +49 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 19e7db585dc33491cacce78571da119a1dd9a094
[        ] executing: [/Users/rameshvel/work/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +44 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.16.3-69-g19e7db585d
[   +6 ms] executing: [/Users/rameshvel/work/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +5 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [/Users/rameshvel/work/flutter/] git ls-remote --get-url origin
[   +5 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +66 ms] executing: [/Users/rameshvel/work/flutter/] git rev-parse --abbrev-ref HEAD
[   +6 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[   +6 ms] executing: sw_vers -productName
[  +15 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +14 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15
[        ] executing: sw_vers -buildVersion
[  +16 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19A573a
[  +18 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +5 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +9 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[  +61 ms] Found plugin barcode_scan at /Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/barcode_scan-2.0.1/
[  +22 ms] Found plugin flutter_upi at
/Users/rameshvel/work/flutter/.pub-cache/git/flutter_upi-aa5c520b7f7d2db49a7cc0cd076dc34c733e6446/
[  +18 ms] Found plugin path_provider at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/
[   +3 ms] Found plugin path_provider_macos at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4/
[  +13 ms] Found plugin razorpay_flutter at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.1.2/
[   +2 ms] Found plugin shared_preferences at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/
[   +1 ms] Found plugin shared_preferences_macos at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+6/
[   +2 ms] Found plugin shared_preferences_web at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+4/
[   +5 ms] Found plugin sqflite at /Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0/
[  +42 ms] Found plugin barcode_scan at /Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/barcode_scan-2.0.1/
[  +12 ms] Found plugin flutter_upi at
/Users/rameshvel/work/flutter/.pub-cache/git/flutter_upi-aa5c520b7f7d2db49a7cc0cd076dc34c733e6446/
[   +8 ms] Found plugin path_provider at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/
[   +1 ms] Found plugin path_provider_macos at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4/
[   +5 ms] Found plugin razorpay_flutter at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.1.2/
[   +1 ms] Found plugin shared_preferences at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+3/
[   +1 ms] Found plugin shared_preferences_macos at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+6/
[   +1 ms] Found plugin shared_preferences_web at
/Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+4/
[   +2 ms] Found plugin sqflite at /Users/rameshvel/work/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0/
[  +55 ms] Generating
/Users/rameshvel/work/storeJam/dailybasket_mobile/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.jav
a
[  +20 ms] executing: /usr/bin/xcodebuild -version
[ +513 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[   +1 ms] Xcode 11.0
           Build version 11A420a
[  +32 ms] Building AOT snapshot in release mode (android-arm-release)...
[  +14 ms] Initializing file store
[   +2 ms] Done initializing file store
[+1166 ms] kernel_snapshot: Starting due to {InvalidatedReason.inputChanged}
[  +14 ms] /Users/rameshvel/work/flutter/bin/cache/dart-sdk/bin/dart /Users/rameshvel/work/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
/Users/rameshvel/work/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/ --target=flutter -Ddart.developer.causal_async_stacks=false -Ddart.vm.profile=false -Ddart.vm.product=true --bytecode-options=source-positions --aot --tfa
--packages /Users/rameshvel/work/storeJam/dailybasket_mobile/.packages --output-dill /Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill --depfile
/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/kernel_snapshot.d package:DailyBasket/main.dart
[+16156 ms] kernel_snapshot: Complete
[ +444 ms] aot_elf_release: Starting due to {InvalidatedReason.inputChanged}
[   +4 ms] executing: /Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf
--elf=/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.so --strip --no-sim-use-hardfp --no-use-integer-division --no-causal-async-stacks --lazy-async-stacks
/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill
[+255114 ms] Dart snapshot generator failed with exit code -9
[  +46 ms] Persisting file store
[  +36 ms] Done persisting file store
[  +33 ms] Building AOT snapshot in release mode (android-arm-release)... (completed in 273.0s, longer than expected)
[        ] Exception: AOT snapshotter exited with code -9
[   +3 ms] "flutter aot" took 2,73,982ms.
The aot build failed.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1      AotBuilder.build (package:flutter_tools/src/aot.dart:111:7)
#2      _rootRunUnary (dart:async/zone.dart:1192:38)
#3      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#4      _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#5      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#6      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#7      Future._completeWithValue (dart:async/future_impl.dart:526:5)
#8      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#9      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#10     BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart)
#11     _rootRunUnary (dart:async/zone.dart:1192:38)
#12     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#13     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#14     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#15     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#16     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#17     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#18     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#19     _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart)
#20     _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:86:61)
#21     _rootRunBinary (dart:async/zone.dart:1204:38)
#22     _CustomZone.runBinary (dart:async/zone.dart:1093:19)
#23     _FutureListener.handleError (dart:async/future_impl.dart:155:20)
#24     Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47)
#25     Future._propagateToListeners (dart:async/future_impl.dart:715:24)
#26     Future._completeError (dart:async/future_impl.dart:534:5)
#27     _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15)
#28     AotElfBase.build (package:flutter_tools/src/build_system/targets/dart.dart)
#29     _rootRunUnary (dart:async/zone.dart:1192:38)
#30     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#31     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#32     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#33     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#34     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#35     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#36     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#37     AOTSnapshotter.build (package:flutter_tools/src/base/build.dart)
#38     _rootRunUnary (dart:async/zone.dart:1192:38)
#39     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#40     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#41     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#42     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#43     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#44     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#45     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#46     _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
#47     _rootRunUnary (dart:async/zone.dart:1192:38)
#48     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#49     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#50     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#51     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#52     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#53     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
#54     _rootRun (dart:async/zone.dart:1184:13)
#55     _CustomZone.run (dart:async/zone.dart:1077:19)
#56     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#57     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
#58     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#59     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#60     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#61     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

me too, before I upgrade Flutter to master newest version it works well on release mode, after that crash when open

@Rameshv what happens if you just run
/Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf
--elf=/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.so --strip --no-sim-use-hardfp --no-use-integer-division --no-causal-async-stacks --lazy-async-stacks
/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill

Does that give any stack trace?
It would help if you run it under lldb and see if you can get backtrace, e.g.
lldb -- /Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf
--elf=/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.so --strip --no-sim-use-hardfp --no-use-integer-division --no-causal-async-stacks --lazy-async-stacks
/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill

and then when it crashes
(lldb) bt
(lldb) disassemble --frame

@mraleph Nope.
If I just run
/Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.so --strip --no-sim-use-hardfp --no-use-integer-division --no-causal-async-stacks --lazy-async-stacks /Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill

It hangs and crashes after several minutes without any stacktrace.
And running under lldb doesnt do anything. It prints these 2 lines
(lldb) target create "/Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot"
Current executable set to '/Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot' (x86_64).
(lldb) settings set -- target.run-args  "--deterministic" "--snapshot_kind=app-aot-elf" "--elf=/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.so" "--strip" "--no-sim-use-hardfp" "--no-use-integer-division" "--no-causal-async-stacks" "--lazy-async-stacks" "/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill"

And nothing is happening after that.
Do you have any quess why changing  this line
final order = await Order().find(uniqOrderId.elementAt(0)); to
final order = await Order().find(uniqOrderId.first); fixes the crash and makes the build run fine.

And nothing is happening after that.

You might need to start it by doing typing run.

@mraleph run alone is not working. But I managed to run this command under lldb by splitting it to 2
> lldb -- /Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot
which gets into lldb shell with this message
(lldb) target create "/Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot"
Current executable set to '/Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot' (x86_64).
(lldb)

There I can run command with the flags
(lldb) run --deterministic --snapshot_kind=app-aot-elf --elf=/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.so
--strip --no-sim-use-hardfp --no-use-integer-division --no-causal-async-stacks --lazy-async-stacks
/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill

It ran for few mins and crashed with this message
Process 23702 launched: '/Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot' (x86_64)
Process 23702 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGKILL
    frame #0: 0x00000001002455fa gen_snapshot`dart::ConstantPropagator::VisitPhi(dart::PhiInstr*) + 106
gen_snapshot`dart::ConstantPropagator::VisitPhi:
->  0x1002455fa <+106>: movq   $0x0, 0x400(%rax)
    0x100245605 <+117>: movq   %rbx, 0x408(%rax)
    0x10024560c <+124>: movq   %rax, 0x430(%r15)
    0x100245613 <+131>: xorl   %ecx, %ecx
Target 0: (gen_snapshot) stopped.

As you requested, here is the output of  bt
> (lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGKILL
  * frame #0: 0x00000001002455fa gen_snapshot`dart::ConstantPropagator::VisitPhi(dart::PhiInstr*) + 106
    frame #1: 0x0000000100257bed gen_snapshot`dart::ConstantPropagator::Analyze() + 669
    frame #2: 0x000000010038368b gen_snapshot`dart::CompilerPass_ConstantPropagation::DoBody(dart::CompilerPassState*) const + 107
    frame #3: 0x00000001003860cd gen_snapshot`dart::CompilerPass::Run(dart::CompilerPassState*) const + 125
    frame #4: 0x0000000100300523 gen_snapshot`dart::CallSiteInliner::TryInlining(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool) + 10147
    frame #5: 0x00000001003186ad gen_snapshot`dart::FlowGraphInliner::Inline() + 4637
    frame #6: 0x0000000100385cbf gen_snapshot`dart::CompilerPass_Inlining::DoBody(dart::CompilerPassState*) const + 111
    frame #7: 0x00000001003860cd gen_snapshot`dart::CompilerPass::Run(dart::CompilerPassState*) const + 125
    frame #8: 0x00000001003864f1 gen_snapshot`dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*) + 193
    frame #9: 0x000000010023635e gen_snapshot`dart::PrecompileParsedFunctionHelper::Compile(dart::CompilationPipeline*) + 4078
    frame #10: 0x00000001002388c6 gen_snapshot`dart::PrecompileFunctionHelper(dart::Precompiler*, dart::CompilationPipeline*, dart::Function const&, bool) + 1846
    frame #11: 0x000000010021ec9d gen_snapshot`dart::Precompiler::DoCompileAll() + 24333
    frame #12: 0x0000000100218c32 gen_snapshot`dart::Precompiler::CompileAll() + 6978
    frame #13: 0x0000000100009f78 gen_snapshot`dart::bin::main(int, char**) + 29080
    frame #14: 0x00007fff73a0e405 libdyld.dylib`start + 1
    frame #15: 0x00007fff73a0e405 libdyld.dylib`start + 1

And disassemble --frame
> (lldb) disassemble --frame
gen_snapshot`dart::ConstantPropagator::VisitPhi:
    0x100245590 <+0>:    pushq  %rbp
    0x100245591 <+1>:    movq   %rsp, %rbp
    0x100245594 <+4>:    pushq  %r15
    0x100245596 <+6>:    pushq  %r14
    0x100245598 <+8>:    pushq  %r13
    0x10024559a <+10>:   pushq  %r12
    0x10024559c <+12>:   pushq  %rbx
    0x10024559d <+13>:   subq   $0x38, %rsp
    0x1002455a1 <+17>:   movq   %rsi, %r13
    0x1002455a4 <+20>:   movq   0x30aa6d(%rip), %rax      ; (void *)0x00007fffa6722680: __stack_chk_guard
    0x1002455ab <+27>:   movq   (%rax), %rax
    0x1002455ae <+30>:   movq   %rax, -0x30(%rbp)
    0x1002455b2 <+34>:   movq   0x78(%rsi), %rax
    0x1002455b6 <+38>:   movq   %rax, -0x50(%rbp)
    0x1002455ba <+42>:   movq   %rdi, -0x40(%rbp)
    0x1002455be <+46>:   movq   0x18(%rdi), %rax
    0x1002455c2 <+50>:   movq   (%rax), %rax
    0x1002455c5 <+53>:   movq   0x18(%rax), %r15
    0x1002455c9 <+57>:   movq   0x366c10(%rip), %rax      ; dart::Object::unknown_constant_
    0x1002455d0 <+64>:   movq   0x8(%rax), %r14
    0x1002455d4 <+68>:   movq   0x430(%r15), %rbx
    0x1002455db <+75>:   testq  %rbx, %rbx
    0x1002455de <+78>:   je     0x1002455f0               ; <+96>
    0x1002455e0 <+80>:   movq   0x400(%rbx), %rcx
    0x1002455e7 <+87>:   cmpq   $0x80, %rcx
    0x1002455ee <+94>:   jl     0x100245621               ; <+145>
    0x1002455f0 <+96>:   movl   $0x410, %edi              ; imm = 0x410
    0x1002455f5 <+101>:  callq  0x1004de54c               ; symbol stub for: operator new(unsigned long)
->  0x1002455fa <+106>:  movq   $0x0, 0x400(%rax)
    0x100245605 <+117>:  movq   %rbx, 0x408(%rax)
    0x10024560c <+124>:  movq   %rax, 0x430(%r15)
    0x100245613 <+131>:  xorl   %ecx, %ecx
    0x100245615 <+133>:  leaq   0x400(%rax), %rdx
    0x10024561c <+140>:  movq   %rax, %rbx
    0x10024561f <+143>:  jmp    0x100245628               ; <+152>
    0x100245621 <+145>:  leaq   0x400(%rbx), %rdx
    0x100245628 <+152>:  leaq   (%rbx,%rcx,8), %rsi
    0x10024562c <+156>:  leaq   0x2(%rcx), %rax
    0x100245630 <+160>:  movq   %rax, (%rdx)
    0x100245633 <+163>:  cmpq   %r14, 0x3648c6(%rip)      ; dart::Object::null_
    0x10024563a <+170>:  movq   %r14, 0x8(%rbx,%rcx,8)
    0x10024563f <+175>:  je     0x10024566f               ; <+223>
    0x100245641 <+177>:  movl   $0x32, %eax
    0x100245646 <+182>:  testb  $0x1, %r14b
    0x10024564a <+186>:  je     0x100245662               ; <+210>
    0x10024564c <+188>:  movl   -0x1(%r14), %eax
    0x100245650 <+192>:  movl   %eax, %ecx
    0x100245652 <+194>:  shrl   $0x10, %ecx
    0x100245655 <+197>:  cmpl   $0x98ffff, %eax           ; imm = 0x98FFFF
    0x10024565a <+202>:  movl   $0x28, %eax
    0x10024565f <+207>:  cmovbel %ecx, %eax
    0x100245662 <+210>:  leaq   0x3665d7(%rip), %rcx      ; dart::Object::builtin_vtables_
    0x100245669 <+217>:  movq   (%rcx,%rax,8), %rax
    0x10024566d <+221>:  jmp    0x100245676               ; <+230>
    0x10024566f <+223>:  leaq   0x312392(%rip), %rax      ; vtable for dart::Object + 16
    0x100245676 <+230>:  movq   %rsi, -0x38(%rbp)
    0x10024567a <+234>:  movq   %rax, (%rsi)
    0x10024567d <+237>:  movq   (%r13), %rax
    0x100245681 <+241>:  movq   %r13, %rdi
    0x100245684 <+244>:  callq  *0x28(%rax)
    0x100245687 <+247>:  testq  %rax, %rax
    0x10024568a <+250>:  movq   -0x40(%rbp), %r14
    0x10024568e <+254>:  jle    0x100245936               ; <+934>
    0x100245694 <+260>:  xorl   %r12d, %r12d
    0x100245697 <+263>:  movq   %r13, -0x48(%rbp)
    0x10024569b <+267>:  nopl   (%rax,%rax)
    0x1002456a0 <+272>:  movq   0x38(%r14), %rbx
    0x1002456a4 <+276>:  movq   -0x50(%rbp), %rdi
    0x1002456a8 <+280>:  movq   (%rdi), %rax
    0x1002456ab <+283>:  movq   %r12, %rsi
    0x1002456ae <+286>:  callq  *0x5a8(%rax)
    0x1002456b4 <+292>:  movq   0x50(%rax), %rax
    0x1002456b8 <+296>:  movq   0x10(%rbx), %rcx
    0x1002456bc <+300>:  movq   %rax, %rdx
    0x1002456bf <+303>:  sarq   $0x3f, %rdx
    0x1002456c3 <+307>:  shrq   $0x3a, %rdx
    0x1002456c7 <+311>:  addq   %rax, %rdx
    0x1002456ca <+314>:  sarq   $0x6, %rdx
    0x1002456ce <+318>:  movq   (%rcx,%rdx,8), %rcx
    0x1002456d2 <+322>:  btq    %rax, %rcx
    0x1002456d6 <+326>:  jae    0x100245920               ; <+912>
    0x1002456dc <+332>:  movq   (%r13), %rax
    0x1002456e0 <+336>:  movq   %r13, %rdi
    0x1002456e3 <+339>:  movq   %r12, %rsi
    0x1002456e6 <+342>:  callq  *0x30(%rax)
    0x1002456e9 <+345>:  movq   (%rax), %r14
    0x1002456ec <+348>:  movq   0x68(%r14), %r15
    0x1002456f0 <+352>:  testq  %r15, %r15
    0x1002456f3 <+355>:  jne    0x1002457bf               ; <+559>
    0x1002456f9 <+361>:  movq   0x366ae0(%rip), %rax      ; dart::Object::unknown_constant_
    0x100245700 <+368>:  movq   0x8(%rax), %rbx
    0x100245704 <+372>:  leaq   0x365d8d(%rip), %rdi      ; dart::OSThread::current_vm_thread_
    0x10024570b <+379>:  callq  *(%rdi)
    0x10024570d <+381>:  movq   (%rax), %rax
    0x100245710 <+384>:  movq   0x18(%rax), %r15
    0x100245714 <+388>:  movq   0x430(%r15), %r13
    0x10024571b <+395>:  testq  %r13, %r13
    0x10024571e <+398>:  je     0x100245730               ; <+416>
    0x100245720 <+400>:  movq   0x400(%r13), %rcx
    0x100245727 <+407>:  cmpq   $0x80, %rcx
    0x10024572e <+414>:  jl     0x100245761               ; <+465>
    0x100245730 <+416>:  movl   $0x410, %edi              ; imm = 0x410
    0x100245735 <+421>:  callq  0x1004de54c               ; symbol stub for: operator new(unsigned long)
    0x10024573a <+426>:  movq   $0x0, 0x400(%rax)
    0x100245745 <+437>:  movq   %r13, 0x408(%rax)
    0x10024574c <+444>:  movq   %rax, 0x430(%r15)
    0x100245753 <+451>:  leaq   0x400(%rax), %rdx
    0x10024575a <+458>:  xorl   %ecx, %ecx
    0x10024575c <+460>:  movq   %rax, %r13
    0x10024575f <+463>:  jmp    0x100245768               ; <+472>
    0x100245761 <+465>:  leaq   0x400(%r13), %rdx
    0x100245768 <+472>:  leaq   (%r13,%rcx,8), %r15
    0x10024576d <+477>:  leaq   0x2(%rcx), %rax
    0x100245771 <+481>:  movq   %rax, (%rdx)
    0x100245774 <+484>:  leaq   0x31228d(%rip), %rax      ; vtable for dart::Object + 16
    0x10024577b <+491>:  cmpq   %rbx, 0x36477e(%rip)      ; dart::Object::null_
    0x100245782 <+498>:  movq   %rbx, 0x8(%r13,%rcx,8)
    0x100245787 <+503>:  movq   -0x48(%rbp), %r13
    0x10024578b <+507>:  je     0x1002457b8               ; <+552>
    0x10024578d <+509>:  movl   $0x32, %eax
    0x100245792 <+514>:  testb  $0x1, %bl
    0x100245795 <+517>:  je     0x1002457ad               ; <+541>
    0x100245797 <+519>:  movl   -0x1(%rbx), %ecx
    0x10024579a <+522>:  movl   %ecx, %eax
    0x10024579c <+524>:  shrl   $0x10, %eax
    0x10024579f <+527>:  cmpl   $0x98ffff, %ecx           ; imm = 0x98FFFF
    0x1002457a5 <+533>:  movl   $0x28, %ecx
    0x1002457aa <+538>:  cmoval %ecx, %eax
    0x1002457ad <+541>:  leaq   0x36648c(%rip), %rcx      ; dart::Object::builtin_vtables_
    0x1002457b4 <+548>:  movq   (%rcx,%rax,8), %rax
    0x1002457b8 <+552>:  movq   %rax, (%r15)
    0x1002457bb <+555>:  movq   %r15, 0x68(%r14)
    0x1002457bf <+559>:  movq   -0x38(%rbp), %rax
    0x1002457c3 <+563>:  movq   0x8(%rax), %rcx
    0x1002457c7 <+567>:  movq   -0x40(%rbp), %r14
    0x1002457cb <+571>:  movq   0x28(%r14), %rax
    0x1002457cf <+575>:  movq   0x8(%rax), %rdx
    0x1002457d3 <+579>:  cmpq   %rdx, %rcx
    0x1002457d6 <+582>:  je     0x100245920               ; <+912>
    0x1002457dc <+588>:  movq   0x8(%r15), %rax
    0x1002457e0 <+592>:  movq   0x20(%r14), %rsi
    0x1002457e4 <+596>:  movq   0x8(%rsi), %rsi
    0x1002457e8 <+600>:  cmpq   %rsi, %rax
    0x1002457eb <+603>:  je     0x100245920               ; <+912>
    0x1002457f1 <+609>:  cmpq   %rdx, %rax
    0x1002457f4 <+612>:  je     0x100245821               ; <+657>
    0x1002457f6 <+614>:  cmpq   %rsi, %rcx
    0x1002457f9 <+617>:  je     0x100245821               ; <+657>
    0x1002457fb <+619>:  cmpq   %rax, %rcx
    0x1002457fe <+622>:  je     0x100245920               ; <+912>
    0x100245804 <+628>:  movl   $0x32, %edx
    0x100245809 <+633>:  movl   $0x32, %esi
    0x10024580e <+638>:  testb  $0x1, %cl
    0x100245811 <+641>:  jne    0x100245864               ; <+724>
    0x100245813 <+643>:  testb  $0x1, %al
    0x100245815 <+645>:  jne    0x10024586c               ; <+732>
    0x100245817 <+647>:  cmpq   %rdx, %rsi
    0x10024581a <+650>:  je     0x100245875               ; <+741>
    0x10024581c <+652>:  jmp    0x1002458cb               ; <+827>
    0x100245821 <+657>:  cmpq   %rax, 0x3646d8(%rip)      ; dart::Object::null_
    0x100245828 <+664>:  movq   -0x38(%rbp), %rdx
    0x10024582c <+668>:  movq   %rax, 0x8(%rdx)
    0x100245830 <+672>:  je     0x100245911               ; <+897>
    0x100245836 <+678>:  movl   $0x32, %ecx
    0x10024583b <+683>:  testb  $0x1, %al
    0x10024583d <+685>:  je     0x100245854               ; <+708>
    0x10024583f <+687>:  movl   -0x1(%rax), %eax
    0x100245842 <+690>:  movl   %eax, %ecx
    0x100245844 <+692>:  shrl   $0x10, %ecx
    0x100245847 <+695>:  cmpl   $0x98ffff, %eax           ; imm = 0x98FFFF
    0x10024584c <+700>:  movl   $0x28, %eax
    0x100245851 <+705>:  cmoval %eax, %ecx
    0x100245854 <+708>:  leaq   0x3663e5(%rip), %rax      ; dart::Object::builtin_vtables_
    0x10024585b <+715>:  movq   (%rax,%rcx,8), %rax
    0x10024585f <+719>:  jmp    0x100245918               ; <+904>
    0x100245864 <+724>:  movzwl 0x1(%rcx), %esi
    0x100245868 <+728>:  testb  $0x1, %al
    0x10024586a <+730>:  je     0x100245817               ; <+647>
    0x10024586c <+732>:  movzwl 0x1(%rax), %edx
    0x100245870 <+736>:  cmpq   %rdx, %rsi
    0x100245873 <+739>:  jne    0x1002458cb               ; <+827>
    0x100245875 <+741>:  movq   -0x38(%rbp), %rbx
    0x100245879 <+745>:  movq   (%rbx), %rax
    0x10024587c <+748>:  movq   %rbx, %rdi
    0x10024587f <+751>:  callq  *0x178(%rax)
    0x100245885 <+757>:  testb  %al, %al
    0x100245887 <+759>:  je     0x1002458a1               ; <+785>
    0x100245889 <+761>:  movq   (%rbx), %rax
    0x10024588c <+764>:  movq   %rbx, %rdi
    0x10024588f <+767>:  movq   %r15, %rsi
    0x100245892 <+770>:  callq  *0x2b0(%rax)
    0x100245898 <+776>:  testb  %al, %al
    0x10024589a <+778>:  je     0x1002458cb               ; <+827>
    0x10024589c <+780>:  jmp    0x100245920               ; <+912>
    0x1002458a1 <+785>:  movq   (%rbx), %rax
    0x1002458a4 <+788>:  movq   %rbx, %rdi
    0x1002458a7 <+791>:  callq  *0x190(%rax)
    0x1002458ad <+797>:  testb  %al, %al
    0x1002458af <+799>:  je     0x1002458cb               ; <+827>
    0x1002458b1 <+801>:  movq   0x8(%r15), %rax
    0x1002458b5 <+805>:  movq   0x7(%rax), %rax
    0x1002458b9 <+809>:  movq   %rax, -0x58(%rbp)
    0x1002458bd <+813>:  movq   -0x38(%rbp), %rcx
    0x1002458c1 <+817>:  movq   0x8(%rcx), %rcx
    0x1002458c5 <+821>:  cmpq   %rax, 0x7(%rcx)
    0x1002458c9 <+825>:  je     0x100245920               ; <+912>
    0x1002458cb <+827>:  movq   0x28(%r14), %rax
    0x1002458cf <+831>:  movq   0x8(%rax), %rcx
    0x1002458d3 <+835>:  cmpq   %rcx, 0x364626(%rip)      ; dart::Object::null_
    0x1002458da <+842>:  movq   -0x38(%rbp), %rdx
    0x1002458de <+846>:  movq   %rcx, 0x8(%rdx)
    0x1002458e2 <+850>:  je     0x100245911               ; <+897>
    0x1002458e4 <+852>:  movl   $0x32, %eax
    0x1002458e9 <+857>:  testb  $0x1, %cl
    0x1002458ec <+860>:  je     0x100245904               ; <+884>
    0x1002458ee <+862>:  movl   -0x1(%rcx), %ecx
    0x1002458f1 <+865>:  movl   %ecx, %eax
    0x1002458f3 <+867>:  shrl   $0x10, %eax
    0x1002458f6 <+870>:  cmpl   $0x98ffff, %ecx           ; imm = 0x98FFFF
    0x1002458fc <+876>:  movl   $0x28, %ecx
    0x100245901 <+881>:  cmoval %ecx, %eax
    0x100245904 <+884>:  leaq   0x366335(%rip), %rcx      ; dart::Object::builtin_vtables_
    0x10024590b <+891>:  movq   (%rcx,%rax,8), %rax
    0x10024590f <+895>:  jmp    0x100245918               ; <+904>
    0x100245911 <+897>:  leaq   0x3120f0(%rip), %rax      ; vtable for dart::Object + 16
    0x100245918 <+904>:  movq   %rax, (%rdx)
    0x10024591b <+907>:  nopl   (%rax,%rax)
    0x100245920 <+912>:  incq   %r12
    0x100245923 <+915>:  movq   (%r13), %rax
    0x100245927 <+919>:  movq   %r13, %rdi
    0x10024592a <+922>:  callq  *0x28(%rax)
    0x10024592d <+925>:  cmpq   %rax, %r12
    0x100245930 <+928>:  jl     0x1002456a0               ; <+272>
    0x100245936 <+934>:  movq   0x68(%r13), %rax
    0x10024593a <+938>:  testq  %rax, %rax
    0x10024593d <+941>:  jne    0x100245a0c               ; <+1148>
    0x100245943 <+947>:  movq   0x366896(%rip), %rax      ; dart::Object::unknown_constant_
    0x10024594a <+954>:  movq   0x8(%rax), %r14
    0x10024594e <+958>:  leaq   0x365b43(%rip), %rdi      ; dart::OSThread::current_vm_thread_
    0x100245955 <+965>:  callq  *(%rdi)
    0x100245957 <+967>:  movq   (%rax), %rax
    0x10024595a <+970>:  movq   0x18(%rax), %r15
    0x10024595e <+974>:  movq   0x430(%r15), %rbx
    0x100245965 <+981>:  testq  %rbx, %rbx
    0x100245968 <+984>:  je     0x10024597a               ; <+1002>
    0x10024596a <+986>:  movq   0x400(%rbx), %rcx
    0x100245971 <+993>:  cmpq   $0x80, %rcx
    0x100245978 <+1000>: jl     0x1002459ab               ; <+1051>
    0x10024597a <+1002>: movl   $0x410, %edi              ; imm = 0x410
    0x10024597f <+1007>: callq  0x1004de54c               ; symbol stub for: operator new(unsigned long)
    0x100245984 <+1012>: movq   $0x0, 0x400(%rax)
    0x10024598f <+1023>: movq   %rbx, 0x408(%rax)
    0x100245996 <+1030>: movq   %rax, 0x430(%r15)
    0x10024599d <+1037>: xorl   %ecx, %ecx
    0x10024599f <+1039>: leaq   0x400(%rax), %rdx
    0x1002459a6 <+1046>: movq   %rax, %rbx
    0x1002459a9 <+1049>: jmp    0x1002459b2               ; <+1058>
    0x1002459ab <+1051>: leaq   0x400(%rbx), %rdx
    0x1002459b2 <+1058>: leaq   (%rbx,%rcx,8), %rax
    0x1002459b6 <+1062>: leaq   0x2(%rcx), %rsi
    0x1002459ba <+1066>: movq   %rsi, (%rdx)
    0x1002459bd <+1069>: cmpq   %r14, 0x36453c(%rip)      ; dart::Object::null_
    0x1002459c4 <+1076>: movq   %r14, 0x8(%rbx,%rcx,8)
    0x1002459c9 <+1081>: je     0x1002459fa               ; <+1130>
    0x1002459cb <+1083>: movl   $0x32, %ecx
    0x1002459d0 <+1088>: testb  $0x1, %r14b
    0x1002459d4 <+1092>: je     0x1002459ed               ; <+1117>
    0x1002459d6 <+1094>: movl   -0x1(%r14), %ecx
    0x1002459da <+1098>: movl   %ecx, %edx
    0x1002459dc <+1100>: shrl   $0x10, %edx
    0x1002459df <+1103>: cmpl   $0x98ffff, %ecx           ; imm = 0x98FFFF
    0x1002459e5 <+1109>: movl   $0x28, %ecx
    0x1002459ea <+1114>: cmovbel %edx, %ecx
    0x1002459ed <+1117>: leaq   0x36624c(%rip), %rdx      ; dart::Object::builtin_vtables_
    0x1002459f4 <+1124>: movq   (%rdx,%rcx,8), %rcx
    0x1002459f8 <+1128>: jmp    0x100245a01               ; <+1137>
    0x1002459fa <+1130>: leaq   0x312007(%rip), %rcx      ; vtable for dart::Object + 16
    0x100245a01 <+1137>: movq   %rcx, (%rax)
    0x100245a04 <+1140>: movq   %rax, 0x68(%r13)
    0x100245a08 <+1144>: movq   -0x40(%rbp), %r14
    0x100245a0c <+1148>: movq   -0x38(%rbp), %rcx
    0x100245a10 <+1152>: movq   0x8(%rcx), %rcx
    0x100245a14 <+1156>: cmpq   %rcx, 0x8(%rax)
    0x100245a18 <+1160>: je     0x100245a54               ; <+1220>
    0x100245a1a <+1162>: cmpq   %rcx, 0x3644df(%rip)      ; dart::Object::null_
    0x100245a21 <+1169>: movq   %rcx, 0x8(%rax)
    0x100245a25 <+1173>: je     0x100245a90               ; <+1280>
    0x100245a27 <+1175>: movl   $0x32, %edx
    0x100245a2c <+1180>: testb  $0x1, %cl
    0x100245a2f <+1183>: je     0x100245a47               ; <+1207>
    0x100245a31 <+1185>: movl   -0x1(%rcx), %ecx
    0x100245a34 <+1188>: movl   %ecx, %esi
    0x100245a36 <+1190>: shrl   $0x10, %esi
    0x100245a39 <+1193>: cmpl   $0x98ffff, %ecx           ; imm = 0x98FFFF
    0x100245a3f <+1199>: movl   $0x28, %edx
    0x100245a44 <+1204>: cmovbel %esi, %edx
    0x100245a47 <+1207>: leaq   0x3661f2(%rip), %rcx      ; dart::Object::builtin_vtables_
    0x100245a4e <+1214>: movq   (%rcx,%rdx,8), %rcx
    0x100245a52 <+1218>: jmp    0x100245a97               ; <+1287>
    0x100245a54 <+1220>: movq   0x40(%r14), %rax
    0x100245a58 <+1224>: movq   0x50(%r13), %rcx
    0x100245a5c <+1228>: movq   0x10(%rax), %rax
    0x100245a60 <+1232>: movq   %rcx, %rdx
    0x100245a63 <+1235>: sarq   $0x3f, %rdx
    0x100245a67 <+1239>: shrq   $0x3a, %rdx
    0x100245a6b <+1243>: addq   %rcx, %rdx
    0x100245a6e <+1246>: sarq   $0x6, %rdx
    0x100245a72 <+1250>: movq   (%rax,%rdx,8), %rsi
    0x100245a76 <+1254>: movl   $0x1, %edi
    0x100245a7b <+1259>: shlq   %cl, %rdi
    0x100245a7e <+1262>: btq    %rcx, %rsi
    0x100245a82 <+1266>: jae    0x100245ace               ; <+1342>
    0x100245a84 <+1268>: notq   %rdi
    0x100245a87 <+1271>: andq   %rdi, %rsi
    0x100245a8a <+1274>: movq   %rsi, (%rax,%rdx,8)
    0x100245a8e <+1278>: jmp    0x100245aa1               ; <+1297>
    0x100245a90 <+1280>: leaq   0x311f71(%rip), %rcx      ; vtable for dart::Object + 16
    0x100245a97 <+1287>: movq   %rcx, (%rax)
    0x100245a9a <+1290>: cmpq   $0x0, 0x58(%r13)
    0x100245a9f <+1295>: je     0x100245ace               ; <+1342>
    0x100245aa1 <+1297>: movq   0x30a570(%rip), %rax      ; (void *)0x00007fffa6722680: __stack_chk_guard
    0x100245aa8 <+1304>: movq   (%rax), %rax
    0x100245aab <+1307>: cmpq   -0x30(%rbp), %rax
    0x100245aaf <+1311>: jne    0x100245aed               ; <+1373>
    0x100245ab1 <+1313>: addq   $0x68, %r14
    0x100245ab5 <+1317>: movq   %r14, %rdi
    0x100245ab8 <+1320>: movq   %r13, %rsi
    0x100245abb <+1323>: addq   $0x38, %rsp
    0x100245abf <+1327>: popq   %rbx
    0x100245ac0 <+1328>: popq   %r12
    0x100245ac2 <+1330>: popq   %r13
    0x100245ac4 <+1332>: popq   %r14
    0x100245ac6 <+1334>: popq   %r15
    0x100245ac8 <+1336>: popq   %rbp
    0x100245ac9 <+1337>: jmp    0x100255e80               ; dart::DefinitionWorklist::Add(dart::Definition*)
    0x100245ace <+1342>: movq   0x30a543(%rip), %rax      ; (void *)0x00007fffa6722680: __stack_chk_guard
    0x100245ad5 <+1349>: movq   (%rax), %rax
    0x100245ad8 <+1352>: cmpq   -0x30(%rbp), %rax
    0x100245adc <+1356>: jne    0x100245aed               ; <+1373>
    0x100245ade <+1358>: addq   $0x38, %rsp
    0x100245ae2 <+1362>: popq   %rbx
    0x100245ae3 <+1363>: popq   %r12
    0x100245ae5 <+1365>: popq   %r13
    0x100245ae7 <+1367>: popq   %r14
    0x100245ae9 <+1369>: popq   %r15
    0x100245aeb <+1371>: popq   %rbp
    0x100245aec <+1372>: retq
    0x100245aed <+1373>: callq  0x1004de582               ; symbol stub for: __stack_chk_fail
    0x100245af2 <+1378>: nopw   %cs:(%rax,%rax)
    0x100245afc <+1388>: nopl   (%rax)

Thanks! Looks like a memory allocation failure to me. @mkustermann Martin any idea if any recent changes could considerably increase compiler memory consumption?

Seems memory consumption is off the charts with the builds @mraleph. When it crashed it was about 53GB.

Here is a video I recorded the rise of memory consumption

I found a similar issue https://github.com/flutter/flutter/issues/47454#issuecomment-567971854. Could this be related??

I've tried to reproduce this but on flutter gallery I can only get the memory consumption of gen_snapshot to reach to around 1.6 GB. It increases a bit at the end during deduplication / relocation phase.
@Rameshv Would you be willing to privately share the .../.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill file with us?

@mkustermann yeah sure. How do I do that??

@Rameshv just to make it clear: app.dill file contains your application code in an easy to recover form (essentially it's a AST of your whole application, without comments). So if your application is non-public you should not share it with us. Furthermore in general we can only look at things that are actually posted publicly, e.g. here on the issue tracker.
That said, if you want to provide additional information you can do the following, run
$ /Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.so --strip --no-sim-use-hardfp --no-use-integer-division --no-causal-async-stacks --lazy-async-stacks --print-flow-graph --compiler-passes="[ConstantPropagation" /Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill

This would produce a lot of output to the terminal - but then output will stop when the application starts running out of memory. There should be a block like this right at the end of the output:
*** BEGIN CFG
Before ConstantPropagation
==== <...some path...>
<...IL dump...>
*** END CFG

where ...some path... should be actually pointing to the function in your code where the problem happens. ...IL dump... is going to be intermediate language (IL) for the problematic function. We need this dump. Please remove any information from it which you don't want to share publicly (e.g. it would contain names of classes and functions you can just replace them) and post it here.
If you don't want spend time sanitising output by hand, you can use --obfuscate flag, which would replace all names automatically. Here is the command line which includes this flag:
$ /Users/rameshvel/work/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=/Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.so --strip --no-sim-use-hardfp --no-use-integer-division --no-causal-async-stacks --lazy-async-stacks --print-flow-graph --compiler-passes="[ConstantPropagation" --obfuscate /Users/rameshvel/work/storeJam/dailybasket_mobile/.dart_tool/flutter_build/b8ce24e506f8ee1015f684203ab7f2c3/app.dill

Great @mraleph
I will get the memory dump and let you know

If it can help, on me too android release cause gen_snapshot to grow over 20+ gigs then freeze my pc because i don't have ram left

@Rameshv did you have a chance to get a dump?
@koso00 We would really like to get more information to be able to diagnose the issue.

Run flutter clean and then flutter build aot --release -v.
After that run

$(dirname $(which flutter))/cache/artifacts/engine/android-arm-profile/linux-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=/tmp/app.so --strip --no-sim-use-hardfp --no-use-integer-division --no-causal-async-stacks --lazy-async-stacks --print-flow-graph --compiler-passes="[ConstantPropagation" --obfuscate $(find . -iname 'app.dill')

That should rapidly produce a lot of output and then hang and start eating your memory, at which point you can kill it. The last bit of the output which looks like this:
*** BEGIN CFG
Before ConstantPropagation
==== <...some path...>
<...IL dump...>
*** END CFG

is what we are after.

@mraleph ok i made the log, is so heavy that i uploaded it on this repo
https://github.com/koso00/fluttergensnapshotlog/blob/master/log.log
(if there's a way to rollback temporarily before the resolution it would be really lovely because i really need to compile and i'm on my way to cry (i love you guys))
Hope it will help

@mraleph Heres the CFG part just before the crash
without --obfuscate
*** BEGIN CFG
Before ConstantPropagation
==== dart:collection___CompactLinkedHashSet&_HashFieldBase&_HashBase&_OperatorEqualsAndHashCode&SetMixin@3220832_elementAt
B0[graph]:0 {
      v728 <- Constant(#null) T{Null?}
      v729 <- Constant(#<optimized out>)
      v737 <- Constant(#0) T{_Smi}
      v738 <- Constant(#TypeArguments: (H1a001503) [Type: int*]) T{TypeArguments}
      v739 <- Constant(#index) T{_OneByteString}
      v758 <- Constant(#true) T{bool}
      v765 <- Constant(#1) T{_Smi}
}
B82[function entry]:2 {
      v730 <- Parameter(0)
      (v731, v732) <- Parameter(1)
      v733 <- Parameter(0) T{Set<String>?}
      v735 <- Constant(#0)
}
    StaticCall:12( checkNotNull<1> v738, v737, v739)
    StaticCall:14( checkNotNegative<0> v737, v739)
    v740 <- StaticCall:18( get:iterator<0> v733, result_type = T{!null}) T{*?}
    v768 <- Redefinition(v733 ^ T{Set<String>}) T{Set<String>}
    goto:56 B88
B88[join try_idx 0]:54 pred(B82, B87) {
      v742 <- phi(v768, v742) alive T{Set<String>}
      v744 <- phi(v737, v744) alive T{_Smi}
      v746 <- phi(v728, v746) alive T{Null?}
      v748 <- phi(v728, v748) alive T{Null?}
      v750 <- phi(v737, (v766, v767)) alive T{int}
      v752 <- phi(v740 T{*?}, v770) alive T{*?}
      v754 <- phi(v728, v761) alive T{*?}
}
    CheckStackOverflow:60(stack=0, loop=1)
    v756 <- InstanceCall:20( moveNext<0>, v752 IC[0: ], result_type = T{bool?})
}
    CheckStackOverflow:60(stack=0, loop=1)
    v756 <- InstanceCall:20( moveNext<0>, v752 IC[0: ], result_type = T{bool?}) T{bool?}
    v770 <- Redefinition(v752 ^ T{P<Q>}) T{P<Q>}
    AssertBoolean:22(v756)
    Branch if StrictCompare:24(===, v756, v758) goto (84, 85)
B84[target try_idx 0]:28
    v761 <- InstanceCall:32( get:current<0>, v770 T{P<Q>} IC[0: ]) T{*?}
    v774 <- EqualityCompare(v744 == v750) T{bool}
    Branch if StrictCompare:38(===, v774, v758) goto (86, 87)
B86[target try_idx 0]:42
    Return:46(v761)
B87[target try_idx 0]:48
    (v766, v767) <- BinaryInt64Op(+ [tr], v750 T{int}, v765) T{int}
    goto:58 B88
B85[target try_idx 0]:30
    v759 <- AllocateObject(va) T{va}
    StaticCall:62( va.<0> v759, v744, v742, v739, v728, v750)
    Throw:64(v759)
*** END CFG

As you can see in the without --obfuscate log, it crashes at dart:collection___CompactLinkedHashSet&_HashFieldBase&_HashBase&_OperatorEqualsAndHashCode&SetMixin@3220832_elementAt
That's what I have been telling earlier, but no idea why this elementAt(0) method causes it.  But if I replace it with .first, the crash went away.
Hope this helps

Thanks for the information @koso00 & @Rameshv
Here is the reproduction at dart-lang/sdk@eea97179386a9ced7d68452cea158345f4019baa
@pragma('vm:never-inline')
void yyyy(Iterable<String> x) {
  try {
    x.toSet().elementAt(0);
  } catch (e) {}
}

void main() {
  yyyy(<String>[]);
  //  final x = Foo().elementAt(0);
  // test();
}

I am looking at why this causes infinite loop.

This is fixed upstream, we are now waiting for the roll to happen. I will close this issue once it rolls into Flutter master.

This has rolled into master and will be included into the next Flutter stable release as well.

Thank you @Rameshv and @koso00 for providing information to reproduce and fix this bug.


What Lighting software are compatible with this library on Arduino?

Freestyler or Qlc+ not detect my interface. I based my circuit from #this sketch and DMXUSB_DMXSimple.
I connect RX and TX ports to MAX485 A and B channels, but I don't understand why code specify channel 3 for DMX.

Freestyler or Qlc+ not detect my interface.

I should really add this to the readme. You need a FTDI serial interface or an Arduino with one built in (must be specifically FTDI). See https://github.com/DaAwesomeP/dmxusb/issues/17#issuecomment-1205869441 and https://github.com/DaAwesomeP/dmxusb/issues/18#issuecomment-1276287214

I connect RX and TX ports to MAX485 A and B channels, but I don't understand why code specify channel 3 for DMX.

To be honest I have not tried this example myself. The DmxSimple documentation makes me think that usePin() is unnecessary here.
Note that you will need to control the ~RE and DE pins on the MAX485. They both need to be high to output/transmit RS485 (instead of receiving). You could just tie them both to the 3.3V rail instead of digital or analog pins.

Hey!
I hope you don't mind me chiming in here. I'm trying to make this work with an Arduino Nano (328p, "old bootloader"). I'm using this simplified sketch for now:
#include "DMXUSB.h"

// DMXUSB should receive and transmit data at the highest, most reliable speed possible
// Recommended Arduino baud rate: 115200
// Recommended Teensy 3 baud rate: 2000000 (2 Mb/s)
// DMX baud rate: 250000
// MIDI baud rate: 31250
#define DMXUSB_BAUDRATE 115200

// receive a DMX transmission
void myDMXCallback(int universe, char buffer[512]) {
  for (int index=0; index < 512; index++) { // for each channel, universe starts at 0
    int channel = index + 1; // channel starts at 0, so index 0 is DMX channel 1 and index 511 is DMX channel 512
    int value = buffer[index]; // DMX value 0 to 255
    if (universe == 0 && channel == 1) {
      digitalWrite(LED_BUILTIN, value > 127 ? HIGH : LOW);
    }
  }
}

DMXUSB myDMXUsb(
  // Stream serial,
  Serial,
  // int baudrate,
  DMXUSB_BAUDRATE,
  // int mode,
  0,
  // void (*dmxInCallback)(int universe, unsigned int index, char buffer[512])
  myDMXCallback,
  // universes
  1,
  // id?
  0x1ffffffa
);

void setup() {
  Serial.begin(DMXUSB_BAUDRATE);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  myDMXUsb.listen();
}

Should this "just work"? Open Lighting Architecture/olad sees the USB port, but doesn't recognize the device (USB Widget didn't respond to messages, esta id 0, device id 0). QLC+ recognizes it as a "dump" ftdi device and shoves data to it, but the arduino doesn't react as expected (I'm guessing it's the wrong data format). I did try various settings for the baud rate and mode. If you have any hints on this, I'd appreciate!
Best,
Benjamin.

Hey there,
by now, after some more debugging and tinkering, I found out that ola just needs more time to detect the device. If I increase the (hardcoded) timeout for the USB discovery phase from 200ms to 1200ms there, the Arduino Nano running DMXUSB with the code above is being recognized as Enttec compatible USB device :-). (I guess the Arduino just needs a little time to get the serial interface going and whatnot...)
I'd leave this info and the post above here for future reference, if that's ok.
Best,
Benjamin.

Hi Benjamin @bennigraf,
I'm interested in why the Arduino took so long to respond to OLA. That shouldn't really be the case.
I think the issue is the while (!Serial) {} block. The ATmega328 does not have a native USB port (there is a serial to USB chip on the ATmega328-based development boards), so this loop could just be waiting a while and then timing out and finally continuing. I have not tried this myself but that is my guess.
May you try removing that block and letting me know if OLA works with the default 200ms? Additionally, where in the OLA source are you modifying this timeout?
Thanks!
Perry

Hi Perry!
Removing the while (!Serial) {} didn't make any difference unfortunately. I didn't find a clear explanation of whether it's needed or not (seems to depend on the board type), so I tried both ways.
I did send a mail to the OLA mailing list with more details on the timeout changes: https://groups.google.com/g/open-lighting/c/6bhk62UrFf4 – it's in WidgetDetectorThread.h:76ff:
explicit WidgetDetectorThread(NewWidgetHandler *widget_handler,
                                  ola::io::SelectServerInterface *ss,
                                  unsigned int usb_pro_timeout = 1200,
                                                                 ^^^
                                  unsigned int robe_timeout = 200);

However, I found another explanation, which I'll copy from there:

I found out that initiating a serial connection towards the Arduino via USB always resets the device and makes it go through the bootloader again – this takes a considerate amount of time, which I didn't measure myself, but some people on the internet talk about 1-2 seconds. However I was able to program that Arduino Nano with just the DMXUSB "simplest" example without the bootloader (using another Arduino as programmer/ISP). In this mode, olad recognizes the device without any changes/within the original time limit of 200ms.

So the problem is the Arduino bootloader delay; the solution is to remove the bootloader. Increasing the timeout value as suggested (or make it configurable) is probably not worth it with this solution at hand. I'll just have it documented here for now :-).

What do you think about mentioning this in the readme of this repository (which would be a simpler solution than patching OLA)? I could create a PR for that if you want.
And finally, since the topic of this issue is kinda open anyways, let me mention that I found out that the baudrate in ola is hardcoded to 115200 (I guess most other Enttec-compatible device on the market just use that as a default) – so make sure to set it like that when you want to use this library with ola.
Best and thanks,
Benjamin.

I did send a mail to the OLA mailing list with more details on the timeout changes: https://groups.google.com/g/open-lighting/c/6bhk62UrFf4 – it's in WidgetDetectorThread.h:76ff:

Ah, sorry I missed that! Sometimes Google Groups goes to spam in my inbox.
The bootloader bit is interesting. When I originally wrote the library I was testing with an Arduino Mega and a Teensy 3.2. I'm surprised that I never encountered this, but it makes sense. I do agree this is more of a DMXUSB/Arduino issue than an OLA issue since OLA follows the Enttec specification (though I don't remember if they specify a timeout).

What do you think about mentioning this in the readme of this repository (which would be a simpler solution than patching OLA)? I could create a PR for that if you want.

That would be great! Please feel free to open a PR!

And finally, since the topic of this issue is kinda open anyways, let me mention that I found out that the baudrate in ola is hardcoded to 115200 (I guess most other Enttec-compatible device on the market just use that as a default) – so make sure to set it like that when you want to use this library with ola.

Yes and no. It depends on the devices on both ends. OLA will dictate opening a serial port with 115200 baud, but some software-/MCU-defined USB serial ports (like Teensy) do not actually support the OS changing the baud rate and force the OS to use what it is given (so OLA's preference is ignored). For the Arduino Nano and similar boards that have separate USB to serial chips the baud rate of the USB serial chip is adjusted by the OS. In that case the Arduino's serial pins must match with how the OS sets the USB serial chip.


[3.0.1-prepare]Modified version before release.

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

(or)
If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

Codecov Report

:exclamation: No coverage uploaded for pull request base (3.0.1-prepare@ffb58c1). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             3.0.1-prepare   #12038   +/-   ##
================================================
  Coverage                 ?   39.86%
  Complexity               ?     4582
================================================
  Files                    ?      888
  Lines                    ?    35140
  Branches                 ?     3866
================================================
  Hits                     ?    14007
  Misses                   ?    19771
  Partials                 ?     1362

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Hand tracking with Acer headset?

None of the hand tracking / air tap stuff seems to be working with my new Acer MR headset. Is it meant to or is this disabled? I'm running Unity 2017.2.0b5 and trying the scenes in Assets\HoloToolkit-Examples\InteractiveElements\Scenes. Everything else seems to work great.

I tried on both branches. Tried just putting logs in the OnSourceDetected events and am getting nothing

there was a similar question in the holodeveloper slack group yesterday. it was about the hp headset but maybe its the same for the acer one.

@zite - @FlorianJa is correct, there is no hand tracking at this time on the Immersive Headsets.  See documentation here: https://developer.microsoft.com/en-us/windows/mixed-reality/navigating_the_windows_mixed_reality_home

@zite: Can we close this issue, or would you like it left open for further discussion?

We can close it. Thanks.
On Mon, Aug 14, 2017 at 1:40 PM jessemcculloch<EMAIL_ADDRESS>wrote:

@zite https://github.com/zite: Can we close this issue, or would you
like it left open for further discussion?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/845#issuecomment-322303132,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMIMFzfxcFdZkD63Fje6w4qJrsHCWyOks5sYLC1gaJpZM4OyvRS
.


Create wassies.scss

The colors used in your skin make the interface unreadable, you should change with others or remove the skin to use the default theme.


"Cannot find an overload for ".ctor" and the argument count: "1"" error in Invoke-Analyzer (OSOE-560)

Rebuild the OSOCE solution.
Notice this error in the built output coming from Invoke-Analyzer:

65>Invoke-ScriptAnalyzer: E:\ShortPath\OSOCE1\tools\Lombiq.Analyzers.PowerShell\Lombiq.Analyzers.PowerShell\Invoke-Analyzer.ps1:119
65>Line |
65> 119 |  . ch-Object { Invoke-ScriptAnalyzer -Path $PSItem.FullName @analyzerPar .
65>     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65>     | Cannot find an overload for ".ctor" and the argument count: "1".

This is the same error as the one fixed in https://github.com/Lombiq/PowerShell-Analyzers/pull/24, but the offending line has nothing to do with SuppressMessage:
https://github.com/Lombiq/PowerShell-Analyzers/blob/dev/Lombiq.Analyzers.PowerShell/Invoke-Analyzer.ps1#L119
Jira issue

It's related to https://github.com/PowerShell/PSScriptAnalyzer/issues/1881 and should've been fixed as of https://github.com/Lombiq/PowerShell-Analyzers/commit/21203aaaeef1c4609de5ff0bf77702cf83108cce.
Yet I have the latest PSScriptAnalyzer version (1.21) and see this error too.

I see, thanks! @BenedekFarkas could you please chime in too?

I don't have a repro on the latest dev branch, even with a purged repo. Running the analysis manually in pwsh is also error-free.
BTW PS analysis runs in the workflow only (not in the build anymore) since https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/pull/390.
The base library was updated to 1.21 in #20 - do you have an earlier version installed too? If so, please try removing it (check both powershell and pwsh).

I get the same with the latest OSOCE dev fa00032518d5de90af474e21c4d6f9cbb2c35903 when running it from a PS console:

I have PSScriptAnalyzer v1.21.0 installed, i.e. the latest.

So, you don't have earlier versions installed anymore? From either Windows PS or PS Core?

Oh, wait. What you linked above (#24) is not actually a bugfix, just a cosmetic change. There was a bugfix related to suppress messages, but in Utility Scripts: https://github.com/Lombiq/Utility-Scripts/commit/96027b5acd66b25ab15155eb4da1e0bd839646eb
So, make sure that you use the latest dev of Infrastructure/Utility Scripts.
If that's still not working, then you can modify Invoke-Analyzer.ps1 to print out the name of the file it's checking before calling Invoke-ScriptAnalyzer on it, so you'll see which file causes the problem.

I had 1.20.0 installed in Windows PowerShell, but I don't see how that would make a difference. In any case, uninstalling it and running the command in Pwsh 7 as I did above still yields the same result.
I don't understand why Utility Scripts affects this, but pulling in its latest does change the error to:

Changing
$results = Find-Recursively -IncludeFile '*.ps1', '*.psm1', '*.psd1' -ExcludeDirectory node_modules |
    Where-Object { # Exclude /TestSolutions/Violate-Analyzers.ps1 and /TestSolutions/*/Violate-Analyzers.ps1
        $IncludeTestSolutions -or -not (
            $PSItem.Name -eq 'Violate-Analyzers.ps1' -and
            ($PSItem.Directory.Name -eq 'TestSolutions' -or $PSItem.Directory.Parent.Name -eq 'TestSolutions')) } |
    ForEach-Object { Invoke-ScriptAnalyzer -Path $PSItem.FullName @analyzerParameters }

foreach ($result in $results)
{
    $message = $result.RuleName + ': ' + $result.Message
    Write-FileError -Path $result.ScriptPath -Line $result.Line -Column $result.Column $message
}

to
$results = Find-Recursively -IncludeFile '*.ps1', '*.psm1', '*.psd1' -ExcludeDirectory node_modules |
    Where-Object { # Exclude /TestSolutions/Violate-Analyzers.ps1 and /TestSolutions/*/Violate-Analyzers.ps1
        $IncludeTestSolutions -or -not (
            $PSItem.Name -eq 'Violate-Analyzers.ps1' -and
            ($PSItem.Directory.Name -eq 'TestSolutions' -or $PSItem.Directory.Parent.Name -eq 'TestSolutions')) }

foreach ($result in $results)
{
    Write-Output $result.FullName
    Invoke-ScriptAnalyzer -Path $result.FullName @analyzerParameters
}

as a test yields this:

But! If I then change the script back to the original version, it runs to completion without errors (or without any output, really). Cleaning the repo doesn't change this either. WTF?

I had 1.20.0 installed in Windows PowerShell, but I don't see how that would make a difference. In any case, uninstalling it and running the command in Pwsh 7 as I did above still yields the same result.

To eliminate the differences between our environments and I've seen inconsistent behavior with multiple versions installed (especially with the two different PS versions). You don't need the older version installed anyway.

I don't understand why Utility Scripts affects this, but pulling in its latest does change the error to:

Utility Scripts is related due to the issue Dávid linked above that I opened: https://github.com/PowerShell/PSScriptAnalyzer/issues/1881
The symptom there was that we were analyzing scripts in OSOCE and of them calls Update-VisualStudioSolutionNuGetPackages (which is in Utility Scripts) and the same error was thrown (due to the SuppressMessage being incorrectly parameterized in Update-VisualStudioSolutionNuGetPackages - see what I linked above), even though that script is not actually involved in the analysis.

But! If I then change the script back to the original version, it runs to completion without errors (or without any output, really). Cleaning the repo doesn't change this either. WTF?

Now that sort of inconsistency is not something I've seen. Can you please try changing the evaulation of $results in the last line like this instead?
ForEach-Object { Write-Output $PSItem.FullName; Invoke-ScriptAnalyzer -Path $PSItem.FullName @analyzerParameters }

Thanks for explaining.
Changing the code yields something similar to above, but without any file being listed before the error:

This is actually repeatable, happens again and again.

I still don't have a local repro, but I've seen this pop up in Utility Scripts and Infrastructure Scripts. Re-running the failed workflow "fixed" it though, so it's hard to infer anything from it...

The NRE I mentioned above happens semi-regularly in OSOCE. Most recent is here.
As a band-aid solution, we could have a catch around the invoke for this exception and retry two more times if it happens. Because I've only ever seen this being solved by a rerun.

After some time since the issue was reported, are you still able to reproduce it, @Piedone?
I've been trying to do so but without success. The Invoke-Analyzer.ps1 script seems to be running fine for me, returning an empty output.

Some details of my environment:

PSScriptAnalyzer version: 1.21.0
PowerShell version: 7.3.8
Ran from commits:

fa00032518d5de90af474e21c4d6f9cbb2c35903 (referenced above)
824136915ef42b3947fcb717694d2640e8558635 (one of the latest)

I suspect that the set of files being analyzed may differ, being one of them a possible trigger of the issue.
PD: Invoke-Analyzer.ps1 seems to be analyzing itself. Probably the changes introduced here are something that doesn't adhere to the defined set of rules, being the cause of the errors displayed in the screenshot.

Yep, it happens randomly in OSOCE GHA builds. Seen it like two days ago too.

For one try (building locally), I couldn't reproduce it. But I guess this is because it happens randomly as Zoltán said.

Here's the recent example I mentioned: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/actions/runs/6589654527/job/17904585730#step:12:20

Here's the recent example I mentioned: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/actions/runs/6589654527/job/17904585730#step:12:20

Nice, thank you @Piedone.
Regarding running it locally, is it still reproducible for you like it was here? If so, does it happen every time you run the script or also "randomly" like in GHA?
Would like to involve @DAud-IcI as well, since he's the other person experiencing this locally back then.

I never tried to reproduce this specifically locally but it did happen randomly before, see my earlier comments. However, I don't think it's much use trying to do that: this is a PSScriptAnalyzer bug (see here: https://github.com/PowerShell/PSScriptAnalyzer/issues/1867), that only bothers our CI builds, and does this in a random manner. I think the only thing that needs to be done here is what I've written under https://github.com/Lombiq/PowerShell-Analyzers/issues/28#issuecomment-1760386409. Alternatively, we can just try the Verbose switch as suggested under the issue, if it doesn't produce too much useless output.

Sorry, to be honest I don't remember anything about this. At the moment I can't reproduce it either. I'll remember to write more context in the future.

Here's another one just now: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/actions/runs/6796866578/job/18477817075
Re-run fixed it: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/actions/runs/6796866578/job/18478061365

Also: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/actions/runs/6799522045/job/18486011918

Hmm. Despiste having the retries working when running the script locally, it seems the execution stops on GHA when encountering the first Write-Error statement.
May GHA be configured somewhere to immediately stop when a Write-Error statement is reached? If it ends up being an issue, we can switch to another type of command to write those messages on a retry.

Hmm, that could be down to ErrorActionPreference.

Before changing any configuration related to ErrorActionPreference in any GHA, would it make more sense to replace these two references to Write-Error here and here to something less severe, like Write-Warning?
And then see if any error comes up again after a couple of days when running from GHA.

Now that you mention it, it makes more sense to me anyway to use Write-Warning for retries and Write-Error only if we run out of retry attempts (even though the default ErrorActionPreference is Continue).

Looks good, I'm merging the things, we will wait and see if any error comes up again.


[Bug 1.8.9] Soul shard count does not increase on wither skeleton kill

Issue Description: Tried with both releases 2.2.3 and 2.2.5. The soul shard gets identified as wither skeleton soul shard when a wither skeleton is killed, then all subsequent kills of the same type do not increase the kill count of the soul shard. Tried with and without the soul looting thing enchantment.
What happens: Soul shard number count does not increase
What you expected to happen: The soul shard count to increase
Steps to reproduce:

Have any empty soul shard in hot-bar
Equip weapon of choice
(Assuming in nether fortress) put down skeleton spawner
Kill wither skeleton once for soul shard identifier, then 2nd tome to observe bug.
???
Obtain bug.

Affected Versions (Do not use "latest"):

Soul Shards: 2.2.3 and 2.2.5
Minecraft: 1.8.9
Forge: <IP_ADDRESS>4

Should be available on Curse shortly. Otherwise, here.


Get-Product-details-#28 / Get Wishlist data #27

Thanks @shamsmikdad for this contribution
looks fine for me,
except for security addition,
security:

bearerAuth: []

When you add security as global, all request will need a valid token, which is not the case.
better to remove it from project-wide, and keep it in each request as needed
Also, for best git practice, it is recommended to focus on task in the commit, do not modify non-task related code lines.
When you send commit for getting product details, I don't except to see other places updates, you can do those in separate commit, but it is safe to send it all in one PR

Looks great, merged 👍


Usage dashboard reports incorrect total plans

We noticed a discrepancy between total n plans as reported in the usage dashboard using the filters and total n plans when querying the dmptool database directly for many orgs, especially those with a lot of recent use.
One possible contributor is the related bug issue #1663 . It looks like another contributor is that a single plan with multiple contributors/roles (owner, co-owner, editor, etc) is counted multiple times, one for each role. The correct calculation would count individual plan IDs per Org - so if plan A has an owner from UCOP and two co-owners from UCSF it should be counted once for UCOP and once for UCSF.
@sjDCC do we want to include test plans in total n? I'm okay either way but at least the total n on the dashboard should reflect the total n listed in the plans table. if we exclude test plans in the usage db we should just state that somewhere.

Ideally the counts would list total plans and how many of those are marked as test. Can that be done?

No that's the query I used to get you counts that were close to the ones currently reported on usage dashboard. What we certainly want to do ensure is that:

We understand which plans should be counted under which circumstances. Since plans are not directly related to orgs, we have to take the user(s) role into account (owner, coowner, editor, read-only)
Test plans are those whose plans.visibility == 2 and for non-test plans plans.visibility != 2 so that should be fairly easy to break out for our statistics counts
We also now have a plans.completed flag in the database so we could differentiate counts that way as well (note that its based on our squishy % of answers logic though)

The hardest part is with determine what to do based on the user's role and whether or not they've 'removed' the plan from their My Dashboard page (we never actually delete a plan, just the user's role. I think the answer to that is that "it depends" so we need to look at the different scenarios and figure out what to do for each one.
@sjDCC and @stephaniesimms can you please go through these scenarios and define: A) which org(s) should include them on the Admin -> Plans list and B) which org(s) should include them in their usage statistics calculations?

A plan has only one owner from DCC.
A plan has multiple owners and editors but they are all from DCC.
A plan has one owner from DCC and was shared for read-only commenting with someone from UCOP
A plan has one owner from DCC and was shared for editing with someone from UCOP.
A plan has one owner from DCC and someone from UCOP was made a coowner.
A plan was created by someone at DCC and shared with multiple people (from various orgs) but all users have since 'removed' it so that it no longer appears on anyone's My Dashboard page.
A plan has an owner from DCC and a coowner from DCC. The coowner 'removed' it from their My Dashboard page.
A plan has an owner from DCC and a coowner from DCC. The original owner 'removed' it from their My Dashboard page.
A plan has an owner from DCC and a coowner from UCOP. The coowner 'removed' it from their My Dashboard page.
A plan has an owner from DCC and a coowner from UCOP. The original owner 'removed' it from their My Dashboard page.
A plan has an owner from DCC and a editor from DCC. The editor 'removed' it from their My Dashboard page.
A plan has an owner from DCC and a editor from UCOP. The editor 'removed' it from their My Dashboard page.
A plan has an owner from DCC and a editor from UCOP. The original owner 'removed' it from their My Dashboard page.
A plan has an owner from DCC and a read-only commenter from DCC. The original owner 'removed' it from their My Dashboard page.
A plan has an owner from DCC and a read-only commenter from UCOP. The original owner 'removed' it from their My Dashboard page.

So follow up questions:

Does it matter if the user's account is inactive?
Should test plans appear in the Admin -> Plans list?

I replied to your scenarios and questions above @briri but @sjDCC should confirm and/or suggest any changes. I made the following assumptions:

A plan should be counted in usage stats for an org if it has an affiliated owner or co-owner.
A plan should NOT be counted for editor and read only roles.
If all owners and co-owners have removed a plan it should not be counted in any usage stats but it may still appear on My Dashboard for editors and read only.
If all users have removed a plan it should not be counted in usage stats or appear in the UI anywhere.
If all users have deactivated/deleted their account, any associated plans should not be counted in usage stats or appear in the UI anywhere.
Test plans should appear in the admin plans table and be counted in usage stats. If we can distinguish test plans in the UI w/future design changes, great. Otherwise the downloadable report should be sufficient to clarify how many of the total n are test plans.

Yes, I agree with @stephaniesimms conclusions about when plans should show in stats and for which orgs.
Plans should show up where the (co-)owner belongs to that org and hasn't removed the plan. This may result in plans appearing in multiple orgs statistics where there are co-owners from different places. Plans shouldn't appear in the admin list or usage stats for an editor or view / comment role though. And we should de-duplicate so the plan only appears once if there are several co-owners at the same org.
When users are deactivated, their plans should come out of the counts and views. The only way it would remain is if there was another active co-owner.
Test plans should appear in counts but it should be easy to identify how many are marked as test.
Nice, clear summary Steph


keras_core tensor assignment error with TensorFlow and JAX backend

While trying to implement a model with keras_core, I faced a problem with  tensor assignment in TensorFlow and JAX:
This is the code I have tried:
tensor = keras_core.random.normal((2, 12))
tensor[0, 1] = 2

Updating tensor values is tricky in TensorFlow as the most popular (and inefficient) way is to convert it to a tf.Variable and then convert it back to tensor.
For JAX, we need to set up values using set and at methods.
Does keras_core has any cross-framework way of doing it?
The assignment code above works with the PyTorch backend.
Thank you!

TensorFlow does not support dynamic tensor assignment in this manner, while PyTorch does. I do not think TensorFlow Backend would be able to support it in this way, although I think one of the maintainers should be a better person to comment.

Thank you for the letting know @innat  @suvadityamuk.
For my problem, this seems the only way out:
def forward_with_coords(coords_input, image_size):
        """Positionally encode points that are not normalized to [0,1]."""
        if keras.backend.backend() == "tensorflow":
            import tensorflow as tf
            coords = tf.Variable(coords_input)
            coords[:, :, 0].assign(coords[:, :, 0] / image_size[1])
            coords[:, :, 1].assign(coords[:, :, 1] / image_size[0])
            return coords
        elif keras.backend.backend() == 'torch':
            coords = coords_input.clone()
            coords[:, :, 0] = coords[:, :, 0] / image_size[1]
            coords[:, :, 1] = coords[:, :, 1] / image_size[0]
            return coords
        else:
            coords = coords_input.copy()
            coords.at[:, :, 0].set(coords[:, :, 0] / image_size[1])
            coords.at[:, :, 1].set(coords[:, :, 1] / image_size[0])
            return coords

If you have any better way, please let me know.

coords = coords_input.copy()
coords.at[:, :, 0].set(coords[:, :, 0] / image_size[1])
coords.at[:, :, 1].set(coords[:, :, 1] / image_size[0])
return coords

I believe this is incorrect for JAX.  The .at[...].set(...) method returns a new tensor, so you would need to do
            coords = coords_input.at[:, :, 0].set(coords[:, :, 0] / image_size[1])
            coords = coords.at[:, :, 1].set(coords[:, :, 1] / image_size[0])
            return coords

JAX has the same issue as tensorflow, in that the tensors are immutable, so we can't just directly assign a slice via indexing.

To do tensor assignment, you can use the following solutions:

Use the backend-native solution. Some backends support tensor assignment, so you could use what they offer -- but keep in mind that your code will then be specific to that backend.
Use Keras Core assignment ops. There are 2 assignment ops:

scatter_update for updates indexed by coordinates
slice_update for block-shaped updates

These ops will work with all backends.
For instance you can do:
inputs = ops.zeros((5, 5))
start_indices = [3, 3]
updates = ops.ones((2, 2))
inputs = keras_core.ops.slice_update(inputs, start_indices, updates)

Which is equivalent to inputs[3:, 3:] = updates


Update api-access.md

Clarified the role required to approve API permissions

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.


[de] Fix sha256 url missing '/release/' to download kubectl

en PR https://github.com/kubernetes/website/pull/43100/files
/assign @rlenferink

@Arhell  We do occasionally see Netlify build failures. Could you try to trigger the build again by force-pushing empty commit.

/lgtm
/approve


Add description to DeviceBay in DeviceBayTemplate

Fixes: #1161

Looking at ComponentTemplateModel and ComponentModel, description is actually a field shared across all of these classes - so I wonder if rather than just making this a change to DeviceBayTemplate.instantiate() whether we should actually add description to all of the subclass instantiate() methods?

Yup! that's a valid point, but is it also needed in other instantiate()?

Looking at ComponentTemplateModel and ComponentModel, description is actually a field shared across all of these classes - so I wonder if rather than just making this a change to DeviceBayTemplate.instantiate() whether we should actually add description to all of the subclass instantiate() methods?

Yup! that's a valid point, but is it also needed in other instantiate()?

Don't see why not, seeing as its a shared field.


Named parameterized queries

Can you please support named parameterized queries?
We often have several column names with application side defaults and repeating ? with the same value is tedious.

Please be more specific with your questions or requests, @atomusr .
You can try the pdo_sqlsrv driver, which supports named parameters in queries.

Coming from a linux background, I don't like object oriented programming so I'm not going to use pdo driver. I'm using the "procedural" driver (sqlsrv_*).
I have the following query:
sqlsrv_begin_transaction($conn);
sqlsrv_query('INSERT INTO foo(production_date, update_date, overset_date)
VALUES(?, ?, ?)', new DateTime("now"), new DateTime("now"), new DateTime("now"));
sqlsrv_commit($conn);

All 3 columns are supposed to have "datetime now" that is "unique" within a transaction....which means with your driver, I have to do ? three times like above. With other DBMS like postgresql, the "datetime now" is unique within a transaction. I don't have to pass a PHP date, I can just do CURRENT_TIMESTAMP which will be unique within a transaction (that's not the problem, the problem is named parameterized queries).

Hi @atomusr , I think there are some misunderstandings. Using named parameters is something else. Please see the pdo_prepare example for more details.
In your scenario, sqlsrv driver also supports CURRENT_TIMESTAMP, like this:
$sql = "CREATE TABLE foo(DATE1 DateTime2, DATE2 DateTime2, DATE3 DateTime2)";
$stmt = sqlsrv_query($conn, $sql);

sqlsrv_begin_transaction($conn);
$sql = "INSERT INTO foo(DATE1, DATE2, DATE3) VALUES(CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)";
$stmt = sqlsrv_query($conn, $sql);
sqlsrv_commit($conn);

$sql = "SELECT * FROM foo";
$options = array('ReturnDatesAsStrings' => true);
$stmt = sqlsrv_query($conn, $sql, array(), $options);
$row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC);
var_dump($row);

And this is the output:
array(3) {
  ["DATE1"]=>
  string(27) "2021-09-13 16:30:07.2400000"
  ["DATE2"]=>
  string(27) "2021-09-13 16:30:07.2400000"
  ["DATE3"]=>
  string(27) "2021-09-13 16:30:07.2400000"
}

No, I don't think you understand. Let me explain.
sqlsrv_begin_transaction($conn);
sqlsrv_query($conn, 'INSERT INTO test(col1) VALUES(SYSUTCDATETIME())');
sleep(10);
sqlsrv_query($conn, 'INSERT INTO test(col1) VALUES(SYSUTCDATETIME())');
sqlsrv_query($conn, 'INSERT INTO test(col1) VALUES(SYSUTCDATETIME())');
sqlsrv_commit($conn);

For brevity, let's ignore any SQL or PHP "declaration" problems as this is a semi-pseudo real example that I ran locally.
Notice the delay of 10 seconds after the first command.
For the 3 records that are inserted WITHIN A TRANSACTION, what are the timestamps inserted??? Let's see:
2021-09-14 00:27:22.6203709
2021-09-14 00:27:32.6351712
2021-09-14 00:27:32.6359769
Disaster. Why are the timestamps different within a transaction.

@atomusr glad to hear you found a workaround. Do you have any more question?

Closing this issue @atomusr. Please feel free to ask to reopen this if you have more questions.


[Suggestion] Add MAX_HEAT and REQUIRE_HEAT attributes

There is currently a way to make potions require a minimum heat level to brew but there is no documented way to make potions require a maximum heat level or a specific range of allowed heat levels. Some applications for MAX_HEAT could be to turn water into ice, or create modded liquids like liquid oxygen if on top of a very cold block. An application for REQUIRE_HEAT could be a boiled meat recipe or a potion with more delicate heat requirements. A campfire may cook them right, but a lava block might incinerate the ingredients or cause them to denature. Likewise a lack of heat would cause it to not cook.

If these get implemented it might be worth renaming HAS_HEAT to something like MIN_HEAT to also remove ambiguity.

I like that idea, having a range of values opens up many cool possibilities. I will include this in v0.3.1, but since that may be in a while here is a workaround:
...
{
    "id": "HAS_HEAT",
    "params": {
        "heat": (your max + 1)
    }
},
{
    "id": "INVERT_COND"
},
{
    "id": "HAS_HEAT",
    "quickfail": "PASS",
    "params": {
        "heat": (your min)
    }
},
...

Here is how I got this:
HAS_HEAT(val) == (heat >= val) [for all positive integers val]
(heat <= your max) && (heat >= your min) ->
!(heat > your max) && (heat >= your min) ->
!(heat >= your max + 1) && (heat >= your min) ->
!HAS_HEAT(your max + 1) && HAS_HEAT(your min)
There are some limitations like 0 breaking it and different behavior for negative values.


Commands :: "k ef migration add" throws argument null exception (expecting the migration name) - but we should provide a nicer message

Fixed


Uncaught TypeError: scrollIntoView is not a function

Use: var scrollIntoView = require('scroll-into-view-if-needed');
And: scrollIntoView(elm, true, app.scrollIntoViewOptions);
Result:

Seems crazy that I should have to update all my code to use scrollIntoView.default()

Working on a client's site and they use this plugin, and I am getting the same issue. I cannot seem to get around it. I am going to try your code @gdibble . Thanks and I agree with you.

That is indeed crazy, probably a result of how the build step transforms es6 syntax to es5. I'll look into it.

I have created pull request #121 which will revert to pre-1.0.7 behaviour.

Fixed and released https://github.com/stipsan/scroll-into-view-if-needed/pull/121