jit compiler produces erroneous runtime optimizations on large applications

TLDR
Amount of classes somehow trigger bugs in runtime jit optimizations, particularly disabling of Inliner fixed the problem for both our internal codebase and generated example.
might be related to https://github.com/dart-lang/sdk/issues/54886
Description
Recently we faced a strange exception, the app would hit it once in a while and stop working till hot or full restart.
example: (actual list of dirty widgets might change)
FlutterError: buildScope missed some dirty elements.
This probably indicates that the dirty list should have been resorted but was not.
The list of dirty elements at the end of the buildScope call was
AnimatedBuilder
#0      BuildOwner.buildScope.<anonymous closure>
#1      BuildOwner.buildScope
#2      WidgetsBinding.drawFrame
#3      RendererBinding._handlePersistentFrameCallback
#4      SchedulerBinding._invokeFrameCallback
#5      SchedulerBinding.handleDrawFrame
#6      SchedulerBinding._handleDrawFrame
#7      _rootRun (dart:async/zone.dart:1398:13)
#8      _CustomZone.run (dart:async/zone.dart:1300:19)
#9      _CustomZone.runGuarded (dart:async/zone.dart:1208:7)
#10     _invoke (dart:ui/hooks.dart:147:10)
#11     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:338:5)
#12     _drawFrame (dart:ui/hooks.dart:112:31)

With each passing week, it became easier to reproduce it, to the point when we could not debug full application anymore. So it became clear that size of codebase directly affect reproducibility of this exception.
This idea was confirmed by experiment: removal of usages and imports of any large module extinguished exceptions completely. So imports are enough for reproduction, it doesn't matter if code is actually reachable.
Additional debugging showed that at some point the code in jit mode just started working incorrectly. The idea arose that inlining could somehow influence this and it was it. As soon as I replaced vm:prefer-inline by vm:never-inline behavior of the bug changed, and as soon as I completely disabled inlining the problem vanished.

example of such behavior
dart 2.19.6, flutter 3.7.12 https://drive.google.com/file/d/1AZij0axanL3FNaqV1EMotJJWy65EO020/view
00:08 - animation freezes
00:12 - buildScope exception happen
00:32 - replace vm:prefer-inline by vm:never-inline, and hot reload
01:52 - app is restarted
03:34 - assert _lifecycleState == ElementLifecycle.inactive
04:00 - opening _lifecycleState in debugger, it's actually .inactive, so the assertion is wrong

Steps to reproduce
example with reproduction: example project runtime

dart ./tools/generate.dart && flutter run
open and close keyboard a few times, typically 10 times is enough on example that large.
expected result: everything continues working
actual result: most content of the app is freezed, only focus node still triggers keyboard opening

videos with reproduction on different versions
dart 2.19.6, flutter 3.7.12 https://drive.google.com/file/d/1AZij0axanL3FNaqV1EMotJJWy65EO020/view
00:08 - animation freezes
00:12 - buildScope exception happen
00:32 - replace vm:prefer-inline by vm:never-inline, and hot reload
01:52 - app is restarted
03:34 - assert _lifecycleState == ElementLifecycle.inactive
04:00 - opening _lifecycleState in debugger, it's actually .inactive, so the assertion is wrong
dart 3.0.0, flutter 3.10.0 https://drive.google.com/file/d/1GlihHsz-rmH6KRxHczIPYSAFG9JZz-zo/view
00:28 - assert _lifecycleState == ElementLifecycle.inactive
00:43 - opening _lifecycleState in debugger, it's actually .inactive
dart 3.0.6, flutter 3.10.6 https://drive.google.com/file/d/1d5cleiZ_lcL_s84O9CAtCY1UJbCac_Hw/view
00:30 - assert _lifecycleState == ElementLifecycle.inactive
00:47 - opening _lifecycleState in debugger, it's actually .inactive
dart 3.2.2, flutter 3.16.2 https://drive.google.com/file/d/1CbFF9ZXYkMzynsF7mq-RGvIqwk3QP5rW/view
02:34 - assert _lifecycleState == ElementLifecycle.inactive
02:47 - opening _lifecycleState in debugger, it's actually .inactive
dart 3.3.0-197.0.dev, flutter master https://drive.google.com/file/d/1NIMoy17jWYEN1Q89FxFH1oEMRWs3wCYH/view
02:11 - assert _lifecycleState == ElementLifecycle.inactive
02:24  - opening _lifecycleState in debugger, it's actually .inactive

What have we tried to do to mitigate the issue internally

Disable inliner: https://github.com/2ZeroSix/sdk/compare/feature/reuse_patch_classes...2ZeroSix:sdk:feature/disable_inliner_for_debug

the bug was never reproduced with disabled inliner

Use as few mixins as possible. We couldn't determine why it mitigated the issue so effectively.

//cc @alexmarkov

I wasn't able to reproduce the problem both on the current Flutter and on 3.16.2.
@2ZeroSix Could you try reproducing the problem on the latest Flutter (main channel) once again? Also, please post the output of flutter doctor -v  and flutter run -v of the failing run.

@alexmarkov Sorry, I seem to have messed up the example to the point where it became impossible to reproduce in 3.6.12 and master, while trying to simplify it.
I've just updated it, the only difference is that i moved back a bunch of export directives, didn't expect it to be important.
Here are logs from flutter 3.16.2 (dart 3.2.2) and 3.19.0 (dart 3.3.0), but I couldn't reproduce it on master (flutter: 3.20.0-7.0.pre.64 dart: 3.4.0-140.0.dev) anymore.
Can't say whether it's an issue with an example or problem was somehow fixed, because our internal code is not ready yet to be built against newest versions. Currently there is a possibility that it was fixed somewhere between 3.3.0-197.0.dev and 3.4.0-140.0.dev, trying to investigate further.
3.16.2: flutter doctor -v

[!] Flutter (Channel stable, 3.16.2, on macOS 13.3.1 22E261 darwin-arm64, locale en-RU)
    • Flutter version 3.16.2 on channel stable at /Users/2zerosix/fvm/versions/3.16.2
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.2.6/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/2zerosix/fvm/versions/3.16.2. Consider adding /Users/2zerosix/fvm/versions/3.16.2/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9e1c857886 (3 months ago), 2023-11-30 11:51:18 -0600
    • Engine revision cf7a9d0800
    • Dart version 3.2.2
    • DevTools version 2.28.3
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/2zerosix/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/2zerosix/Library/Android/sdk
    • Java binary at: /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.11005911/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode14.3.1.app/Contents/Developer
    • Build 14E300b
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.11005911/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
    • IntelliJ at /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/213.6777.52/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.1)
    • IntelliJ at /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/223.8214.52/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

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

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554             • android-arm64  • Android 14 (API 34) (emulator)
    • macOS (desktop)             • macos                     • darwin-arm64   • macOS 13.3.1 22E261 darwin-arm64
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 121.0.6167.184
    ! Error: (null) needs to connect to determine its availability. Check the connection between the device and its companion iPhone, and the connection between the iPhone and Xcode. Both devices may also need to be restarted and unlocked. (code 1)
    ! Error: Bogdan’s iPhone is busy: Making Bogdan’s iPhone ready for development. Xcode will continue when Bogdan’s iPhone is finished. (code -10)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

3.16.2: dart ./tools/generate.dart && flutter pub get && flutter run -v

full logs: https://github.com/2ZeroSix/flutter_gen_snapshot_oom_example/blob/71638ba7be3b5a580c21199c4b002656af760376/logs/3.16.2.txt
[  +59 ms] ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
           The following assertion was thrown building _BodyBuilder:
           'package:flutter/src/widgets/framework.dart': Failed assertion: line 4509 pos 12: '_lifecycleState
           == _ElementLifecycle.inactive': is not true.

           Either the assertion indicates an error in the framework itself, or we should provide substantially
           more information in this error message to help you determine and fix the underlying cause.
                Normal element mounting (19 frames)
           #86     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4326:16)
           #87     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6871:36)
           #88     Element.updateChild (package:flutter/src/widgets/framework.dart:3837:18)
           #89     Element.updateChildren (package:flutter/src/widgets/framework.dart:4024:32)
           #90     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6896:17)
           #91     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #92     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #93     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #94     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
           #95     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #96     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #97     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
           #98     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #99     StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
           #100    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #101    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #102    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
           #103    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #104    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
           #105    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #106    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #107    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #108    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
           #109    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #110    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #111    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
           #112    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #113    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
           #114    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #115    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
           #116    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #117    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #118    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #119    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
           #120    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #121    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
           #122    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #123    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #124    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
           #125    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #126    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
           #127    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #128    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #129    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
           #130    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #131    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
           #132    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #133    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #134    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #135    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
           #136    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #137    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #138    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #139    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
           #140    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #141    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #142    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #143    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
           #144    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #145    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #146    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
           #147    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #148    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
           #149    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #150    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #151    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #152    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
           #153    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #154    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #155    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
           #156    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #157    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
           #158    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #159    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
           #160    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #161    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
           #162    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #163    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #164    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
           #165    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #166    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
           #167    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #168    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #169    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #170    StatelessElement.update (package:flutter/src/widgets/framework.dart:5547:5)
           #171    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
           #172    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
           #173    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
           #174    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2895:19)
           #175    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:984:21)
           #176    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:5)
           #177    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1325:15)
           #178    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:9)
           #179    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:5)
           #180    _invoke (dart:ui/hooks.dart:312:13)
           #181    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:5)
           #182    _drawFrame (dart:ui/hooks.dart:283:31)
           (elided 2 frames from class _AssertionError)

           ════════════════════════════════════════════════════════════════════════════════════════════════════
[  +12 ms] Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2106 pos 12: '_elements.contains(element)': is not true.
[  +16 ms] Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2106 pos 12: '_elements.contains(element)': is not true.
[  +51 ms] Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2106 pos 12: '_elements.contains(element)': is not true.
[  +13 ms] Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2106 pos 12: '_elements.contains(element)': is not true.
[  +14 ms] Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2106 pos 12: '_elements.contains(element)': is not true.
[  +34 ms] Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2106 pos 12: '_elements.contains(element)': is not true.
[  +17 ms] Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2106 pos 12: '_elements.contains(element)': is not true.

3.19.0: flutter doctor -v

[!] Flutter (Channel stable, 3.19.0, on macOS 13.3.1 22E261 darwin-arm64, locale en-RU)
    • Flutter version 3.19.0 on channel stable at /Users/2zerosix/fvm/versions/stable
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.2.6/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/2zerosix/fvm/versions/stable. Consider adding /Users/2zerosix/fvm/versions/stable/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision bae5e49bc2 (3 days ago), 2024-02-13 17:46:18 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/2zerosix/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/2zerosix/Library/Android/sdk
    • Java binary at: /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.11005911/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode14.3.1.app/Contents/Developer
    • Build 14E300b
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.11005911/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
    • IntelliJ at /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/213.6777.52/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.1)
    • IntelliJ at /Users/2zerosix/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/223.8214.52/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

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

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 14 (API 34) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 13.3.1 22E261 darwin-arm64
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 121.0.6167.184

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

3.19.0: dart ./tools/generate.dart && flutter pub get && flutter run -v

full logs: https://github.com/2ZeroSix/flutter_gen_snapshot_oom_example/blob/71638ba7be3b5a580c21199c4b002656af760376/logs/3.19.0.txt
[ +224 ms] ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
           The following assertion was thrown building _BodyBuilder:
           'package:flutter/src/widgets/framework.dart': Failed assertion: line 4518 pos 12: '_lifecycleState
           == _ElementLifecycle.inactive': is not true.

           Either the assertion indicates an error in the framework itself, or we should provide substantially
           more information in this error message to help you determine and fix the underlying cause.
           In either case, please report this assertion by filing a bug on GitHub:
             https://github.com/flutter/flutter/issues/new?template=2_bug.yml

           The relevant error-causing widget was:
             Scaffold
             Scaffold:file:///Users/2zerosix/Projects/flutter_gen_snapshot_oom_example/lib/main.dart:22:22

           When the exception was thrown, this was the stack:
           #2      Element.debugDeactivated (package:flutter/src/widgets/framework.dart:4518:12)
           #3      InheritedElement.debugDeactivated (package:flutter/src/widgets/framework.dart:5929:11)
           #4      _InactiveElements._deactivateRecursively.<anonymous closure> (package:flutter/src/widgets/framework.dart:2098:15)
           #5      _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2100:6)
           #6      ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #7      _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #8      ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #9      _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #10     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #11     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #12     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #13     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #14     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #15     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #16     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #17     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #18     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #19     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #20     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #21     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #22     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #23     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #24     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #25     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #26     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #27     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #28     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #29     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #30     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #31     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #32     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #33     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #34     Iterable.forEach (dart:core/iterable.dart:347:35)
           #35     SlottedRenderObjectElement.visitChildren (package:flutter/src/widgets/slotted_render_object_widget.dart:234:25)
           #36     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #37     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #38     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #39     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #40     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #41     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #42     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #43     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #44     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #45     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #46     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #47     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #48     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #49     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #50     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #51     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #52     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #53     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #54     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #55     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #56     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #57     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #58     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #59     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6744:14)
           #60     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #61     MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6856:16)
           #62     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #63     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5532:14)
           #64     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2096:13)
           #65     _InactiveElements.add (package:flutter/src/widgets/framework.dart:2108:7)
           #66     Element.deactivateChild (package:flutter/src/widgets/framework.dart:4377:30)
           #67     Element._retakeInactiveElement (package:flutter/src/widgets/framework.dart:4263:14)
           ...     Normal element mounting (19 frames)
           #86     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4335:16)
           #87     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6893:36)
           #88     Element.updateChild (package:flutter/src/widgets/framework.dart:3846:18)
           #89     Element.updateChildren (package:flutter/src/widgets/framework.dart:4033:32)
           #90     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6918:17)
           #91     Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #92     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #93     Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #94     ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5)
           #95     Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #96     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #97     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11)
           #98     Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #99     StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5)
           #100    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #101    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #102    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11)
           #103    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #104    StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5)
           #105    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #106    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #107    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #108    ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5)
           #109    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #110    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #111    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11)
           #112    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #113    StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5)
           #114    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #115    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6765:14)
           #116    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #117    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #118    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #119    ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5)
           #120    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #121    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6765:14)
           #122    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #123    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #124    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11)
           #125    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #126    StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5)
           #127    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #128    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #129    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11)
           #130    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #131    StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5)
           #132    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #133    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #134    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #135    ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5)
           #136    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #137    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #138    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #139    ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5)
           #140    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #141    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #142    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #143    ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5)
           #144    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #145    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #146    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11)
           #147    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #148    StatefulElement.update (package:flutter/src/widgets/framework.dart:5666:5)
           #149    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #150    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #151    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #152    ProxyElement.update (package:flutter/src/widgets/framework.dart:5809:5)
           #153    Element.updateChild (package:flutter/src/widgets/framework.dart:3824:15)
           #154    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5505:16)
           #155    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5643:11)
           #156    Element.rebuild (package:flutter/src/widgets/framework.dart:5196:7)
           #157    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2904:19)
           #158    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:989:21)
           #159    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:448:5)
           #160    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1386:15)
           #161    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1311:9)
           #162    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1169:5)
           #163    _invoke (dart:ui/hooks.dart:312:13)
           #164    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:399:5)
           #165    _drawFrame (dart:ui/hooks.dart:283:31)
           (elided 2 frames from class _AssertionError)

           ════════════════════════════════════════════════════════════════════════════════════════════════════
[   +2 ms] Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 2115 pos 12: '_elements.contains(element)': is not true.

@2ZeroSix Could you try reproducing the problem with Flutter at b23b3da9353592d6f5d7461ddda13616b00d1815 and 4b110de996eadc4e5080e4725f9d4073a3525914 ?
Flutter b23b3da9353592d6f5d7461ddda13616b00d1815  includes 8c5407b3ddf024dea09aa3db57cbf7c24cca6771 which fixed the bug which appears when there are >64K classes - it could potentially cause the problem you're seeing.

@alexmarkov Seems to be it! Thank you!
reproducible on 4b110de996eadc4e5080e4725f9d4073a3525914
exception 4b110de996eadc4e5080e4725f9d4073a3525914

[ +159 ms] ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
           The following assertion was thrown building _BodyBuilder:
           'package:flutter/src/widgets/framework.dart': Failed assertion: line 4519 pos 12: '_lifecycleState
           == _ElementLifecycle.inactive': is not true.

           Either the assertion indicates an error in the framework itself, or we should provide substantially
           more information in this error message to help you determine and fix the underlying cause.
           In either case, please report this assertion by filing a bug on GitHub:
             https://github.com/flutter/flutter/issues/new?template=2_bug.yml

           The relevant error-causing widget was:
             Scaffold
             Scaffold:file:///Users/2zerosix/Projects/flutter_gen_snapshot_oom_example/lib/main.dart:19:17

           When the exception was thrown, this was the stack:
           #2      Element.debugDeactivated (package:flutter/src/widgets/framework.dart:4519:12)
           #3      InheritedElement.debugDeactivated (package:flutter/src/widgets/framework.dart:5930:11)
           #4      _InactiveElements._deactivateRecursively.<anonymous closure> (package:flutter/src/widgets/framework.dart:2099:15)
           #5      _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2101:6)
           #6      ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #7      _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #8      ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #9      _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #10     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #11     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #12     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #13     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #14     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #15     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #16     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #17     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #18     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #19     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #20     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #21     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #22     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #23     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #24     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #25     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #26     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #27     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #28     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #29     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #30     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #31     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #32     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #33     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #34     Iterable.forEach (dart:core/iterable.dart:347:35)
           #35     SlottedRenderObjectElement.visitChildren (package:flutter/src/widgets/slotted_render_object_widget.dart:234:25)
           #36     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #37     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #38     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #39     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #40     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #41     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #42     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #43     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #44     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #45     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #46     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #47     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #48     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #49     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #50     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #51     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #52     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #53     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #54     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #55     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #56     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #57     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #58     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #59     SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6745:14)
           #60     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #61     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5533:14)
           #62     _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:2097:13)
           #63     _InactiveElements.add (package:flutter/src/widgets/framework.dart:2109:7)
           #64     Element.deactivateChild (package:flutter/src/widgets/framework.dart:4378:30)
           #65     Element._retakeInactiveElement (package:flutter/src/widgets/framework.dart:4264:14)
           ...     Normal element mounting (19 frames)
           #84     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4336:16)
           #85     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6894:36)
           #86     Element.updateChild (package:flutter/src/widgets/framework.dart:3847:18)
           #87     Element.updateChildren (package:flutter/src/widgets/framework.dart:4034:32)
           #88     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6919:17)
           #89     Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #90     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #91     Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #92     ProxyElement.update (package:flutter/src/widgets/framework.dart:5810:5)
           #93     Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #94     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #95     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5644:11)
           #96     Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #97     StatefulElement.update (package:flutter/src/widgets/framework.dart:5667:5)
           #98     Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #99     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #100    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5644:11)
           #101    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #102    StatefulElement.update (package:flutter/src/widgets/framework.dart:5667:5)
           #103    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #104    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #105    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #106    ProxyElement.update (package:flutter/src/widgets/framework.dart:5810:5)
           #107    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #108    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #109    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5644:11)
           #110    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #111    StatefulElement.update (package:flutter/src/widgets/framework.dart:5667:5)
           #112    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #113    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6766:14)
           #114    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #115    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #116    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #117    ProxyElement.update (package:flutter/src/widgets/framework.dart:5810:5)
           #118    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #119    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6766:14)
           #120    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #121    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #122    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5644:11)
           #123    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #124    StatefulElement.update (package:flutter/src/widgets/framework.dart:5667:5)
           #125    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #126    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #127    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5644:11)
           #128    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #129    StatefulElement.update (package:flutter/src/widgets/framework.dart:5667:5)
           #130    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #131    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #132    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #133    ProxyElement.update (package:flutter/src/widgets/framework.dart:5810:5)
           #134    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #135    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #136    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #137    ProxyElement.update (package:flutter/src/widgets/framework.dart:5810:5)
           #138    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #139    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #140    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #141    ProxyElement.update (package:flutter/src/widgets/framework.dart:5810:5)
           #142    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #143    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #144    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5644:11)
           #145    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #146    StatefulElement.update (package:flutter/src/widgets/framework.dart:5667:5)
           #147    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #148    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #149    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #150    ProxyElement.update (package:flutter/src/widgets/framework.dart:5810:5)
           #151    Element.updateChild (package:flutter/src/widgets/framework.dart:3825:15)
           #152    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5506:16)
           #153    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5644:11)
           #154    Element.rebuild (package:flutter/src/widgets/framework.dart:5197:7)
           #155    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2905:19)
           #156    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:993:21)
           #157    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:443:5)
           #158    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1387:15)
           #159    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1312:9)
           #160    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1170:5)
           #161    _invoke (dart:ui/hooks.dart:312:13)
           #162    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:399:5)
           #163    _drawFrame (dart:ui/hooks.dart:283:31)
           (elided 2 frames from class _AssertionError)

           ════════════════════════════════════════════════════════════════════════════════════════════════════

couldn't reproduce it on b23b3da9353592d6f5d7461ddda13616b00d1815
I'll try to cherry-pick it and try it on our internal code shortly

Thank you, it does really fix the problem that occurs in 3+ versions
The only thing that I still need to figure out is what is triggering "buildScope" variant of exception on 2.9.16, we'll probably stick to work-around with disabled inliner till the end of the migration to 3.0.0
Anyway https://github.com/dart-lang/sdk/commit/8c5407b3ddf024dea09aa3db57cbf7c24cca6771 has not only fixed this problem for versions higher than 3.0.0, but also another one that we haven't been able to report yet!
We were only able to reproduce it in our internal codebase, and we had no luck building an example with the reproduction. All we had is this stack trace: (For future readers: the issue has been fixed in flutter 3.20+)
===== CRASH =====
si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x3e149
version=2.19.6 (stable) (Tue Mar 28 13:41:04 2023 +0000) on "macos_arm"
pid=27043, thread=-1, isolate_group=isolate(0x7fce0300d000), isolate=(nil)(0x0)
os=macos, arch=arm, comp=no, sim=no
isolate_instructions=0, vm_instructions=0
  pc 0x000000010286d4bd fp 0x0000000309b99e40 dart::Class::LookupFunctionReadLocked(dart::String const&, dart::Class::MemberKind) const+0x1cd
  pc 0x000000010291dd16 fp 0x0000000309b99f00 dart::ResolveDynamicAnyArgsWithCustomLookup(dart::Zone*, dart::Class const&, dart::String const&, bool, std::_LIBCPP_ABI_NAMESPACE::function<dart::FunctionPtr (dart::Class&, dart::String const&)>)+0x296
  pc 0x000000010291d81e fp 0x0000000309b99f90 dart::ResolveDynamicForReceiverClassWithCustomLookup(dart::Class const&, dart::String const&, dart::ArgumentsDescriptor const&, bool, std::_LIBCPP_ABI_NAMESPACE::function<dart::FunctionPtr (dart::Class&, dart::String const&)>)+0x8e
  pc 0x000000010291d737 fp 0x0000000309b99ff0 dart::Resolver::ResolveDynamicForReceiverClass(dart::Class const&, dart::String const&, dart::ArgumentsDescriptor const&, bool)+0x47
  pc 0x0000000102a78309 fp 0x0000000309b9a040 dart::InstanceCallBaseInstr::ResolveForReceiverClass(dart::Class const&, bool)+0xa9
  pc 0x0000000102b329c7 fp 0x0000000309b9a0b0 dart::CallSpecializer::TryCreateICData(dart::InstanceCallInstr*)+0x227
  pc 0x0000000102b325d7 fp 0x0000000309b9a110 dart::CallSpecializer::ApplyClassIds()+0x137
  pc 0x0000000102b3e962 fp 0x0000000309b9a130 dart::CompilerPass_ApplyClassIds::DoBody(dart::CompilerPassState*) const+0x22
  pc 0x0000000102b3d4d0 fp 0x0000000309b9a200 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x1b0
  pc 0x0000000102b3d6eb fp 0x0000000309b9a230 dart::CompilerPass::RunInliningPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0x2b
  pc 0x0000000102aec37f fp 0x0000000309b9a740 dart::CallSiteInliner::TryInliningImpl(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool)+0x100f
  pc 0x0000000102ae0a56 fp 0x0000000309b9a7e0 dart::CallSiteInliner::TryInlining(dart::Function const&, dart::Array const&, dart::InlinedCallData*, bool)+0xf6
  pc 0x0000000102aef55b fp 0x0000000309b9a8d0 dart::CallSiteInliner::InlineStaticCalls()+0x56b
  pc 0x0000000102ae665f fp 0x0000000309b9a9f0 dart::CallSiteInliner::InlineCalls()+0x24f
  pc 0x0000000102ae62b1 fp 0x0000000309b9aaf0 dart::FlowGraphInliner::Inline()+0x1e1
  pc 0x0000000102b3e852 fp 0x0000000309b9ab60 dart::CompilerPass_Inlining::DoBody(dart::CompilerPassState*) const+0x52
  pc 0x0000000102b3d4d0 fp 0x0000000309b9ac30 dart::CompilerPass::Run(dart::CompilerPassState*) const+0x1b0
  pc 0x0000000102b3d9b9 fp 0x0000000309b9ac60 dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)+0xa9
  pc 0x0000000102a0fb89 fp 0x0000000309b9b330 dart::PrecompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)+0x5c9
  pc 0x0000000102a1068d fp 0x0000000309b9b9b0 dart::PrecompileFunctionHelper(dart::Precompiler*, dart::CompilationPipeline*, dart::Function const&, bool)+0x31d
  pc 0x0000000102a0b4c6 fp 0x0000000309b9bac0 dart::Precompiler::CompileFunction(dart::Precompiler*, dart::Thread*, dart::Zone*, dart::Function const&)+0x176
  pc 0x0000000102a08d51 fp 0x0000000309b9bb60 dart::Precompiler::ProcessFunction(dart::Function const&)+0xf1
  pc 0x0000000102a03024 fp 0x0000000309b9bbc0 dart::Precompiler::Iterate()+0x94
  pc 0x00000001029fdae9 fp 0x0000000309b9c310 dart::Precompiler::DoCompileAll()+0x1489
  pc 0x00000001029fc5db fp 0x0000000309b9c770 dart::Precompiler::CompileAll()+0xbb
  pc 0x0000000102bf1d38 fp 0x0000000309b9c8e0 Dart_Precompile+0x248
  pc 0x000000010274bf4b fp 0x0000000309b9ca70 dart::bin::main(int, char**)+0x9ab
  pc 0x000000020335a41f fp 0x0000000309b9cd00 Unknown symbol
-- End of DumpStackTrace
=== Crash occurred when compiling dart:ui__Channel@15065589__drainStep@15065589 in AOT mode in ApplyClassIds pass
*** BEGIN CFG
ApplyClassIds
==== dart:core_Iterable_get_isNotEmpty (GetterFunction)
B0[graph]:0 {
      v39 <- Constant(#null)
      v40 <- Constant(#<optimized out>)
}
B12[function entry]:2 {
      v41 <- Parameter(0)
      v42 <- Parameter(0) T{PatchClass}
}
    v43 <- InstanceCall:10( get:isEmpty<0>, v42 IC[0: ], result_type = T{bool?})
    AssertBoolean:12(v43)
    v44 <- BooleanNegate(v43)
    Return:14(v44)
*** END CFG
Dart snapshot generator failed with exit code -6
Target android_aot_release_android-arm failed: Exception: AOT snapshotter exited with code -6

@2ZeroSix thanks for confirming that the fix worked in your app. Can I go ahead and close this issue?

@2ZeroSix thanks for confirming that the fix worked in your app. Can I go ahead and close this issue?

Yes, I have one more question above, but it does have a working work-around and fixed in main.

Yes, I have one more question above, but it does have a working work-around and fixed in main.

You don't think https://github.com/dart-lang/sdk/commit/8c5407b3ddf024dea09aa3db57cbf7c24cca6771 fixed that issue?


fix(docs): update the link to contribution page

Hello
Fixing a broken link on the readme file

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.75%. Comparing base (0c7f83e) to head (7863f7f).
Report is 51 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #809      +/-   ##
==========================================
+ Coverage   81.43%   81.75%   +0.32%
==========================================
  Files          97       98       +1
  Lines       23877    24324     +447
==========================================
+ Hits        19445    19887     +442
- Misses       4432     4437       +5

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Unable to perform initial creation of aws_auth configmap

I have issues
I'm submitting a...

[x] bug report
[ ] feature request
[x] support request
[ ] kudos, thank you, warm fuzzy

What is the current behavior?
It's possible this is somehow user error, since I have used the module recently, and it worked fine, but there appears to be a chicken and egg problem in setting up AWS auth.
The module fails to upload the aws_auth config map because it's use --kubeconfig and setting it to use a kubeconfig that is using the newly provisioned AWS role. The problem is that since the aws_auth config map hasn't been created yet, that role has no permissions and is not able to be used to upload the configmap, it fails with an unauthorized request to k8s.
The offending line should be this one. https://github.com/terraform-aws-modules/terraform-aws-eks/blob/8580b678139ff491db2ff25f414c913bf7d37008/aws_auth.tf#L18
The easy workaround I've been using is to remove the role from the kubeconfig locally and applying the config map by hand, and then running terraform again to finish out our apply.
If this is a bug, how to reproduce? Please include a code sample if relevant.
Create a EKS cluster with the module. The behavior should be present if the module is configured to apply aws_auth to the cluster
What's the expected behavior?
the aws_auth file should upload successfully, possibly using a custom version of the kubeconfig that doesn't attempt to set a role (until after the role is created)
Are you able to fix this problem and submit a PR? Link here if you have already.
If this is confirmed to be a bug, I can make a PR, but I'm not exactly sure what the right fix would be. Making a second rendered kubeconfig seems heavy handed, and there might be something better.
Environment details

Affected module version: 4.0.2
OS: OsX
Terraform version: 0.11.13

Any other relevant info

The problem is that since the aws_auth config map hasn't been created yet, that role has no permissions and is not able to be used to upload the configmap, it fails with an unauthorized request to k8s.

If you create the cluster then you should have access to apply the configmap: https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html

When an Amazon EKS cluster is created, the IAM entity (user or role) that creates the cluster is added to the Kubernetes RBAC authorization table as the administrator (with system:master permissions. Initially, only that IAM user can make calls to the Kubernetes API server using kubectl.

Yes, I was able to resolve the issue by applying the configmap manually, but to me it still seems like a problem that the module cannot successfully apply the configmap itself. The code to do so simple does not work.
This limitation should either be mentioned somewhere in the readme, or resolved. I'm just trying to figure out what approach seems reasonable before I open a PR. I've not contributed to here before, and I want to do my best to make sure a PR would be accepted before I invest any significant effort.

seems like a problem that the module cannot successfully apply the configmap itself

Yes. You applying it manually and the module doing it should be effectively the same.

This limitation should either be mentioned somewhere in the readme

It's a bug then. It should be applied by the module.
If you can debug on in your env workout why it's not working and create a PR to fix then great!

I managed to track this down to our use of kubeconfig_aws_authenticator_additional_args setting to set a role change as part of our auth scheme (after creation we manage all k8s access via roles).
kubeconfig_aws_authenticator_additional_args = ["-r", "${var.admin_primary_role}"]
I can't think of a sane way to handle the initial bootstrap given that this is an optional flag, and it's just our use of it that causes the problem.
Since its our settings that are causing the problem, I don't think I would count this as a bug anymore.
Thank you for all the help and for maintaining this great project.


Sc 197050/remove current agg period min from bridge

Remove the current agg period min config from the bridge and instead us the sample duration to calculate buffer sizes. Also use the sample period end in the bridgePowerController to send a task notification to the aanderaaController to end and aggregation period and send samples to the report builder.

I think this looks good, but I'd love it if you could teach us what's going on by adding a few PR comments.

@towynlin I added some comments. LMK if you have more questions!


how to modify response body on the fly?

Summary
SUMMARY_GOES_HERE
Steps To Reproduce
1.a plugin which implement body_filter
2.I can not replace the content,because the value
of ngx.arg[1] is not string.
this is what is the out put of log :
IHDR szz�sRGB���gAMA��
�a	pHYs���o�d�IDATXG���M�0�;#t^��<�DA$U_��AQ&���:BF̝?�+���i*���C���}�ow6���
DA�����C�%o�%"��R{o���W��/�y����E�ܜ�6�
{&1����KաO�j,!2��6�pL%����${t�8��&%2C����%�
GM���~g������߫����E������S���(1�X"�c,�?h1���x�����;b�z��[�mq��ybK� � �N
��Dư��=��'8��j�8��2?��כ��
��WP8'2$��m-�\p��
��������	,
Additional Details & Logs

Kong version ($ kong version)
2.0.4
Kong debug-level startup logs ($ kong start --vv)
Kong error logs (<KONG_PREFIX>/logs/error.log)
Kong configuration (the output of a GET request to Kong's Admin port - see
https://docs.konghq.com/latest/admin-api/#retrieve-node-information)

function plugin:body_filter(config)
   if string.match(ngx.arg[1],"") then
      ngx.arg[1] = ngx.re.sub(ngx.arg[1],"",abcd)
      kong.log.notice("ngx arg------>",ngx.arg[1])
    end
end

Operating system
docker kong alpine

Hello @zffocussss,
The interface for handling bodies in openresty is complicated, because you are forced to deal with them in "chunks".
Here's an example of how do do what you want with a simple plugin which just converts the body to uppercase:
https://github.com/Kong/kong-plugin-uppercase-response/blob/master/kong/plugins/uppercase-response/handler.lua#L10-L26
Another thing that you have to take into account is that the upstream server might be returning compressed bodies. You might want to modify the request header to request plain responses.

Hello @zffocussss,
The interface for handling bodies in openresty is complicated, because you are forced to deal with them in "chunks".
Here's an example of how do do what you want with a simple plugin which just converts the body to uppercase:
https://github.com/Kong/kong-plugin-uppercase-response/blob/master/kong/plugins/uppercase-response/handler.lua#L10-L26
Another thing that you have to take into account is that the upstream server might be returning compressed bodies. You might want to modify the request header to request plain responses.

it is true


why does PMID:22267499 appear on ppa3 gene page

from https://github.com/pombase/curation/issues/3439
PMID:22267499
Is it in the PubMed Keywords?
I think we discussed at some point , but I can't find a ticket, that  for curated papers we could ignore the PubMed  gene list and only put on the pages which the gene has an annotation. This would  also prevent the linking of papers for the wrong gene via synonyms etc.

Is it in the PubMed Keywords?

I checked.  There are no genes from PubMed keywords for PMID:22267499.
The problem is this case is a an unwanted side effect of trying to keep things simple.  (ie. a bug)
The Literature list on the gene pages shows all the publications referenced by anything on the gene page.  That mostly works well but in this case it's including a publication it shouldn't.
The ppa2Δ allele has a synonym ppa2-delta from Canto session for PMID:22267499 (291d614ef0c90bc4):
https://www.pombase.org/allele/SPBC16H5.07c:allele-1
ppa2Δ is part of a genotype on the ppa3 page.  The publications that ppa2 references (including synonym refs) are pulled in and are shown in the Literature section.
I'll fix that!
The genotype pages have the same problem:
https://www.pombase.org/genotype/ppa2delta_ppa2delta
PMID:22267499 shouldn't be in the Literature section because ppa2Δ/ppa2Δ isn't mentioned in PMID:22267499 and isn't on the publication page.
I'll fix that too.

That's all fixed but needs a nightly load.  I'll check pombase.org on Tuesday morning.
There are other examples like PMID:2544292 in the ppa3 page Literature section that shouldn't be there.  It's the same bug: PMID:2544292 is from an allele synonym (bws1Δ synonym of dis2Δ)

That's all fixed but needs a nightly load. I'll check pombase.org on Tuesday morning.

The load didn't work last night so I'll check tomorrow.

Fixed!


sweeppy: fix Python 3 compatibility

Rationale: ctypes.c_char_p map C char* to Python byte objects.
Thus, encoding Python strings is required before passing it as argument.
This fixes a opening serial port failed problem when using Python 3.

Ouch, this is a sneaky one! Thanks for catching it!


Ques about l_gm in  line 116 of msatrain.py

Dear author:
Your excellent work really attract me, and i have read your great corresponding accepted nips24 paper, but i have a important question about the l_gm in  line 116 of msatrain.py. Specifically(like the read line in the picture), Does the constant calculate by the different epoch of acc have any special meaning, it seems have no relation with gradient and backwork. Could you please help me deal with it? looking forward to your early reply.

Best regards,
LXE

Thanks for your interest. The similarity is between -1 and 1, so adding this constant term ensures the loss is always positive.

Thanks for your interest. The similarity is between -1 and 1, so adding this constant term ensures the loss is always positive.

but i‘m still confused that (add the constant )it's seems have no relation with model optimization and loss backward in classification. if we remove the constant , whether this will have an impact on model optimization and result?


Usability stuff

Leave game-popup on all game pages (Host)

[ ] host-game
[ ] host-session-end
[ ] host-voting
[ ] host-waiting

Disconnected stuff:

[x] Give players a notification if host left the game
[ ] Give user feedback if a player disconnected (grayed out)

Other stuff:

[ ] Player icons
[ ] Display which players have voted (hostVoting)
[ ] Fix how-to-play text scaling on mobile

Fix how-to-play text scaling by using responsive design (sm and lg) in navbar.tsx?
        <div
          className="bg-white dark:bg-gray-800 p-6 rounded shadow-lg sm:w-1/2 lg:w-1/3 mx-auto mt-24 fixed inset-0 flex items-center justify-center overflow-auto"
          onClick={() => setHowToPlayModalOpen(false)}
        >


BUG : Text Alignment in Page headings and Description

Describe the bug
"About Us" Page heading and its description is aligned in the center while other pages have inappropriate alignment.
Expected behavior

There should be a proper center alignment of text for other pages heading as well.
Screenshots (Mandatory)
ABOUT US -

OTHERS -

Additional Context (Mandatory )
I want to align and make the website's alignment and view look nice.
Are you contributing under any open-source program ?

GSSoC'24

@yeolesanskruti u are assigned


Semantic Token Type / Tooltip Info changes depending on order of Assignments

 Environment data

Language Server version: 2024.2.106
OS and version: win32 x64
Python version (and distribution if applicable, e.g. Anaconda): 3.12
python.analysis.indexing: true
python.analysis.typeCheckingMode: standard

 Code Snippet
#                            # Semantic Token Type (Modifier) | Tooltip

def def_first(): ...         # function (declaration)
def_first = lambda: None     # function ()

lambda_first = lambda: None  # variable (declaration)
def lambda_first(): ...      # variable ()

 Expected behavior
Both def_first and lambda_first are treated identically with regard to semantic highlighting and their type that is displayed in the tooltip.
 Actual behavior

def_first is considered a function, whereas lambda_first is considered a variable.
In the outline view and the auto-complete popup, both are displayed as functions.
Probably related: https://github.com/microsoft/pyright/issues/7440

Thanks for the issue. Since Eric fixed the constant problem, that may fix the semantic highlighting issue when we next update our Pyright bits. I'll wait and try this then.

Going to won't fix this. It works as expected if the two entries are not rewritten, which seems like the more common case. I don't think we'd spend the time to fix this when they're reassigned.


aiven provider upgrade to 3.6.0 causing deprecated Resources

What can we help you with?
Trying to leverage the additonal_disk_space feature and upgraded the aiven provider version from 2.1.15 to version 3.6.0 for TSDB. However, post upgrade getting the below Deprecated warnings
`╷
│ Warning: Deprecated Resource
│
│   with aiven_service_user.default-user,
│   on main.tf line 86, in resource "aiven_service_user" "default-user":
│   86: resource "aiven_service_user" "default-user" {
│
│ Please use service-specific resources instead of this one, for example:
│ aiven_kafka_user, aiven_pg_user etc.
│
│ (and 5 more similar warnings elsewhere)
╵
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.out
To perform exactly these actions, run the following command to apply:
terraform apply "plan.out"
Releasing state lock. This may take a few moments...`
If I change the specific resources ( For Example aiven_database to aiven_pg_database) the specific resource is getting destroyed if I apply the changes.
` # (because aiven_database.default-db is not in configuration)

resource "aiven_database" "default-db" {

database_name          = "test1" -> null
id                     = "xyz-123/tsdb-test1/test1" -> null
lc_collate             = "en_US.UTF-8" -> null
lc_ctype               = "en_US.UTF-8" -> null
project                = "xyz-123" -> null
service_name           = "tsdb-test1" -> null
termination_protection = false -> null
}

aiven_pg_database.default-db will be created

resource "aiven_pg_database" "default-db" {

database_name          = "test1"
id                     = (known after apply)
project                = "xyz-123"
service_name           = "tsdb-test1"
termination_protection = false
}
`

any way to overcome this issue ?

Hi @kamaraj-muthupandian, I would recommend removing old resources like: aiven_database and aiven_service from the state and importing them using new Aiven resources like aiven_pg, aiven_pg_user etc., after upgrading to v3.

Thank you @ivan-savciuc . I am able to fix that deprecated resources issue after following your steps.


yo command for removing component

Would it be desirable to have a yo command to remove a component and its associated styl and test?

Hi @yipcma,
that would be possible. However, there could be stuff missing (e.g. the user has already removed the associated styles or moved the component). Will have a look at it and eventually include it in the next major release.


Colour and formatting changes are reset on interacting with filters if group tooltip is set

DG 1.15.4, 1.16.6
Steps to reproduce:

Open a table, e.g. SPGI
Change format for some column
Set colouring for some column
Right click on the table > tooltip > use as group tooltip
Open filters and hover some filter or add a viewer using group tooltip and hover it (e.g. bar chart, histogram)

Expected results: interaction with filters or other viewers does not reset colouring or formatting.
Actual results: Colouring is removed, formatting is reset to default.
Issue can be reproduced for a newly set colouring/formatting and for colouring /formatting applied with layout.

DG 1.17.0


:soap: Move inline hooks to utils

Move inline hooks to utils

@yaacov Does this change the look and feel of the UI? i don't think so, just want to check.


Adding Support for Wild Cards and More Games

James, I know you have been looking to add Video Poker and other games to
CasinoRPG. As a community contribution, I would like to offer an update to your
pokersolver that handles different games with different rules.
UPDATE SUMMARY:
Added support for Jokers, notated here as 'Or'
Added support for Wild Cards in general, as deuces may be considered wild.
Added Game class to tell Hand what rule set to use.
Added game support: Jacks or Better, Joker Poker, Deuces Wild, Three Card Poker,
Four Card Poker, Pai Gow Poker.
Added new hand solvers to account for new possible hands.
Added Pai Gow Poker Helper class to support Pai Gow Poker rules.
Unit tests are included for all games expected to be played.

Wow, this is fantastic! I'm blown away by this PR and can't fully express how appreciative we are of all of the hard work that clearly went into this. We've been talking about wanting support for wilds and other game types, but weren't sure if we'd have time to get it implemented anytime soon with everything else we've got going on, so now that question has been answered :smile:
I've done some basic cleanup and also tweaked the API so that the game type was optional and only needed to be entered as a string and added it to https://github.com/goldfire/pokersolver/tree/wschmrdr-add_joker_support.
Before merging this in, I'm curious on what you think about splitting Pai Gow support into its own file that depends on pokersolver.js so that it is a little more modular.

Glad to be of help with the project. I've been looking for ways to give back to the open source development community, and I'm happy to have the opportunity here. :)
Changes look just fine. :)
Regarding the Pai Gow support, I was a little torn on whether or not I should put this into a different file myself. I chose what I did on the basis of how intertwined it is with everything else in pokersolver.js before I even started developing Pai Gow Poker. Obviously usage of require.js handles most of that, but I had to take into account values, which PaiGowPokerHelper uses, but isn't in any class. I can fully understand separating it and finding a way to get values accessible by both files, as pokersolver.js is over 1000 lines. I'd be happy with either way.

That is true, I think it might make sense to break it up some more in a future update, but this seems to work great as-is right now. Thanks again, really great contribution!


Update dependencies

Update dependencies to remove some of the duplicated crates, e.g. syn, lazy_static, etc.

closing in favor of #77


nixos/redis: add requirePassFile option

Avoids having the password in the nix store.

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

@GrahamcOfBorg test redis


build for ARM

Hi!
Lib built successfully for x86 on my Linux machine. But also I would to build this for ARMv7 and stuck.
I have gcc-7 and g++-7 cross compiler arm-linux-gnueabi. OpenSSL and Zlib successfully compiled by this compiler and installed.
Below the output of first cmake instruction:
cmake -DCMAKE_INSTALL_PREFIX=/home/doctorrokter/dev/td/dist/arm -DCMAKE_BUILD_TYPE=Release ..

-- The C compiler identification is GNU 7.2.1
-- Check for working CXX compiler: /home/doctorrokter/dev/gcc-linaro-7.2.1/bin/arm-linux-gnueabihf-g++
-- Check for working CXX compiler: /home/doctorrokter/dev/gcc-linaro-7.2.1/bin/arm-linux-gnueabihf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /home/doctorrokter/dev/gcc-linaro-7.2.1/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /home/doctorrokter/dev/gcc-linaro-7.2.1/bin/arm-linux-gnueabihf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found ccache
-- Found OpenSSL: /usr/arm/openssl/lib/libssl.a;/usr/arm/openssl/lib/libcrypto.a (found version "1.0.2o")
-- Found OpenSSL: /usr/arm/openssl/include /usr/arm/openssl/lib/libssl.a;/usr/arm/openssl/lib/libcrypto.a
-- Performing Test HAVE_STD14
-- Performing Test HAVE_STD14 - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WIMPLICIT_FALLTHROUGH_2
-- Performing Test HAVE_CXX_FLAG_WIMPLICIT_FALLTHROUGH_2 - Success
-- Performing Test HAVE_CXX_FLAG_WPOINTER_ARITH
-- Performing Test HAVE_CXX_FLAG_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_FLAG_WCAST_QUAL
-- Performing Test HAVE_CXX_FLAG_WCAST_QUAL - Success
-- Performing Test HAVE_CXX_FLAG_WSIGN_COMPARE
-- Performing Test HAVE_CXX_FLAG_WSIGN_COMPARE - Success
-- Performing Test HAVE_CXX_FLAG_WDUPLICATED_BRANCHES
-- Performing Test HAVE_CXX_FLAG_WDUPLICATED_BRANCHES - Success
-- Performing Test HAVE_CXX_FLAG_WDUPLICATED_COND
-- Performing Test HAVE_CXX_FLAG_WDUPLICATED_COND - Success
-- Performing Test HAVE_CXX_FLAG_WALLOC_ZERO
-- Performing Test HAVE_CXX_FLAG_WALLOC_ZERO - Success
-- Performing Test HAVE_CXX_FLAG_WLOGICAL_OP
-- Performing Test HAVE_CXX_FLAG_WLOGICAL_OP - Success
-- Performing Test HAVE_CXX_FLAG_WTAUTOLOGICAL_COMPARE
-- Performing Test HAVE_CXX_FLAG_WTAUTOLOGICAL_COMPARE - Success
-- Performing Test HAVE_CXX_FLAG_WVLA
-- Performing Test HAVE_CXX_FLAG_WVLA - Success
-- Performing Test HAVE_CXX_FLAG_WNON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_FLAG_WNON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_FLAG_WUNUSED_PARAMETER
-- Performing Test HAVE_CXX_FLAG_WUNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_FLAG_WCONVERSION
-- Performing Test HAVE_CXX_FLAG_WCONVERSION - Success
-- Performing Test HAVE_CXX_FLAG_WSIGN_CONVERSION
-- Performing Test HAVE_CXX_FLAG_WSIGN_CONVERSION - Success
-- Performing Test HAVE_CXX_FLAG_WCXX14_COMPAT_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_WCXX14_COMPAT_PEDANTIC - Failed
-- Performing Test HAVE_CXX_FLAG_QUNUSED_ARGUMENTS
-- Performing Test HAVE_CXX_FLAG_QUNUSED_ARGUMENTS - Failed
-- Performing Test HAVE_CXX_FLAG_WODR
-- Performing Test HAVE_CXX_FLAG_WODR - Success
-- Performing Test HAVE_CXX_FLAG_FLTO_ODR_TYPE_MERGING
-- Performing Test HAVE_CXX_FLAG_FLTO_ODR_TYPE_MERGING - Success
-- Found ZLIB: /usr/local/lib/libz.so (found version "1.2.11")
-- Found ZLIB: /usr/local/include /usr/local/lib/libz.so
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Performing Test GNU_READLINE_FOUND
-- Performing Test GNU_READLINE_FOUND - Failed
-- Could NOT find Readline (missing:  READLINE_INCLUDE_DIR READLINE_LIBRARY)
-- Could NOT find Readline
-- Configuring done
-- Generating done
-- Build files have been written to: /home/doctorrokter/dev/td/build

After that I type:
cmake --build .

And then got:
Scanning dependencies of target tdsqlite
[  1%] Building C object sqlite/CMakeFiles/tdsqlite.dir/sqlite/sqlite3.c.o
[  1%] Linking C static library libtdsqlite.a
[  1%] Built target tdsqlite
Scanning dependencies of target generate_mime_types_gperf
[  2%] Building CXX object tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/generate_mime_types_gperf.cpp.o
[  2%] Linking CXX executable generate_mime_types_gperf
[  2%] Built target generate_mime_types_gperf
Scanning dependencies of target tdmime_auto
[  2%] Generating ../../../tdutils/generate/auto/mime_type_to_extension.gperf, ../../../tdutils/generate/auto/extension_to_mime_type.gperf
/home/doctorrokter/dev/td/build/tdutils/generate/generate_mime_types_gperf: 1: /home/doctorrokter/dev/td/build/tdutils/generate/generate_mime_types_gperf: Syntax error: word unexpected (expecting ")")
tdutils/generate/CMakeFiles/tdmime_auto.dir/build.make:70: recipe for target '../tdutils/generate/auto/mime_type_to_extension.gperf' failed
make[2]: *** [../tdutils/generate/auto/mime_type_to_extension.gperf] Error 2
CMakeFiles/Makefile2:649: recipe for target 'tdutils/generate/CMakeFiles/tdmime_auto.dir/all' failed
make[1]: *** [tdutils/generate/CMakeFiles/tdmime_auto.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Have no ideas what's wrong, because for x86 build all worked fine.

Some TDLib sources are generated and that can't be done directly when the library is cross-compiled. You need to run ones a native build to generate these sources before running cross-compilation:
mkdir build_native
cd build_native
cmake ..
cmake --build . --target prepare_cross_compiling

Thanks for response!
Tried, but no luck.. Same error message as above, but in another place:
doctorrokter@MISHA-PC:~/dev/td/build$ cmake --build . --target prepare_cross_compiling
Scanning dependencies of target tdtl
[  0%] Building CXX object tdtl/CMakeFiles/tdtl.dir/td/tl/tl_config.cpp.o
[ 12%] Building CXX object tdtl/CMakeFiles/tdtl.dir/td/tl/tl_core.cpp.o
[ 12%] Building CXX object tdtl/CMakeFiles/tdtl.dir/td/tl/tl_file_outputer.cpp.o
[ 12%] Building CXX object tdtl/CMakeFiles/tdtl.dir/td/tl/tl_generate.cpp.o
[ 12%] Building CXX object tdtl/CMakeFiles/tdtl.dir/td/tl/tl_outputer.cpp.o
[ 25%] Building CXX object tdtl/CMakeFiles/tdtl.dir/td/tl/tl_string_outputer.cpp.o
[ 25%] Building CXX object tdtl/CMakeFiles/tdtl.dir/td/tl/tl_writer.cpp.o
[ 25%] Linking CXX static library libtdtl.a
[ 25%] Built target tdtl
Scanning dependencies of target generate_common
[ 25%] Building CXX object td/generate/CMakeFiles/generate_common.dir/generate_common.cpp.o
[ 37%] Building CXX object td/generate/CMakeFiles/generate_common.dir/tl_writer_cpp.cpp.o
[ 37%] Building CXX object td/generate/CMakeFiles/generate_common.dir/tl_writer_h.cpp.o
[ 37%] Building CXX object td/generate/CMakeFiles/generate_common.dir/tl_writer_hpp.cpp.o
[ 50%] Building CXX object td/generate/CMakeFiles/generate_common.dir/tl_writer_jni_cpp.cpp.o
[ 50%] Building CXX object td/generate/CMakeFiles/generate_common.dir/tl_writer_jni_h.cpp.o
[ 50%] Building CXX object td/generate/CMakeFiles/generate_common.dir/tl_writer_td.cpp.o
[ 62%] Linking CXX executable generate_common
[ 62%] Built target generate_common
Scanning dependencies of target tl_generate_common
[ 75%] Generate common tl source files
/home/doctorrokter/dev/td/build/td/generate/generate_common: 1: /home/doctorrokter/dev/td/build/td/generate/generate_common: Syntax error: word unexpected (expecting ")")
td/generate/CMakeFiles/tl_generate_common.dir/build.make:61: recipe for target 'td/generate/CMakeFiles/tl_generate_common' failed
make[3]: *** [td/generate/CMakeFiles/tl_generate_common] Error 2
CMakeFiles/Makefile2:708: recipe for target 'td/generate/CMakeFiles/tl_generate_common.dir/all' failed
make[2]: *** [td/generate/CMakeFiles/tl_generate_common.dir/all] Error 2
CMakeFiles/Makefile2:242: recipe for target 'CMakeFiles/prepare_cross_compiling.dir/rule' failed
make[1]: *** [CMakeFiles/prepare_cross_compiling.dir/rule] Error 2
Makefile:225: recipe for target 'prepare_cross_compiling' failed
make: *** [prepare_cross_compiling] Error 2

Could you show output of
make VERBOSE=1 prepare_cross_compiling
?

Yep, sure:
make VERBOSE=1 prepare_cross_compiling
/usr/bin/cmake -H/root/dev/td -B/root/dev/td/build --check-build-system CMakeFiles/Makefile.cmake 0
make -f CMakeFiles/Makefile2 prepare_cross_compiling
make[1]: Entering directory '/root/dev/td/build'
/usr/bin/cmake -H/root/dev/td -B/root/dev/td/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /root/dev/td/build/CMakeFiles 8
make -f CMakeFiles/Makefile2 CMakeFiles/prepare_cross_compiling.dir/all
make[2]: Entering directory '/root/dev/td/build'
make -f tdtl/CMakeFiles/tdtl.dir/build.make tdtl/CMakeFiles/tdtl.dir/depend
make[3]: Entering directory '/root/dev/td/build'
cd /root/dev/td/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /root/dev/td /root/dev/td/tdtl /root/dev/td/build /root/dev/td/build/tdtl /root/dev/td/build/tdtl/CMakeFiles/tdtl.dir/DependInfo.cmake --color=
make[3]: Leaving directory '/root/dev/td/build'
make -f tdtl/CMakeFiles/tdtl.dir/build.make tdtl/CMakeFiles/tdtl.dir/build
make[3]: Entering directory '/root/dev/td/build'
make[3]: Nothing to be done for 'tdtl/CMakeFiles/tdtl.dir/build'.
make[3]: Leaving directory '/root/dev/td/build'
[ 25%] Built target tdtl
make -f td/generate/CMakeFiles/generate_common.dir/build.make td/generate/CMakeFiles/generate_common.dir/depend
make[3]: Entering directory '/root/dev/td/build'
cd /root/dev/td/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /root/dev/td /root/dev/td/td/generate /root/dev/td/build /root/dev/td/build/td/generate /root/dev/td/build/td/generate/CMakeFiles/generate_common.dir/DependInfo.cmake --color=
make[3]: Leaving directory '/root/dev/td/build'
make -f td/generate/CMakeFiles/generate_common.dir/build.make td/generate/CMakeFiles/generate_common.dir/build
make[3]: Entering directory '/root/dev/td/build'
make[3]: Nothing to be done for 'td/generate/CMakeFiles/generate_common.dir/build'.
make[3]: Leaving directory '/root/dev/td/build'
[ 62%] Built target generate_common
make -f td/generate/CMakeFiles/tl_generate_common.dir/build.make td/generate/CMakeFiles/tl_generate_common.dir/depend
make[3]: Entering directory '/root/dev/td/build'
cd /root/dev/td/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /root/dev/td /root/dev/td/td/generate /root/dev/td/build /root/dev/td/build/td/generate /root/dev/td/build/td/generate/CMakeFiles/tl_generate_common.dir/DependInfo.cmake --color=
make[3]: Leaving directory '/root/dev/td/build'
make -f td/generate/CMakeFiles/tl_generate_common.dir/build.make td/generate/CMakeFiles/tl_generate_common.dir/build
make[3]: Entering directory '/root/dev/td/build'
[ 75%] Generate common tl source files
cd /root/dev/td/td/generate && /root/dev/td/build/td/generate/generate_common
/root/dev/td/build/td/generate/generate_common: 1: /root/dev/td/build/td/generate/generate_common: Syntax error: word unexpected (expecting ")")
td/generate/CMakeFiles/tl_generate_common.dir/build.make:61: recipe for target 'td/generate/CMakeFiles/tl_generate_common' failed
make[3]: *** [td/generate/CMakeFiles/tl_generate_common] Error 2
make[3]: Leaving directory '/root/dev/td/build'
CMakeFiles/Makefile2:707: recipe for target 'td/generate/CMakeFiles/tl_generate_common.dir/all' failed
make[2]: *** [td/generate/CMakeFiles/tl_generate_common.dir/all] Error 2
make[2]: Leaving directory '/root/dev/td/build'
CMakeFiles/Makefile2:242: recipe for target 'CMakeFiles/prepare_cross_compiling.dir/rule' failed
make[1]: *** [CMakeFiles/prepare_cross_compiling.dir/rule] Error 2
make[1]: Leaving directory '/root/dev/td/build'
Makefile:225: recipe for target 'prepare_cross_compiling' failed
make: *** [prepare_cross_compiling] Error 2

Also, found this https://stackoverflow.com/questions/36725864/syntax-error-word-unexpected-expecting
But not sure that it can help.

I could guess you are trying to call make prepare_cross_compiling with arm complier. It should be run in a separate build directory with a native compiler.
The original problem is becao

Oh, I'm confused much more :)
Let's start from scratch.
The goal: build native telegram app for BlackBerry 10 with branded UI. For this I need 2 versions of TDlib - x86 (for running on bb10 simulator on x86 machine) and arm (for running on device). The built libs need to be included in Momentics IDE and then use it my code (Qt4.8 app).
As described above, there are no problems with x86 build, I made all by instructions provided in Readme.md, and installed compiled libs into my custom dir.
Then I removed the build directory, configured cross compiler:
export CROSS=/home/doctorrokter/dev/arm/gcc-linaro-7.2.1/bin/arm-linux-gnueabihf
export CC=${CROSS}-gcc
export CXX=${CROSS}-g++

mkdir build // create from scratch
cd build
cmake -DCMAKE_INSTALL_PREFIX=/my_dir -DCMAKE_BUILD_TYPE=Release -DCMAKE_CROSSCOMPILING=True ..

This should configure with cross compiler. And when I run
cmake --build . // command from build instructions
OR
cmake --build. --target prepare_cross_compiling

it uses provided cross compiler and fails with error above. How to run prepare_cross_compiling with native compiler if build dir already configured for cross compiler?

You should run prepare_cross_compiling from a separate build  directory.

Yes, finally! This did the trick.
It also required some manual work from me (for example, I got error during generate_common target and solved it by copying generate_common file from build_native to build dir and so on) , but all is ok.
Thank you guys for helping!

I'm having trouble compiling for armv7 (for the raspberry), I did not understand how you solved it; I tried all but once done prepare_cross_compiling, then when I start compiling it does for x86 instead of arm although I have set the libraries for arm
Could you write me all the steps to fill out correctly for arm?