Skip to content

Support enabling asserts in profile builds. #145729

@jonahwilliams

Description

@jonahwilliams

This is a request from customer: castaway, to allow QA builds to have clearer stack traces and error messages. They use debug builds on Android for this, but since debug builds can only be launched from XCode on iOS they'd need to use profile builds.

I tried the following to enable assertsions:

flutter run --profile --extra-gen-snapshot-options=--enable-asserts

However that crashes at start up with an engine configuration issue. Is there a way we can build the engine in an assert agnostic manner?

(lldb) 2024-03-25 15:42:53.668461-0700 Runner[6110:863224] [FATAL:flutter/runtime/dart_vm_initializer.cc(89)] Error while initializing the Dart VM: Snapshot not compatible with the current VM configuration: the snapshot requires 'release no-code_comments no-dwarf_stack_traces_mode no-lazy_dispatchers no-dedup_instructions no-tsan asserts arm64 ios no-compressed-pointers null-safety' but the VM has 'release no-code_comments no-dwarf_stack_traces_mode no-lazy_dispatchers no-dedup_instructions no-tsan no-asserts arm64 ios no-compressed-pointers null-safety'
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001ca9b5578 libsystem_kernel.dylib`__pthread_kill + 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions