Flutter run works fine, but flutter build apk throw an error

Steps to Reproduce
I have released my project before and it works fine,
but it seems flutter has many update including its dependencies.
So when I finished upgrading and try to re-run it, it works fine in emulator.
The problem occur when I tried to build apk, it always show this error:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

* Where:
Script '/Applications/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 108

* What went wrong:
A problem occurred evaluating script.
> FlutterPlugin$_apply_closure1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s

I couldn't provide step to reproduce, but do you have any insight about this error FlutterPlugin$_apply_closure1?
it seems the error message is not clear and hard to find solution from the internet.
During upgrade dependencies process, there is one dependency barcode_scan that I downgrade from latest version to the 2.0.1 bcs it shows I need to upgrade flutter version also if I want to use latest version.
Expected results:
Flutter should produce the apk that I can use like before.
Actual results:
No apk was built, error result thrown like above.

Logs

                     ** BUILD SUCCEEDED **
[ +116 ms]  └─Compiling, linking and signing... (completed in 10.2s)
[   +1 ms] Xcode build done.                                           28.6s
[   +1 ms] executing: [/Users/x/AndroidStudioProjects/eweddings/ios/] /usr/bin/env xcrun xcodebuild -configuration Debug VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner
BUILD_DIR=/Users/x/AndroidStudioProjects/eweddings/build/ios -sdk iphonesimulator -arch x86_64
SCRIPT_OUTPUT_STREAM_FILE=/var/folders/fh/npt7_gx566193c8p3stpzylh0000gp/T/flutter_build_log_pipe.F1PUZu/pipe_to_stdout FLUTTER_SUPPRESS_ANALYTICS=true COMPILER_INDEX_STORE_ENABLE=NO -showBuildSettings
[        ] executing: [/Users/x/AndroidStudioProjects/eweddings/ios/] /usr/bin/env xcrun xcodebuild -configuration Debug VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner
BUILD_DIR=/Users/x/AndroidStudioProjects/eweddings/build/ios -sdk iphonesimulator -arch x86_64
SCRIPT_OUTPUT_STREAM_FILE=/var/folders/fh/npt7_gx566193c8p3stpzylh0000gp/T/flutter_build_log_pipe.F1PUZu/pipe_to_stdout FLUTTER_SUPPRESS_ANALYTICS=true COMPILER_INDEX_STORE_ENABLE=NO -showBuildSettings
[+2134 ms] Command line invocation:
                        /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -configuration Debug VERBOSE_SCRIPT_LOGGING=YES -workspace Runner.xcworkspace -scheme Runner
                        BUILD_DIR=/Users/x/AndroidStudioProjects/eweddings/build/ios -sdk iphonesimulator -arch x86_64
                        SCRIPT_OUTPUT_STREAM_FILE=/var/folders/fh/npt7_gx566193c8p3stpzylh0000gp/T/flutter_build_log_pipe.F1PUZu/pipe_to_stdout FLUTTER_SUPPRESS_ANALYTICS=true
                        COMPILER_INDEX_STORE_ENABLE=NO -showBuildSettings

                    Build settings from command line:
                        ARCHS = x86_64
                        BUILD_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios
                        COMPILER_INDEX_STORE_ENABLE = NO
                        FLUTTER_SUPPRESS_ANALYTICS = true
                        SCRIPT_OUTPUT_STREAM_FILE = /var/folders/fh/npt7_gx566193c8p3stpzylh0000gp/T/flutter_build_log_pipe.F1PUZu/pipe_to_stdout
                        SDKROOT = iphonesimulator13.5
                        VERBOSE_SCRIPT_LOGGING = YES

                    Build settings for action build and target Runner:
                        ACTION = build
                        AD_HOC_CODE_SIGNING_ALLOWED = YES
                        ALTERNATE_GROUP = staff
                        ALTERNATE_MODE = u+w,go-w,a+rX
                        ALTERNATE_OWNER = x
                        ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
                        ALWAYS_SEARCH_USER_PATHS = NO
                        ALWAYS_USE_SEPARATE_HEADERMAPS = NO
                        APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
                        APPLE_INTERNAL_DIR = /AppleInternal
                        APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
                        APPLE_INTERNAL_LIBRARY_DIR = /AppleInternal/Library
                        APPLE_INTERNAL_TOOLS = /AppleInternal/Developer/Tools
                        APPLICATION_EXTENSION_API_ONLY = NO
                        APPLY_RULES_IN_COPY_FILES = NO
                        APPLY_RULES_IN_COPY_HEADERS = NO
                        ARCHS = x86_64
                        ARCHS_STANDARD = i386 x86_64
                        ARCHS_STANDARD_32_64_BIT = i386 x86_64
                        ARCHS_STANDARD_32_BIT = i386
                        ARCHS_STANDARD_64_BIT = x86_64
                        ARCHS_STANDARD_INCLUDING_64_BIT = i386 x86_64
                        ARCHS_UNIVERSAL_IPHONE_OS = i386 x86_64
                        ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
                        AVAILABLE_PLATFORMS = appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator
                        BITCODE_GENERATION_MODE = marker
                        BUILD_ACTIVE_RESOURCES_ONLY = NO
                        BUILD_COMPONENTS = headers build
                        BUILD_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios
                        BUILD_LIBRARY_FOR_DISTRIBUTION = NO
                        BUILD_ROOT = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Products
                        BUILD_STYLE =
                        BUILD_VARIANTS = normal
                        BUILT_PRODUCTS_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator
                        BUNDLE_CONTENTS_FOLDER_PATH_deep = Contents/
                        BUNDLE_EXECUTABLE_FOLDER_NAME_deep = MacOS
                        BUNDLE_FORMAT = shallow
                        BUNDLE_FRAMEWORKS_FOLDER_PATH = Frameworks
                        BUNDLE_PLUGINS_FOLDER_PATH = PlugIns
                        BUNDLE_PRIVATE_HEADERS_FOLDER_PATH = PrivateHeaders
                        BUNDLE_PUBLIC_HEADERS_FOLDER_PATH = Headers
                        CACHE_ROOT = /var/folders/fh/npt7_gx566193c8p3stpzylh0000gp/C/com.apple.DeveloperTools/11.5-11E608c/Xcode
                        CCHROOT = /var/folders/fh/npt7_gx566193c8p3stpzylh0000gp/C/com.apple.DeveloperTools/11.5-11E608c/Xcode
                        CHMOD = /bin/chmod
                        CHOWN = /usr/sbin/chown
                        CLANG_ANALYZER_NONNULL = YES
                        CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
                        CLANG_CXX_LIBRARY = libc++
                        CLANG_ENABLE_MODULES = YES
                        CLANG_ENABLE_OBJC_ARC = YES
                        CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
                        CLANG_WARN_BOOL_CONVERSION = YES
                        CLANG_WARN_COMMA = YES
                        CLANG_WARN_CONSTANT_CONVERSION = YES
                        CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
                        CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
                        CLANG_WARN_EMPTY_BODY = YES
                        CLANG_WARN_ENUM_CONVERSION = YES
                        CLANG_WARN_INFINITE_RECURSION = YES
                        CLANG_WARN_INT_CONVERSION = YES
                        CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
                        CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
                        CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
                        CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
                        CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
                        CLANG_WARN_STRICT_PROTOTYPES = YES
                        CLANG_WARN_SUSPICIOUS_MOVE = YES
                        CLANG_WARN_UNREACHABLE_CODE = YES
                        CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
                        CLASS_FILE_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/JavaClasses
                        CLEAN_PRECOMPS = YES
                        CLONE_HEADERS = NO
                        CODESIGNING_FOLDER_PATH = /Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/Runner.app
                        CODE_SIGNING_ALLOWED = YES
                        CODE_SIGNING_REQUIRED = YES
                        CODE_SIGN_CONTEXT_CLASS = XCiPhoneSimulatorCodeSignContext
                        CODE_SIGN_IDENTITY = -
                        CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES
                        COLOR_DIAGNOSTICS = NO
                        COMBINE_HIDPI_IMAGES = NO
                        COMPILER_INDEX_STORE_ENABLE = NO
                        COMPOSITE_SDK_DIRS = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/CompositeSDKs
                        COMPRESS_PNG_FILES = YES
                        CONFIGURATION = Debug
                        CONFIGURATION_BUILD_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator
                        CONFIGURATION_TEMP_DIR = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator
                        CONTENTS_FOLDER_PATH = Runner.app
                        COPYING_PRESERVES_HFS_DATA = NO
                        COPY_HEADERS_RUN_UNIFDEF = NO
                        COPY_PHASE_STRIP = NO
                        COPY_RESOURCES_FROM_STATIC_FRAMEWORKS = YES
                        CORRESPONDING_DEVICE_PLATFORM_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
                        CORRESPONDING_DEVICE_PLATFORM_NAME = iphoneos
                        CORRESPONDING_DEVICE_SDK_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk
                        CORRESPONDING_DEVICE_SDK_NAME = iphoneos13.5
                        CP = /bin/cp
                        CREATE_INFOPLIST_SECTION_IN_BINARY = NO
                        CURRENT_ARCH = x86_64
                        CURRENT_PROJECT_VERSION = 1
                        CURRENT_VARIANT = normal
                        DART_OBFUSCATION = false
                        DEAD_CODE_STRIPPING = YES
                        DEBUGGING_SYMBOLS = YES
                        DEBUG_INFORMATION_FORMAT = dwarf
                        DEFAULT_COMPILER = com.apple.compilers.llvm.clang.1_0
                        DEFAULT_DEXT_INSTALL_PATH = /System/Library/DriverExtensions
                        DEFAULT_KEXT_INSTALL_PATH = /System/Library/Extensions
                        DEFINES_MODULE = NO
                        DEPLOYMENT_LOCATION = NO
                        DEPLOYMENT_POSTPROCESSING = NO
                        DEPLOYMENT_TARGET_CLANG_ENV_NAME = IPHONEOS_DEPLOYMENT_TARGET
                        DEPLOYMENT_TARGET_CLANG_FLAG_NAME = mios-simulator-version-min
                        DEPLOYMENT_TARGET_CLANG_FLAG_PREFIX = -mios-simulator-version-min=
                        DEPLOYMENT_TARGET_LD_ENV_NAME = IPHONEOS_DEPLOYMENT_TARGET
                        DEPLOYMENT_TARGET_LD_FLAG_NAME = ios_simulator_version_min
                        DEPLOYMENT_TARGET_SETTING_NAME = IPHONEOS_DEPLOYMENT_TARGET
                        DEPLOYMENT_TARGET_SUGGESTED_VALUES = 8.0 8.1 8.2 8.3 8.4 9.0 9.1 9.2 9.3 10.0 10.1 10.2 10.3 11.0 11.1 11.2 11.3 11.4 12.0 12.1 12.2 12.3 12.4 13.0 13.1 13.2 13.3 13.4 13.5
                        DERIVED_FILES_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/DerivedSources
                        DERIVED_FILE_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/DerivedSources
                        DERIVED_SOURCES_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/DerivedSources
                        DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode.app/Contents/Developer/Applications
                        DEVELOPER_BIN_DIR = /Applications/Xcode.app/Contents/Developer/usr/bin
                        DEVELOPER_DIR = /Applications/Xcode.app/Contents/Developer
                        DEVELOPER_FRAMEWORKS_DIR = /Applications/Xcode.app/Contents/Developer/Library/Frameworks
                        DEVELOPER_FRAMEWORKS_DIR_QUOTED = /Applications/Xcode.app/Contents/Developer/Library/Frameworks
                        DEVELOPER_LIBRARY_DIR = /Applications/Xcode.app/Contents/Developer/Library
                        DEVELOPER_SDK_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
                        DEVELOPER_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Tools
                        DEVELOPER_USR_DIR = /Applications/Xcode.app/Contents/Developer/usr
                        DEVELOPMENT_LANGUAGE = en
                        DEVELOPMENT_TEAM = RFZG72YA5Q
                        DOCUMENTATION_FOLDER_PATH = Runner.app/en.lproj/Documentation
                        DONT_GENERATE_INFOPLIST_FILE = NO
                        DO_HEADER_SCANNING_IN_JAM = NO
                        DSTROOT = /tmp/Runner.dst
                        DT_TOOLCHAIN_DIR = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
                        DWARF_DSYM_FILE_NAME = Runner.app.dSYM
                        DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = NO
                        DWARF_DSYM_FOLDER_PATH = /Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator
                        EFFECTIVE_PLATFORM_NAME = -iphonesimulator
                        EMBEDDED_CONTENT_CONTAINS_SWIFT = NO
                        EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = NO
                        ENABLE_BITCODE = NO
                        ENABLE_DEFAULT_HEADER_SEARCH_PATHS = YES
                        ENABLE_HARDENED_RUNTIME = NO
                        ENABLE_HEADER_DEPENDENCIES = YES
                        ENABLE_ON_DEMAND_RESOURCES = YES
                        ENABLE_STRICT_OBJC_MSGSEND = YES
                        ENABLE_TESTABILITY = YES
                        ENABLE_TESTING_SEARCH_PATHS = NO
                        ENTITLEMENTS_DESTINATION = __entitlements
                        ENTITLEMENTS_REQUIRED = YES
                        EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS = .DS_Store .svn .git .hg CVS
                        EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = *.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj
                        EXECUTABLES_FOLDER_PATH = Runner.app/Executables
                        EXECUTABLE_FOLDER_PATH = Runner.app
                        EXECUTABLE_NAME = Runner
                        EXECUTABLE_PATH = Runner.app/Runner
                        EXPANDED_CODE_SIGN_IDENTITY =
                        EXPANDED_CODE_SIGN_IDENTITY_NAME =
                        EXPANDED_PROVISIONING_PROFILE =
                        FILE_LIST =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects/LinkFileList
                        FIXED_FILES_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/FixedFiles
                        FLUTTER_APPLICATION_PATH = /Users/x/AndroidStudioProjects/eweddings
                        FLUTTER_BUILD_DIR = build
                        FLUTTER_BUILD_NAME = 1.0.0
                        FLUTTER_BUILD_NUMBER = 1
                        FLUTTER_FRAMEWORK_DIR = /Applications/flutter/bin/cache/artifacts/engine/ios
                        FLUTTER_ROOT = /Applications/flutter
                        FLUTTER_SUPPRESS_ANALYTICS = true
                        FLUTTER_TARGET = /Users/x/AndroidStudioProjects/eweddings/lib/main.dart
                        FRAMEWORKS_FOLDER_PATH = Runner.app/Frameworks
                        FRAMEWORK_FLAG_PREFIX = -framework
                        FRAMEWORK_SEARCH_PATHS =  "/Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/MTBBarcodeScanner"
                        "/Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/barcode_scan"
                        "/Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/shared_preferences"
                        "/Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/url_launcher" "/Users/x/AndroidStudioProjects/eweddings/ios/Pods/../Flutter"
                        /Users/x/AndroidStudioProjects/eweddings/ios/Flutter
                        FRAMEWORK_VERSION = A
                        FULL_PRODUCT_NAME = Runner.app
                        GCC3_VERSION = 3.3
                        GCC_C_LANGUAGE_STANDARD = gnu99
                        GCC_DYNAMIC_NO_PIC = NO
                        GCC_INLINES_ARE_PRIVATE_EXTERN = YES
                        GCC_NO_COMMON_BLOCKS = YES
                        GCC_OBJC_LEGACY_DISPATCH = YES
                        GCC_OPTIMIZATION_LEVEL = 0
                        GCC_PFE_FILE_C_DIALECTS = c objective-c c++ objective-c++
                        GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1  COCOAPODS=1
                        GCC_SYMBOLS_PRIVATE_EXTERN = NO
                        GCC_TREAT_WARNINGS_AS_ERRORS = NO
                        GCC_VERSION = com.apple.compilers.llvm.clang.1_0
                        GCC_VERSION_IDENTIFIER = com_apple_compilers_llvm_clang_1_0
                        GCC_WARN_64_TO_32_BIT_CONVERSION = YES
                        GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
                        GCC_WARN_UNDECLARED_SELECTOR = YES
                        GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
                        GCC_WARN_UNUSED_FUNCTION = YES
                        GCC_WARN_UNUSED_VARIABLE = YES
                        GENERATE_MASTER_OBJECT_FILE = NO
                        GENERATE_PKGINFO_FILE = YES
                        GENERATE_PROFILING_CODE = NO
                        GENERATE_TEXT_BASED_STUBS = NO
                        GID = 20
                        GROUP = staff
                        HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT = YES
                        HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES = YES
                        HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS = YES
                        HEADERMAP_INCLUDES_PROJECT_HEADERS = YES
                        HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES = YES
                        HEADERMAP_USES_VFS = NO
                        HEADER_SEARCH_PATHS =  "/Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/MTBBarcodeScanner/MTBBarcodeScanner.framework/Headers"
                        "/Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/barcode_scan/barcode_scan.framework/Headers"
                        "/Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/shared_preferences/shared_preferences.framework/Headers"
                        "/Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/url_launcher/url_launcher.framework/Headers"
                        HIDE_BITCODE_SYMBOLS = YES
                        HOME = /Users/x
                        ICONV = /usr/bin/iconv
                        INFOPLIST_EXPAND_BUILD_SETTINGS = YES
                        INFOPLIST_FILE = Runner/Info.plist
                        INFOPLIST_OUTPUT_FORMAT = binary
                        INFOPLIST_PATH = Runner.app/Info.plist
                        INFOPLIST_PREPROCESS = NO
                        INFOSTRINGS_PATH = Runner.app/en.lproj/InfoPlist.strings
                        INLINE_PRIVATE_FRAMEWORKS = NO
                        INSTALLHDRS_COPY_PHASE = NO
                        INSTALLHDRS_SCRIPT_PHASE = NO
                        INSTALL_DIR = /tmp/Runner.dst/Applications
                        INSTALL_GROUP = staff
                        INSTALL_MODE_FLAG = u+w,go-w,a+rX
                        INSTALL_OWNER = x
                        INSTALL_PATH = /Applications
                        INSTALL_ROOT = /tmp/Runner.dst
                        IPHONEOS_DEPLOYMENT_TARGET = 8.0
                        JAVAC_DEFAULT_FLAGS = -J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8
                        JAVA_APP_STUB = /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
                        JAVA_ARCHIVE_CLASSES = YES
                        JAVA_ARCHIVE_TYPE = JAR
                        JAVA_COMPILER = /usr/bin/javac
                        JAVA_FOLDER_PATH = Runner.app/Java
                        JAVA_FRAMEWORK_RESOURCES_DIRS = Resources
                        JAVA_JAR_FLAGS = cv
                        JAVA_SOURCE_SUBDIR = .
                        JAVA_USE_DEPENDENCIES = YES
                        JAVA_ZIP_FLAGS = -urg
                        JIKES_DEFAULT_FLAGS = +E +OLDCSO
                        KEEP_PRIVATE_EXTERNS = NO
                        LD_DEPENDENCY_INFO_FILE =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64
                        /Runner_dependency_info.dat
                        LD_GENERATE_MAP_FILE = NO
                        LD_MAP_FILE_PATH =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Runner-LinkMap-normal
                        -x86_64.txt
                        LD_NO_PIE = NO
                        LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER = YES
                        LD_RUNPATH_SEARCH_PATHS =  '@executable_path/Frameworks' '@loader_path/Frameworks' @executable_path/Frameworks
                        LEGACY_DEVELOPER_DIR = /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
                        LEX = lex
                        LIBRARY_DEXT_INSTALL_PATH = /Library/DriverExtensions
                        LIBRARY_FLAG_NOSPACE = YES
                        LIBRARY_FLAG_PREFIX = -l
                        LIBRARY_KEXT_INSTALL_PATH = /Library/Extensions
                        LIBRARY_SEARCH_PATHS =  /Users/x/AndroidStudioProjects/eweddings/ios/Flutter
                        LINKER_DISPLAYS_MANGLED_NAMES = NO
                        LINK_FILE_LIST_normal_x86_64 =
                        LINK_WITH_STANDARD_LIBRARIES = YES
                        LLVM_TARGET_TRIPLE_OS_VERSION = ios8.0
                        LLVM_TARGET_TRIPLE_SUFFIX = -simulator
                        LLVM_TARGET_TRIPLE_VENDOR = apple
                        LOCALIZABLE_CONTENT_DIR =
                        LOCALIZED_RESOURCES_FOLDER_PATH = Runner.app/en.lproj
                        LOCALIZED_STRING_MACRO_NAMES = NSLocalizedString CFCopyLocalizedString
                        LOCALIZED_STRING_SWIFTUI_SUPPORT = YES
                        LOCAL_ADMIN_APPS_DIR = /Applications/Utilities
                        LOCAL_APPS_DIR = /Applications
                        LOCAL_DEVELOPER_DIR = /Library/Developer
                        LOCAL_LIBRARY_DIR = /Library
                        LOCROOT =
                        LOCSYMROOT =
                        MACH_O_TYPE = mh_execute
                        MAC_OS_X_PRODUCT_BUILD_VERSION = 19F101
                        MAC_OS_X_VERSION_ACTUAL = 101505
                        MAC_OS_X_VERSION_MAJOR = 101500
                        MAC_OS_X_VERSION_MINOR = 1505
                        MARKETING_VERSION = 0.0.1
                        METAL_LIBRARY_FILE_BASE = default
                        METAL_LIBRARY_OUTPUT_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/Runner.app
                        MODULES_FOLDER_PATH = Runner.app/Modules
                        MODULE_CACHE_DIR = /Users/x/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
                        MTL_ENABLE_DEBUG_INFO = YES
                        NATIVE_ARCH = x86_64
                        NATIVE_ARCH_32_BIT = i386
                        NATIVE_ARCH_64_BIT = x86_64
                        NATIVE_ARCH_ACTUAL = x86_64
                        NO_COMMON = YES
                        OBJC_ABI_VERSION = 2
                        OBJECT_FILE_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects
                        OBJECT_FILE_DIR_normal =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal
                        OBJROOT = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex
                        ONLY_ACTIVE_ARCH = YES
                        OS = MACOS
                        OSAC = /usr/bin/osacompile
                        OTHER_LDFLAGS =  -framework Flutter
                        PACKAGE_TYPE = com.apple.package-type.wrapper.application
                        PASCAL_STRINGS = YES
                        PATH =
                        /Applications/Xcode.app/Contents/Developer/usr/bin:/Users/x/google-cloud-sdk/bin:/Users/x/.nvm/versions/node/v12.13.0/bin:/usr/local/opt/python/libexec/bin:/usr/local/bin:/usr/bi
                        n:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/go/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Applications/flutter/bin:/Users/x/flutter/bin
                        PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES = /usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks
                        /Applications/Xcode.app/Contents/Developer/Headers /Applications/Xcode.app/Contents/Developer/SDKs /Applications/Xcode.app/Contents/Developer/Platforms
                        PBDEVELOPMENTPLIST_PATH = Runner.app/pbdevelopment.plist
                        PFE_FILE_C_DIALECTS = objective-c
                        PKGINFO_FILE_PATH =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/PkgInfo
                        PKGINFO_PATH = Runner.app/PkgInfo
                        PLATFORM_DEVELOPER_APPLICATIONS_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications
                        PLATFORM_DEVELOPER_BIN_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin
                        PLATFORM_DEVELOPER_LIBRARY_DIR = /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library
                        PLATFORM_DEVELOPER_SDK_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
                        PLATFORM_DEVELOPER_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools
                        PLATFORM_DEVELOPER_USR_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr
                        PLATFORM_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
                        PLATFORM_DISPLAY_NAME = iOS Simulator
                        PLATFORM_NAME = iphonesimulator
                        PLATFORM_PREFERRED_ARCH = x86_64
                        PLATFORM_PRODUCT_BUILD_VERSION = 17F65
                        PLIST_FILE_OUTPUT_FORMAT = binary
                        PLUGINS_FOLDER_PATH = Runner.app/PlugIns
                        PODS_BUILD_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios
                        PODS_CONFIGURATION_BUILD_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator
                        PODS_PODFILE_DIR_PATH = /Users/x/AndroidStudioProjects/eweddings/ios/.
                        PODS_ROOT = /Users/x/AndroidStudioProjects/eweddings/ios/Pods
                        PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES
                        PRECOMP_DESTINATION_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/PrefixHeaders
                        PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO
                        PRIVATE_HEADERS_FOLDER_PATH = Runner.app/PrivateHeaders
                        PRODUCT_BUNDLE_IDENTIFIER = com.wedbio.eweddings
                        PRODUCT_BUNDLE_PACKAGE_TYPE = APPL
                        PRODUCT_MODULE_NAME = Runner
                        PRODUCT_NAME = Runner
                        PRODUCT_SETTINGS_PATH = /Users/x/AndroidStudioProjects/eweddings/ios/Runner/Info.plist
                        PRODUCT_TYPE = com.apple.product-type.application
                        PROFILING_CODE = NO
                        PROJECT = Runner
                        PROJECT_DERIVED_FILE_DIR = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/DerivedSources
                        PROJECT_DIR = /Users/x/AndroidStudioProjects/eweddings/ios
                        PROJECT_FILE_PATH = /Users/x/AndroidStudioProjects/eweddings/ios/Runner.xcodeproj
                        PROJECT_NAME = Runner
                        PROJECT_TEMP_DIR = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build
                        PROJECT_TEMP_ROOT = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex
                        PUBLIC_HEADERS_FOLDER_PATH = Runner.app/Headers
                        RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS = YES
                        REMOVE_CVS_FROM_RESOURCES = YES
                        REMOVE_GIT_FROM_RESOURCES = YES
                        REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES = YES
                        REMOVE_HG_FROM_RESOURCES = YES
                        REMOVE_SVN_FROM_RESOURCES = YES
                        REZ_COLLECTOR_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/ResourceManagerResour
                        ces
                        REZ_OBJECTS_DIR =
                        /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/ResourceManagerResour
                        ces/Objects
                        SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO
                        SCRIPTS_FOLDER_PATH = Runner.app/Scripts
                        SCRIPT_OUTPUT_STREAM_FILE = /var/folders/fh/npt7_gx566193c8p3stpzylh0000gp/T/flutter_build_log_pipe.F1PUZu/pipe_to_stdout
                        SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk
                        SDK_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk
                        SDK_DIR_iphonesimulator13_5 = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk
                        SDK_NAME = iphonesimulator13.5
                        SDK_NAMES = iphonesimulator13.5
                        SDK_PRODUCT_BUILD_VERSION = 17F65
                        SDK_VERSION = 13.5
                        SDK_VERSION_ACTUAL = 130500
                        SDK_VERSION_MAJOR = 130000
                        SDK_VERSION_MINOR = 500
                        SED = /usr/bin/sed
                        SEPARATE_STRIP = NO
                        SEPARATE_SYMBOL_EDIT = NO
                        SET_DIR_MODE_OWNER_GROUP = YES
                        SET_FILE_MODE_OWNER_GROUP = NO
                        SHALLOW_BUNDLE = YES
                        SHARED_DERIVED_FILE_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator/DerivedSources
                        SHARED_FRAMEWORKS_FOLDER_PATH = Runner.app/SharedFrameworks
                        SHARED_PRECOMPS_DIR = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/PrecompiledHeaders
                        SHARED_SUPPORT_FOLDER_PATH = Runner.app/SharedSupport
                        SKIP_INSTALL = NO
                        SOURCE_ROOT = /Users/x/AndroidStudioProjects/eweddings/ios
                        SRCROOT = /Users/x/AndroidStudioProjects/eweddings/ios
                        STRINGS_FILE_OUTPUT_ENCODING = binary
                        STRIP_BITCODE_FROM_COPIED_FILES = NO
                        STRIP_INSTALLED_PRODUCT = YES
                        STRIP_STYLE = all
                        STRIP_SWIFT_SYMBOLS = YES
                        SUPPORTED_DEVICE_FAMILIES = 1,2
                        SUPPORTED_PLATFORMS = iphonesimulator iphoneos
                        SUPPORTS_TEXT_BASED_API = NO
                        SWIFT_OBJC_BRIDGING_HEADER = Runner/Runner-Bridging-Header.h
                        SWIFT_OPTIMIZATION_LEVEL = -Onone
                        SWIFT_PLATFORM_TARGET_PREFIX = ios
                        SWIFT_VERSION = 4.0
                        SYMROOT = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Products
                        SYSTEM_ADMIN_APPS_DIR = /Applications/Utilities
                        SYSTEM_APPS_DIR = /Applications
                        SYSTEM_CORE_SERVICES_DIR = /System/Library/CoreServices
                        SYSTEM_DEMOS_DIR = /Applications/Extras
                        SYSTEM_DEVELOPER_APPS_DIR = /Applications/Xcode.app/Contents/Developer/Applications
                        SYSTEM_DEVELOPER_BIN_DIR = /Applications/Xcode.app/Contents/Developer/usr/bin
                        SYSTEM_DEVELOPER_DEMOS_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples
                        SYSTEM_DEVELOPER_DIR = /Applications/Xcode.app/Contents/Developer
                        SYSTEM_DEVELOPER_DOC_DIR = /Applications/Xcode.app/Contents/Developer/ADC Reference Library
                        SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools
                        SYSTEM_DEVELOPER_JAVA_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Java Tools
                        SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Performance Tools
                        SYSTEM_DEVELOPER_RELEASENOTES_DIR = /Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes
                        SYSTEM_DEVELOPER_TOOLS = /Applications/Xcode.app/Contents/Developer/Tools
                        SYSTEM_DEVELOPER_TOOLS_DOC_DIR = /Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools
                        SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR = /Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools
                        SYSTEM_DEVELOPER_USR_DIR = /Applications/Xcode.app/Contents/Developer/usr
                        SYSTEM_DEVELOPER_UTILITIES_DIR = /Applications/Xcode.app/Contents/Developer/Applications/Utilities
                        SYSTEM_DEXT_INSTALL_PATH = /System/Library/DriverExtensions
                        SYSTEM_DOCUMENTATION_DIR = /Library/Documentation
                        SYSTEM_KEXT_INSTALL_PATH = /System/Library/Extensions
                        SYSTEM_LIBRARY_DIR = /System/Library
                        TAPI_VERIFY_MODE = ErrorsOnly
                        TARGETED_DEVICE_FAMILY = 1,2
                        TARGETNAME = Runner
                        TARGET_BUILD_DIR = /Users/x/AndroidStudioProjects/eweddings/build/ios/Debug-iphonesimulator
                        TARGET_NAME = Runner
                        TARGET_TEMP_DIR = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build
                        TEMP_DIR = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build
                        TEMP_FILES_DIR = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build
                        TEMP_FILE_DIR = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build
                        TEMP_ROOT = /Users/x/Library/Developer/Xcode/DerivedData/Runner-bregwxdhwwsmxicyhaepmlkbpvfm/Build/Intermediates.noindex
                        TEST_FRAMEWORK_SEARCH_PATHS =  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks
                        TEST_LIBRARY_SEARCH_PATHS =  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib
                        TOOLCHAIN_DIR = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
                        TRACK_WIDGET_CREATION = true
                        TREAT_MISSING_BASELINES_AS_TEST_FAILURES = NO
                        TREE_SHAKE_ICONS = false
                        UID = 502
                        UNLOCALIZED_RESOURCES_FOLDER_PATH = Runner.app
                        UNSTRIPPED_PRODUCT = NO
                        USER = x
                        USER_APPS_DIR = /Users/x/Applications
                        USER_LIBRARY_DIR = /Users/x/Library
                        USE_DYNAMIC_NO_PIC = YES
                        USE_HEADERMAP = YES
                        USE_HEADER_SYMLINKS = NO
                        USE_LLVM_TARGET_TRIPLES = YES
                        USE_LLVM_TARGET_TRIPLES_FOR_CLANG = YES
                        USE_LLVM_TARGET_TRIPLES_FOR_LD = YES
                        USE_LLVM_TARGET_TRIPLES_FOR_TAPI = YES
                        USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
                        VALIDATE_PRODUCT = NO
                        VALIDATE_WORKSPACE = NO
                        VALID_ARCHS = i386 x86_64
                        VERBOSE_PBXCP = NO
                        VERBOSE_SCRIPT_LOGGING = YES
                        VERSIONING_SYSTEM = apple-generic
                        VERSIONPLIST_PATH = Runner.app/version.plist
                        VERSION_INFO_BUILDER = x
                        VERSION_INFO_FILE = Runner_vers.c
                        VERSION_INFO_STRING = "@(#)PROGRAM:Runner  PROJECT:Runner-1"
                        WRAPPER_EXTENSION = app
                        WRAPPER_NAME = Runner.app
                        WRAPPER_SUFFIX = .app
                        WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES = NO
                        XCODE_APP_SUPPORT_DIR = /Applications/Xcode.app/Contents/Developer/Library/Xcode
                        XCODE_PRODUCT_BUILD_VERSION = 11E608c
                        XCODE_VERSION_ACTUAL = 1150
                        XCODE_VERSION_MAJOR = 1100
                        XCODE_VERSION_MINOR = 1150
                        XPCSERVICES_FOLDER_PATH = Runner.app/XPCServices
                        YACC = yacc
                        arch = x86_64
                        variant = normal
[ +442 ms] executing: /usr/bin/xcrun simctl install 1F1A77EA-7A24-4823-8B27-BC363A7939FA /Users/x/AndroidStudioProjects/eweddings/build/ios/iphonesimulator/Runner.app
[ +783 ms] executing: /usr/bin/plutil -convert json -o - /Users/x/AndroidStudioProjects/eweddings/build/ios/iphonesimulator/Runner.app/Info.plist
[   +9 ms] Exit code 0 from: /usr/bin/plutil -convert json -o - /Users/x/AndroidStudioProjects/eweddings/build/ios/iphonesimulator/Runner.app/Info.plist
[        ]
{"CFBundleName":"Wedbio","DTSDKName":"iphonesimulator13.5","DTXcode":"1150","CFBundleIcons~ipad":{"CFBundlePrimaryIcon":{"CFBundleIconFiles":["AppIcon20x20","AppIcon29x29","AppIcon40x40","AppIcon60x60",
"AppIcon76x76","AppIcon83.5x83.5"],"CFBundleIconName":"AppIcon"}},"UILaunchStoryboardName":"LaunchScreen","DTSDKBuild":"17F65","CFBundleDevelopmentRegion":"en","CFBundleVersion":"1","BuildMachineOSBuild
":"19F101","NSCameraUsageDescription":"Camera permission is required for barcode
scanning.","DTPlatformName":"iphonesimulator","CFBundlePackageType":"APPL","CFBundleShortVersionString":"0.0.1","CFBundleSupportedPlatforms":["iPhoneSimulator"],"UIMainStoryboardFile":"Main","CFBundleIn
foDictionaryVersion":"6.0","CFBundleExecutable":"Runner","DTCompiler":"com.apple.compilers.llvm.clang.1_0","UISupportedInterfaceOrientations~ipad":["UIInterfaceOrientationPortrait","UIInterfaceOrientati
onPortraitUpsideDown","UIInterfaceOrientationLandscapeLeft","UIInterfaceOrientationLandscapeRight"],"MinimumOSVersion":"8.0","CFBundleIdentifier":"com.wedbio.eweddings","UIDeviceFamily":[1,2],"CFBundleS
ignature":"????","DTPlatformVersion":"13.5","CFBundleIcons":{"CFBundlePrimaryIcon":{"CFBundleIconFiles":["AppIcon20x20","AppIcon29x29","AppIcon40x40","AppIcon60x60"],"CFBundleIconName":"AppIcon"}},"DTXc
odeBuild":"11E608c","LSRequiresIPhoneOS":true,"UISupportedInterfaceOrientations":["UIInterfaceOrientationPortrait","UIInterfaceOrientationLandscapeLeft","UIInterfaceOrientationLandscapeRight"],"UIViewCo
ntrollerBasedStatusBarAppearance":false,"DTPlatformBuild":"17F65"}
[   +4 ms] executing: /usr/bin/xcrun simctl launch 1F1A77EA-7A24-4823-8B27-BC363A7939FA com.wedbio.eweddings --enable-dart-profiling --enable-checked-mode --verify-entry-points --observatory-port=0
[ +740 ms] com.wedbio.eweddings: 39991
[        ] Waiting for observatory port to be available...
[+1098 ms] Observatory URL on device: http://<IP_ADDRESS>:60524/zadEuYekBP0=/
[  +13 ms] Connecting to service protocol: http://<IP_ADDRESS>:60524/zadEuYekBP0=/
[ +150 ms] Successfully connected to service protocol: http://<IP_ADDRESS>:60524/zadEuYekBP0=/
[        ] Waiting for iPhone SE (2nd generation) to report its views...
[   +4 ms] Waiting for iPhone SE (2nd generation) to report its views... (completed in 4ms)
[   +7 ms] DevFS: Creating new filesystem on the device (null)
[  +12 ms] DevFS: Created new filesystem on the device
(file:///Users/x/Library/Developer/CoreSimulator/Devices/1F1A77EA-7A24-4823-8B27-BC363A7939FA/data/Containers/Data/Application/3B93A45E-118E-4CBF-9233-1676DD8D3639/tmp/eweddingsd8vwwH/eweddings/)
[   +1 ms] Updating assets
[ +245 ms] Syncing files to device iPhone SE (2nd generation)...
[   +2 ms] Scanning asset files
[   +4 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +1 ms] <- recompile package:Wedbio/main.dart ba4d0731-1d83-4226-8f23-3977fffa1ac7
[        ] <- ba4d0731-1d83-4226-8f23-3977fffa1ac7
[  +98 ms] Updating files
[ +142 ms] DevFS: Sync finished
[        ] Syncing files to device iPhone SE (2nd generation)... (completed in 248ms)
[        ] Synced 2.1MB.
[   +1 ms] <- accept
[   +1 ms] Connected to _flutterView/0x7fe1b4012620.
[   +1 ms] Flutter run key commands.
[   +2 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on iPhone SE (2nd generation) is available at: http://<IP_ADDRESS>:60524/zadEuYekBP0=/

My flutter analyze result:
   info • This function has a return type of 'Future<activeUser>', but doesn't end with a return statement • lib/Utils/apiCaller.dart:13:20 • missing_return
   info • This function has a return type of 'Future<List<guest>>', but doesn't end with a return statement • lib/Utils/apiCaller.dart:38:21 • missing_return
   info • This function has a return type of 'Future<List<event>>', but doesn't end with a return statement • lib/Utils/apiCaller.dart:56:21 • missing_return
   info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: Wedbio.titleSection • lib/main.dart:7:7 •
          must_be_immutable
   info • The field doesn't override an inherited getter or setter • lib/main.dart:10:10 • override_on_non_overriding_member
   info • The value of the local variable 'buttonSection' isn't used • lib/main.dart:50:12 • unused_local_variable
   info • The value of the local variable 'textSection' isn't used • lib/main.dart:61:12 • unused_local_variable

And here is my flutter doctor
[✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Mac OS X 10.15.5 19F101, locale en-GB)
    • Flutter version 1.18.0-11.1.pre at /Applications/flutter
    • Framework revision 2738a1148b (8 weeks ago), 2020-05-13 15:24:36 -0700
    • Engine revision ef9215ceb2
    • Dart version 2.9.0 (build 2.9.0-8.2.beta)

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

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.1

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

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

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

[✓] Connected device (3 available)
    • iPhone SE (2nd generation) • 1F1A77EA-7A24-4823-8B27-BC363A7939FA • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
    • Web Server                 • web-server                           • web-javascript • Flutter Tools
    • Chrome                     • chrome                               • web-javascript • Google Chrome 83.0.4103.116

• No issues found!

@darrylsepeda the logs you attached don't seem to be from flutter build apk -v, this will have the actual error message in it. flutter run logs are not useful if that isn't what is failing.

Hi @jonahwilliams thank you for your reply,
I'm sorry, it is solved after I re-install my flutter and upgrade my app to the latest bcs it is previously created with pre 1.12-android projects.
Thank you


fix(build-ci): fix scorecard image tag returned as null

Welcome to Cryostat! 👋
Before contributing, make sure you have:

[x] Read the contributing guidelines
[x] Linked a relevant issue which this PR resolves
[x] Linked any other relevant issues, PR's, or documentation, if any
[x] Resolved all conflicts, if any
[x] Rebased your branch PR on top of the latest upstream main branch
[x] Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
[x] Signed all commits: git commit -S -m "YOUR_COMMIT_MESSAGE"

Related to #698
Description of the change:
Updated CI to get scorecard tag from the 2nd test stage (custom scorecard) added in #698.
Motivation for the change:
The scorecard image is being built with tag null on upstream main.
CI: https://github.com/cryostatio/cryostat-operator/actions/runs/8161839436/job/22311468196
Quay: https://quay.io/repository/cryostat/cryostat-operator-scorecard?tab=tags

@Mergifyio backport cryostat3

https://github.com/cryostatio/cryostat-operator/actions/runs/8302678684/job/22725444182
Image:      ghcr.io/cryostatio/cryostat-operator-scorecard:ci-2201704822677f0e1ad94fee0d64250a7af2e67c
Entrypoint: [cryostat-scorecard-tests operator-install]
Labels:
	"test":"operator-install"
	"suite":"cryostat"
Results:
	State: fail

	Errors:
		pods "scorecard-test-x697" already exists

Randomized pod's name just happens to conflict? It's probably not our end...

That's really weird. You're right though, the scorecard-test pods are managed by Operator SDK.

https://github.com/operator-framework/operator-sdk/blob/4abd483aa4004af83b3c05ddf9d7a7e4d4653cc7/internal/scorecard/testpod.go#L41
Haha right. Maybe, another day of random not being actual so random :D


[R] fix (x-bundle): add deepsync to the inseret/update executors

close #260

I don’t understand how you changes are allowing the executor to deepsync the inpu. All it does is Fetch the inserted / updated doc and deepsync it, which will have no effect (unless you inserting fields in the root document, which is undesirable)


Can't install homebridge-onkyo v2021.2.2 (2021-01-10).

Confirm you have checked the WIKI for troubleshooting first
_Fill out and check ([x]) the boxes which apply.

Homebridge version: v1.3.1
Plugin version: v2021.2.2
OS, including release name/version: MacOS Big Sur

DIR: /usr/local
CMD: npm install -g homebridge-onkyo@latest
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/untitledlt/eiscp.js.git
npm ERR!
npm ERR! xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
npm ERR!
npm ERR! exited with error code: 1
npm ERR!      /Users/jlrodz/.npm/_logs/2021-03-01T15_34_39_503Z-debug.log
Command failed. Please review log for details.

Have you installed the Command Line Package?
See here:
https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a

Thanks!  It did work!


docs(colors): add colors doc style

add color palette doc

:tada: This PR is included in version 3.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add ability to filter defined resources by ready status.

Description of your changes
Add ability to filter defined resources by ready status.
This can be done for defined XRCs and XRs on an XRD.
This also deprecates the existing filters and moves them to an "options" input argument.
Resolves #94
I have:

[x] Read and followed Upbound's contribution process.
[x] Run make reviewable to ensure this PR is ready for review.
[ ] Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested
ran make and make reviewable

This looks promising: https://www.npmjs.com/package/bunyan-middleware


Failure when removing worker node

    733 {"log":"[2020-05-02 15:52:27,008: INFO/job_scheduler] Job 84 completing (errored=False, cancelled=False)\n","stream":"stderr","time":"2020-05-02T15:52:27.009065962Z"}
    734 {"log":"[2020-05-02 15:52:27,042: INFO/job_scheduler] run_next: 1 runnable jobs of (1 pending, 0 tasked)\n","stream":"stderr","time":"2020-05-02T15:52:27.043158136Z"}
    735 {"log":"[2020-05-02 15:52:27,051: WARNING/job] DependOn not satisfied: c221 LNet configuration in state lnet_unloaded, not one of ['unconfigured'] (preferred unconfigured)\n","stream":"stderr","time":"2020-05-02T15:52:27.05200694Z"}
    736 {"log":"[2020-05-02 15:52:27,060: WARNING/job] DependOn not satisfied: c221 LNet configuration in state lnet_unloaded, not one of ['unconfigured'] (preferred unconfigured)\n","stream":"stderr","time":"2020-05-02T15:52:27.060691223Z"}
    737 {"log":"[2020-05-02 15:52:27,062: WARNING/job_scheduler] Job 85: cancelling because of failed dependency\n","stream":"stderr","time":"2020-05-02T15:52:27.062459217Z"}
    738 {"log":"[2020-05-02 15:52:27,062: INFO/job_scheduler] Job 85 completing (errored=False, cancelled=True)\n","stream":"stderr","time":"2020-05-02T15:52:27.062550508Z"}


Add font size plugin

Describe the feature you'd like
Add font size plugin to change default font on pages.
https://www.tiny.cloud/blog/custom-font-sizes-in-tinymce/
Describe the benefits this would bring to existing BookStack users
Convenience
Can the goal of this request already be achieved via other means?
No
Have you searched for an existing open/closed issue?

[X] I have searched for existing issues and none cover my fundemental request

How long have you been using BookStack?
1 to 5 years
Additional context
No response

or please tell me in which file the editor is initialized to add the plugin

Hi @Statium,
Font size control has already been requested in #1148 so I'll therefore close this off as a duplicate.
We expose editor events which can provide the TinyMCE config for tweaking:
https://www.bookstackapp.com/docs/admin/hacking-bookstack/#bookstack-editor-events
You can see an example of this in my comment here:
https://github.com/BookStackApp/BookStack/issues/1203#issuecomment-621342313
Note: Edits to the TinyMCE config are not supported and may break on future updates.


Add human friendly display title for the licenses

Although some people see developers are robots :), you may want to consider adding a friendly name to the licenses
Suggestion, on A arrow in the screenshot show the nice title. under that place existing text. and I would suggest putting the B next to the title

Trial-Advocate License

lic/surevelox.orchardcore:trial-advocate/XXXXX-XXXXX-XXXXX-7UQC2-NZ6FL-U-V

The basic format for license header followed in surevelox's license key as below,
lic/[vendor-prefix]:[product]/[Id]
Here
[vendor-prefix] = surevelox.orchardcore
[product] = trial-advocate
[id] = XXXXX-XXXXX-XXXXX-7UQC2-NZ6FL-U-V
However, license vendor can have the format of their own and the license header can be anything ( for now it's just one format as above), so for view template it's difficult to extract the unknown part
May be to introduce an alternate for vendor specific header and vendor can extract human readable text from their license header.


memory leaking (no delete after new)

During debugging a different problem, I noticed there are memory leaking.  Valgrind indicates there are a lot of new used in https://github.com/stan-dev/stan/blob/develop/src/stan/services/command.hpp, but not necessarily there is a delete for all the possibilities of exit from this function command.
Below is just an output of using valgrind from running the model with test gradient mode (cmdstan 2.6.0), which shows at line 70, 71, 72, 73, 74, 134 there is a new, but in this case, no delete afterwards.
==4851== Memcheck, a memory error detector
==4851== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==4851== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==4851== Command: ./binormal diagnose
==4851==
method = diagnose
  diagnose
    test = gradient (Default)
      gradient
        epsilon = 9.9999999999999995e-07 (Default)
        error = 9.9999999999999995e-07 (Default)
id = 0 (Default)
data
  file =  (Default)
init = 2 (Default)
random
  seed =<PHONE_NUMBER>
output
  file = output.csv (Default)
  diagnostic_file =  (Default)
  refresh = 100 (Default)

TEST GRADIENT MODE

Log probability=-1.49583

param idx           value           model     finite diff           error
        0        -1.71648         1.69507         1.69507      1.2689e-10
        1       -0.383584        0.214078        0.214078    -1.67667e-10
==4851==
==4851== HEAP SUMMARY:
==4851==     in use at exit: 25,075 bytes in 346 blocks
==4851==   total heap usage: 699 allocs, 353 frees, 102,872 bytes allocated
==4851==
==4851== 242 (80 direct, 162 indirect) bytes in 1 blocks are definitely lost in loss record 338 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x4291E3: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:70)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 434 (56 direct, 378 indirect) bytes in 1 blocks are definitely lost in loss record 339 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x429218: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:71)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 447 (56 direct, 391 indirect) bytes in 1 blocks are definitely lost in loss record 340 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x429282: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:73)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 457 (96 direct, 361 indirect) bytes in 1 blocks are definitely lost in loss record 341 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x42924D: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:72)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 1,116 (56 direct, 1,060 indirect) bytes in 1 blocks are definitely lost in loss record 343 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x4292B7: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:74)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 8,720 (528 direct, 8,192 indirect) bytes in 1 blocks are definitely lost in loss record 345 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x429863: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:134)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 13,091 (80 direct, 13,011 indirect) bytes in 1 blocks are definitely lost in loss record 346 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x41B99D: stan::gm::argument_parser::argument_parser(std::vector<stan::gm::argument*, std::allocator<stan::gm::argument*> >&) (argument_parser.hpp:25)
==4851==    by 0x4292FB: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:76)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== LEAK SUMMARY:
==4851==    definitely lost: 952 bytes in 7 blocks
==4851==    indirectly lost: 23,555 bytes in 338 blocks
==4851==      possibly lost: 0 bytes in 0 blocks
==4851==    still reachable: 568 bytes in 1 blocks
==4851==         suppressed: 0 bytes in 0 blocks
==4851== Reachable blocks (those to which a pointer was found) are not shown.
==4851== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==4851==
==4851== For counts of detected and suppressed errors, rerun with: -v
==4851== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)

Thanks, Jiqiang! We really need to clean this up.
Since other interfaces will be using things in Stan, we need to be careful
about memory management. @betanalpha, want to take a look?
On Fri, Feb 13, 2015 at 11:17 AM, maverickg<EMAIL_ADDRESS>wrote:

During debugging a different problem, I noticed there are memory leaking.
Valgrind indicates there are a lot of new used in
https://github.com/stan-dev/stan/blob/develop/src/stan/services/command.hpp,
but not necessarily there is a delete for all the possibilities of exit
from this function command.
Below is just an output of using valgrind from running the model with test
gradient mode (cmdstan 2.6.0), which shows at line 70
https://github.com/stan-dev/stan/blob/v2.6.0/src/stan/common/command.hpp#L70,
71, 72, 73, 74, 134 there is a new, but in this case, no delete afterwards.
==4851== Memcheck, a memory error detector
==4851== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==4851== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==4851== Command: ./binormal diagnose
==4851==
method = diagnose
diagnose
test = gradient (Default)
gradient
epsilon = 9.9999999999999995e-07 (Default)
error = 9.9999999999999995e-07 (Default)
id = 0 (Default)
data
file =  (Default)
init = 2 (Default)
random
seed =<PHONE_NUMBER>
output
file = output.csv (Default)
diagnostic_file =  (Default)
refresh = 100 (Default)
TEST GRADIENT MODE
Log probability=-1.49583
param idx           value           model     finite diff           error
0        -1.71648         1.69507         1.69507      1.2689e-10
1       -0.383584        0.214078        0.214078    -1.67667e-10
==4851==
==4851== HEAP SUMMARY:
==4851==     in use at exit: 25,075 bytes in 346 blocks
==4851==   total heap usage: 699 allocs, 353 frees, 102,872 bytes allocated
==4851==
==4851== 242 (80 direct, 162 indirect) bytes in 1 blocks are definitely lost in loss record 338 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x4291E3: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:70)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 434 (56 direct, 378 indirect) bytes in 1 blocks are definitely lost in loss record 339 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x429218: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:71)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 447 (56 direct, 391 indirect) bytes in 1 blocks are definitely lost in loss record 340 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x429282: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:73)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 457 (96 direct, 361 indirect) bytes in 1 blocks are definitely lost in loss record 341 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x42924D: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:72)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 1,116 (56 direct, 1,060 indirect) bytes in 1 blocks are definitely lost in loss record 343 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x4292B7: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:74)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 8,720 (528 direct, 8,192 indirect) bytes in 1 blocks are definitely lost in loss record 345 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x429863: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:134)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 13,091 (80 direct, 13,011 indirect) bytes in 1 blocks are definitely lost in loss record 346 of 346
==4851==    at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851==    by 0x41B99D: stan::gm::argument_parser::argument_parser(std::vector<stan::gm::argument*, std::allocatorstan::gm::argument* >&) (argument_parser.hpp:25)
==4851==    by 0x4292FB: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:76)
==4851==    by 0x4096EB: main (main.cpp:7)
==4851==
==4851== LEAK SUMMARY:
==4851==    definitely lost: 952 bytes in 7 blocks
==4851==    indirectly lost: 23,555 bytes in 338 blocks
==4851==      possibly lost: 0 bytes in 0 blocks
==4851==    still reachable: 568 bytes in 1 blocks
==4851==         suppressed: 0 bytes in 0 blocks
==4851== Reachable blocks (those to which a pointer was found) are not shown.
==4851== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==4851==
==4851== For counts of detected and suppressed errors, rerun with: -v
==4851== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293.

I think most of these are the poor way that we handle closing
the streams and a few stray pointers that aren’t carefully
deleted at every possible exit point.  We really just need
to clean up command rather than hacking at it more.
On Feb 13, 2015, at 4:22 PM, Daniel Lee<EMAIL_ADDRESS>wrote:

Thanks, Jiqiang! We really need to clean this up.
Since other interfaces will be using things in Stan, we need to be careful
about memory management. @betanalpha, want to take a look?
On Fri, Feb 13, 2015 at 11:17 AM, maverickg<EMAIL_ADDRESS>wrote:

During debugging a different problem, I noticed there are memory leaking.
Valgrind indicates there are a lot of new used in
https://github.com/stan-dev/stan/blob/develop/src/stan/services/command.hpp,
but not necessarily there is a delete for all the possibilities of exit
from this function command.
Below is just an output of using valgrind from running the model with test
gradient mode (cmdstan 2.6.0), which shows at line 70
https://github.com/stan-dev/stan/blob/v2.6.0/src/stan/common/command.hpp#L70,
71, 72, 73, 74, 134 there is a new, but in this case, no delete afterwards.
==4851== Memcheck, a memory error detector
==4851== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==4851== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==4851== Command: ./binormal diagnose
==4851==
method = diagnose
diagnose
test = gradient (Default)
gradient
epsilon = 9.9999999999999995e-07 (Default)
error = 9.9999999999999995e-07 (Default)
id = 0 (Default)
data
file = (Default)
init = 2 (Default)
random
seed =<PHONE_NUMBER>
output
file = output.csv (Default)
diagnostic_file = (Default)
refresh = 100 (Default)
TEST GRADIENT MODE
Log probability=-1.49583
param idx value model finite diff error
0 -1.71648 1.69507 1.69507 1.2689e-10
1 -0.383584 0.214078 0.214078 -1.67667e-10
==4851==
==4851== HEAP SUMMARY:
==4851== in use at exit: 25,075 bytes in 346 blocks
==4851== total heap usage: 699 allocs, 353 frees, 102,872 bytes allocated
==4851==
==4851== 242 (80 direct, 162 indirect) bytes in 1 blocks are definitely lost in loss record 338 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x4291E3: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:70)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 434 (56 direct, 378 indirect) bytes in 1 blocks are definitely lost in loss record 339 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429218: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:71)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 447 (56 direct, 391 indirect) bytes in 1 blocks are definitely lost in loss record 340 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429282: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:73)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 457 (96 direct, 361 indirect) bytes in 1 blocks are definitely lost in loss record 341 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x42924D: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:72)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 1,116 (56 direct, 1,060 indirect) bytes in 1 blocks are definitely lost in loss record 343 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x4292B7: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:74)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 8,720 (528 direct, 8,192 indirect) bytes in 1 blocks are definitely lost in loss record 345 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429863: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:134)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 13,091 (80 direct, 13,011 indirect) bytes in 1 blocks are definitely lost in loss record 346 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x41B99D: stan::gm::argument_parser::argument_parser(std::vector<stan::gm::argument*, std::allocatorstan::gm::argument* >&) (argument_parser.hpp:25)
==4851== by 0x4292FB: int stan::common::command<binormal_model_namespace::binormal_model>(int, char const**) (command.hpp:76)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== LEAK SUMMARY:
==4851== definitely lost: 952 bytes in 7 blocks
==4851== indirectly lost: 23,555 bytes in 338 blocks
==4851== possibly lost: 0 bytes in 0 blocks
==4851== still reachable: 568 bytes in 1 blocks
==4851== suppressed: 0 bytes in 0 blocks
==4851== Reachable blocks (those to which a pointer was found) are not shown.
==4851== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==4851==
==4851== For counts of detected and suppressed errors, rerun with: -v
==4851== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293.

—
Reply to this email directly or view it on GitHub.

I take it you don't want to clean up what we have.
I think it's important, so I'll take care of it when I have some free time.
On Friday, February 13, 2015, Michael Betancourt<EMAIL_ADDRESS>wrote:

I think most of these are the poor way that we handle closing
the streams and a few stray pointers that aren’t carefully
deleted at every possible exit point. We really just need
to clean up command rather than hacking at it more.
On Feb 13, 2015, at 4:22 PM, Daniel Lee<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:

Thanks, Jiqiang! We really need to clean this up.
Since other interfaces will be using things in Stan, we need to be
careful
about memory management. @betanalpha, want to take a look?
On Fri, Feb 13, 2015 at 11:17 AM, maverickg<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

During debugging a different problem, I noticed there are memory
leaking.
Valgrind indicates there are a lot of new used in

https://github.com/stan-dev/stan/blob/develop/src/stan/services/command.hpp
,

but not necessarily there is a delete for all the possibilities of exit
from this function command.
Below is just an output of using valgrind from running the model with
test
gradient mode (cmdstan 2.6.0), which shows at line 70
<
https://github.com/stan-dev/stan/blob/v2.6.0/src/stan/common/command.hpp#L70
,
71, 72, 73, 74, 134 there is a new, but in this case, no delete
afterwards.
==4851== Memcheck, a memory error detector
==4851== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et
al.
==4851== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright
info
==4851== Command: ./binormal diagnose
==4851==
method = diagnose
diagnose
test = gradient (Default)
gradient
epsilon = 9.9999999999999995e-07 (Default)
error = 9.9999999999999995e-07 (Default)
id = 0 (Default)
data
file = (Default)
init = 2 (Default)
random
seed =<PHONE_NUMBER>
output
file = output.csv (Default)
diagnostic_file = (Default)
refresh = 100 (Default)
TEST GRADIENT MODE
Log probability=-1.49583
param idx value model finite diff error
0 -1.71648 1.69507 1.69507 1.2689e-10
1 -0.383584 0.214078 0.214078 -1.67667e-10
==4851==
==4851== HEAP SUMMARY:
==4851== in use at exit: 25,075 bytes in 346 blocks
==4851== total heap usage: 699 allocs, 353 frees, 102,872 bytes
allocated
==4851==
==4851== 242 (80 direct, 162 indirect) bytes in 1 blocks are
definitely lost in loss record 338 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x4291E3: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:70)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 434 (56 direct, 378 indirect) bytes in 1 blocks are
definitely lost in loss record 339 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429218: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:71)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 447 (56 direct, 391 indirect) bytes in 1 blocks are
definitely lost in loss record 340 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429282: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:73)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 457 (96 direct, 361 indirect) bytes in 1 blocks are
definitely lost in loss record 341 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x42924D: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:72)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 1,116 (56 direct, 1,060 indirect) bytes in 1 blocks are
definitely lost in loss record 343 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x4292B7: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:74)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 8,720 (528 direct, 8,192 indirect) bytes in 1 blocks are
definitely lost in loss record 345 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429863: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:134)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 13,091 (80 direct, 13,011 indirect) bytes in 1 blocks are
definitely lost in loss record 346 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x41B99D:
stan::gm::argument_parser::argument_parser(std::vector<stan::gm::argument*,
std::allocatorstan::gm::argument* >&) (argument_parser.hpp:25)
==4851== by 0x4292FB: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:76)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== LEAK SUMMARY:
==4851== definitely lost: 952 bytes in 7 blocks
==4851== indirectly lost: 23,555 bytes in 338 blocks
==4851== possibly lost: 0 bytes in 0 blocks
==4851== still reachable: 568 bytes in 1 blocks
==4851== suppressed: 0 bytes in 0 blocks
==4851== Reachable blocks (those to which a pointer was found) are not
shown.
==4851== To see them, rerun with: --leak-check=full
--show-leak-kinds=all
==4851==
==4851== For counts of detected and suppressed errors, rerun with: -v
==4851== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293#issuecomment-74286009.

I noticed that during code review the first time around,
but it just got left in because dangling resources in a command
run from the command-line aren't such a big deal because
the command's exiting will automatically clean them all up.
Running in a more server-like environment in R, it's
more important to clear resources because the process doesn't
quit after sampling.
Again, this wouldn't be a problem for something like MatlabStan
or Stan.jl that just call CmdStan in a separate process,
because it won't cause leaks within MATLAB or Julia.
The general pattern for robust allocation/deallocation
for resource a is:
try {
allocate a;
use a
free a;
} catch (...) {
free a;
throw;
}
That makes sure the resource will be cleaned up on every
execution path.  Java has a very convenient form of this
that could only be recreated in C++ with a macro:
*** JAVA ***
try {
allocate a;
use a;
} finally {
free a;
}
The finally block is always executed, even if there is
an exception in the try block.  (I think we've discussed
this before --- it's giving me a strange sense of deja vu.)
When there are many resources, this can lead to a lot of
nesting.  An alternative is to do something like this:
try {
allocate a;
...
allocate z;
use a, ..., z;
free a;
...
free z;
} catch (...) {
free a;
...
free z;
}
Now this is assuming that the free mechanism itself is robust.
It needs to be written to check if the resource is allocated and
do nothing if it is, then to catch, report, and cleanup any exceptions,
then continue without itself throwing.

Bob

On Feb 14, 2015, at 5:10 AM, Daniel Lee<EMAIL_ADDRESS>wrote:
I take it you don't want to clean up what we have.
I think it's important, so I'll take care of it when I have some free time.
On Friday, February 13, 2015, Michael Betancourt<EMAIL_ADDRESS>wrote:

I think most of these are the poor way that we handle closing
the streams and a few stray pointers that aren’t carefully
deleted at every possible exit point. We really just need
to clean up command rather than hacking at it more.
On Feb 13, 2015, at 4:22 PM, Daniel Lee<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:

Thanks, Jiqiang! We really need to clean this up.
Since other interfaces will be using things in Stan, we need to be
careful
about memory management. @betanalpha, want to take a look?
On Fri, Feb 13, 2015 at 11:17 AM, maverickg<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

During debugging a different problem, I noticed there are memory
leaking.
Valgrind indicates there are a lot of new used in

https://github.com/stan-dev/stan/blob/develop/src/stan/services/command.hpp
,

but not necessarily there is a delete for all the possibilities of exit
from this function command.
Below is just an output of using valgrind from running the model with
test
gradient mode (cmdstan 2.6.0), which shows at line 70
<
https://github.com/stan-dev/stan/blob/v2.6.0/src/stan/common/command.hpp#L70
,
71, 72, 73, 74, 134 there is a new, but in this case, no delete
afterwards.
==4851== Memcheck, a memory error detector
==4851== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et
al.
==4851== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright
info
==4851== Command: ./binormal diagnose
==4851==
method = diagnose
diagnose
test = gradient (Default)
gradient
epsilon = 9.9999999999999995e-07 (Default)
error = 9.9999999999999995e-07 (Default)
id = 0 (Default)
data
file = (Default)
init = 2 (Default)
random
seed =<PHONE_NUMBER>
output
file = output.csv (Default)
diagnostic_file = (Default)
refresh = 100 (Default)
TEST GRADIENT MODE
Log probability=-1.49583
param idx value model finite diff error
0 -1.71648 1.69507 1.69507 1.2689e-10
1 -0.383584 0.214078 0.214078 -1.67667e-10
==4851==
==4851== HEAP SUMMARY:
==4851== in use at exit: 25,075 bytes in 346 blocks
==4851== total heap usage: 699 allocs, 353 frees, 102,872 bytes
allocated
==4851==
==4851== 242 (80 direct, 162 indirect) bytes in 1 blocks are
definitely lost in loss record 338 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x4291E3: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:70)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 434 (56 direct, 378 indirect) bytes in 1 blocks are
definitely lost in loss record 339 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429218: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:71)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 447 (56 direct, 391 indirect) bytes in 1 blocks are
definitely lost in loss record 340 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429282: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:73)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 457 (96 direct, 361 indirect) bytes in 1 blocks are
definitely lost in loss record 341 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x42924D: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:72)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 1,116 (56 direct, 1,060 indirect) bytes in 1 blocks are
definitely lost in loss record 343 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x4292B7: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:74)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 8,720 (528 direct, 8,192 indirect) bytes in 1 blocks are
definitely lost in loss record 345 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429863: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:134)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 13,091 (80 direct, 13,011 indirect) bytes in 1 blocks are
definitely lost in loss record 346 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x41B99D:
stan::gm::argument_parser::argument_parser(std::vector<stan::gm::argument*,
std::allocatorstan::gm::argument* >&) (argument_parser.hpp:25)
==4851== by 0x4292FB: int
stan::common::command<binormal_model_namespace::binormal_model>(int, char
const**) (command.hpp:76)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== LEAK SUMMARY:
==4851== definitely lost: 952 bytes in 7 blocks
==4851== indirectly lost: 23,555 bytes in 338 blocks
==4851== possibly lost: 0 bytes in 0 blocks
==4851== still reachable: 568 bytes in 1 blocks
==4851== suppressed: 0 bytes in 0 blocks
==4851== Reachable blocks (those to which a pointer was found) are not
shown.
==4851== To see them, rerun with: --leak-check=full
--show-leak-kinds=all
==4851==
==4851== For counts of detected and suppressed errors, rerun with: -v
==4851== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293#issuecomment-74286009.

—
Reply to this email directly or view it on GitHub.

I realized that this may not be as big an issue right now. RStan doesn't
use command.hpp. It has it's own implementation, so if there's a memory
leak that we need to fix, it'll be in RStan.
Of course, as we're refactoring this, we'll need to keep this in mind. I'll
still go through and fix what I can.
On Fri, Feb 13, 2015 at 7:05 PM, Bob Carpenter<EMAIL_ADDRESS>wrote:

I noticed that during code review the first time around,
but it just got left in because dangling resources in a command
run from the command-line aren't such a big deal because
the command's exiting will automatically clean them all up.
Running in a more server-like environment in R, it's
more important to clear resources because the process doesn't
quit after sampling.
Again, this wouldn't be a problem for something like MatlabStan
or Stan.jl that just call CmdStan in a separate process,
because it won't cause leaks within MATLAB or Julia.
The general pattern for robust allocation/deallocation
for resource a is:
try {
allocate a;
use a
free a;
} catch (...) {
free a;
throw;
}
That makes sure the resource will be cleaned up on every
execution path. Java has a very convenient form of this
that could only be recreated in C++ with a macro:
*** JAVA ***
try {
allocate a;
use a;
} finally {
free a;
}
The finally block is always executed, even if there is
an exception in the try block. (I think we've discussed
this before --- it's giving me a strange sense of deja vu.)
When there are many resources, this can lead to a lot of
nesting. An alternative is to do something like this:
try {
allocate a;
...
allocate z;
use a, ..., z;
free a;
...
free z;
} catch (...) {
free a;
...
free z;
}
Now this is assuming that the free mechanism itself is robust.
It needs to be written to check if the resource is allocated and
do nothing if it is, then to catch, report, and cleanup any exceptions,
then continue without itself throwing.

Bob

On Feb 14, 2015, at 5:10 AM, Daniel Lee<EMAIL_ADDRESS>wrote:
I take it you don't want to clean up what we have.
I think it's important, so I'll take care of it when I have some free
time.
On Friday, February 13, 2015, Michael Betancourt <
<EMAIL_ADDRESS>wrote:

I think most of these are the poor way that we handle closing
the streams and a few stray pointers that aren’t carefully
deleted at every possible exit point. We really just need
to clean up command rather than hacking at it more.
On Feb 13, 2015, at 4:22 PM, Daniel Lee<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:

Thanks, Jiqiang! We really need to clean this up.
Since other interfaces will be using things in Stan, we need to be
careful
about memory management. @betanalpha, want to take a look?
On Fri, Feb 13, 2015 at 11:17 AM, maverickg <
<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>>
wrote:

During debugging a different problem, I noticed there are memory
leaking.
Valgrind indicates there are a lot of new used in

https://github.com/stan-dev/stan/blob/develop/src/stan/services/command.hpp

,

but not necessarily there is a delete for all the possibilities of
exit
from this function command.
Below is just an output of using valgrind from running the model
with
test
gradient mode (cmdstan 2.6.0), which shows at line 70
<

https://github.com/stan-dev/stan/blob/v2.6.0/src/stan/common/command.hpp#L70

,

71, 72, 73, 74, 134 there is a new, but in this case, no delete
afterwards.
==4851== Memcheck, a memory error detector
==4851== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward
et
al.
==4851== Using Valgrind-3.10.0 and LibVEX; rerun with -h for
copyright
info
==4851== Command: ./binormal diagnose
==4851==
method = diagnose
diagnose
test = gradient (Default)
gradient
epsilon = 9.9999999999999995e-07 (Default)
error = 9.9999999999999995e-07 (Default)
id = 0 (Default)
data
file = (Default)
init = 2 (Default)
random
seed =<PHONE_NUMBER>
output
file = output.csv (Default)
diagnostic_file = (Default)
refresh = 100 (Default)
TEST GRADIENT MODE
Log probability=-1.49583
param idx value model finite diff error
0 -1.71648 1.69507 1.69507 1.2689e-10
1 -0.383584 0.214078 0.214078 -1.67667e-10
==4851==
==4851== HEAP SUMMARY:
==4851== in use at exit: 25,075 bytes in 346 blocks
==4851== total heap usage: 699 allocs, 353 frees, 102,872 bytes
allocated
==4851==
==4851== 242 (80 direct, 162 indirect) bytes in 1 blocks are
definitely lost in loss record 338 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x4291E3: int
stan::common::command<binormal_model_namespace::binormal_model>(int,
char
const**) (command.hpp:70)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 434 (56 direct, 378 indirect) bytes in 1 blocks are
definitely lost in loss record 339 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429218: int
stan::common::command<binormal_model_namespace::binormal_model>(int,
char
const**) (command.hpp:71)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 447 (56 direct, 391 indirect) bytes in 1 blocks are
definitely lost in loss record 340 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429282: int
stan::common::command<binormal_model_namespace::binormal_model>(int,
char
const**) (command.hpp:73)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 457 (96 direct, 361 indirect) bytes in 1 blocks are
definitely lost in loss record 341 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x42924D: int
stan::common::command<binormal_model_namespace::binormal_model>(int,
char
const**) (command.hpp:72)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 1,116 (56 direct, 1,060 indirect) bytes in 1 blocks are
definitely lost in loss record 343 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x4292B7: int
stan::common::command<binormal_model_namespace::binormal_model>(int,
char
const**) (command.hpp:74)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 8,720 (528 direct, 8,192 indirect) bytes in 1 blocks are
definitely lost in loss record 345 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x429863: int
stan::common::command<binormal_model_namespace::binormal_model>(int,
char
const**) (command.hpp:134)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== 13,091 (80 direct, 13,011 indirect) bytes in 1 blocks are
definitely lost in loss record 346 of 346
==4851== at 0x4C29180: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4851== by 0x41B99D:

stan::gm::argument_parser::argument_parser(std::vector<stan::gm::argument*,

std::allocatorstan::gm::argument* >&) (argument_parser.hpp:25)

==4851== by 0x4292FB: int
stan::common::command<binormal_model_namespace::binormal_model>(int,
char
const**) (command.hpp:76)
==4851== by 0x4096EB: main (main.cpp:7)
==4851==
==4851== LEAK SUMMARY:
==4851== definitely lost: 952 bytes in 7 blocks
==4851== indirectly lost: 23,555 bytes in 338 blocks
==4851== possibly lost: 0 bytes in 0 blocks
==4851== still reachable: 568 bytes in 1 blocks
==4851== suppressed: 0 bytes in 0 blocks
==4851== Reachable blocks (those to which a pointer was found) are
not
shown.
==4851== To see them, rerun with: --leak-check=full
--show-leak-kinds=all
==4851==
==4851== For counts of detected and suppressed errors, rerun with:
-v
==4851== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0
from 0)
—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293#issuecomment-74286009.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293#issuecomment-74349216.

If we're still having RStan follow CmdStan, then it'd be helpful
to provide a way to do this right within CmdStan that could
be followed in RStan/PyStan.

Bob

Agreed.
On Fri, Feb 13, 2015 at 7:51 PM, Bob Carpenter<EMAIL_ADDRESS>wrote:

If we're still having RStan follow CmdStan, then it'd be helpful
to provide a way to do this right within CmdStan that could
be followed in RStan/PyStan.

Bob

—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293#issuecomment-74352588.

Why original comment was more that we might as well start
cleaning up command rather than adding deletes at every
possible exit point.
The one obvious leak is the sampler pointer, but I now know
enough about templates that I should be able to get rid of
that entirely.  Which I think just leaves the streams, which
really shouldn’t be managed by command at all but rather
passed in externally via var_contexts.
On Feb 14, 2015, at 2:54 AM, Daniel Lee<EMAIL_ADDRESS>wrote:

Agreed.
On Fri, Feb 13, 2015 at 7:51 PM, Bob Carpenter<EMAIL_ADDRESS>wrote:

If we're still having RStan follow CmdStan, then it'd be helpful
to provide a way to do this right within CmdStan that could
be followed in RStan/PyStan.

Bob

—
Reply to this email directly or view it on GitHub
https://github.com/stan-dev/stan/issues/1293#issuecomment-74352588.

—
Reply to this email directly or view it on GitHub.

On Feb 14, 2015, at 9:25 PM, Michael Betancourt<EMAIL_ADDRESS>wrote:
Why original comment was more that we might as well start
cleaning up command rather than adding deletes at every
possible exit point.

Agreed.  The clean up at every exit point thing is much
uglier in plain old C when you can't even use exceptions.

The one obvious leak is the sampler pointer, but I now know
enough about templates that I should be able to get rid of
that entirely.

That'd be great!  It should be possible in theory, but
I never tracked through what would be required in practice.

Which I think just leaves the streams, which
really shouldn’t be managed by command at all but rather
passed in externally via var_contexts.

This is confusing to talk about.  By "command" you mean
the C++ code in Stan?  Certainly CmdStan needs to manage
the streams.
I'm OK with having the streams managed externally.  Ideally,
the code that allocates a resource should also release it.

Bob

This is confusing to talk about. By "command" you mean
the C++ code in Stan? Certainly CmdStan needs to manage
the streams.

I mean the function command defined in command.hpp.
The memory leak is being reported in test_gradients, at
which point the only thing allocated are pointers to
the output and diagnostic streams.  These pointers
are deallocated only at the end of the function, so if
test_gradients terminates early then they leak.
The immediate hack for this particular leak is to
add deletes before every return 0 in the code.
But really there should be no streams allocated in
the code — there should be external functors passed in
by each interface that are allocated and deallocated
outside of command.
This is on the refactoring plan, it’s just going to take
time.  If anyone wants to give me tenure at a sweet
university then it’ll get done a lot sooner...

On Feb 15, 2015, at 12:29 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:

This is confusing to talk about. By "command" you mean
the C++ code in Stan? Certainly CmdStan needs to manage
the streams.

I mean the function command defined in command.hpp.
The memory leak is being reported in test_gradients, at
which point the only thing allocated are pointers to
the output and diagnostic streams. These pointers
are deallocated only at the end of the function, so if
test_gradients terminates early then they leak.
The immediate hack for this particular leak is to
add deletes before every return 0 in the code.

Exceptions are your friend because they make writing this
kind of code much easier.  It should look like:
try {
...... replace error return with special return exception ......
} catch (...) {
clean up resources
return error code
}
return success code
The old C idiom was to use a goto to a labeled clean up block,
passing in a global-to-the-function return code.  But that's
just a hacked-together way to simulate exception handling.

But really there should be no streams allocated in
the code —

Agreed.  That ...... above would be command and the catch
would be wrapping it all.

there should be external functors passed in
by each interface that are allocated and deallocated
outside of command.

That's one way to do it I could live with.

This is on the refactoring plan, it’s just going to take
time. If anyone wants to give me tenure at a sweet
university then it’ll get done a lot sooner...

I would if it were mine to give!

Bob

This is a false positive from valgrind. We aren't actually leaking memory because we're managing our own memory.

If my memory serves me right, this was not a false positive.  But it was a not a big deal as the memory would be released when the program ends.

Looking over this again and Michael's response, I think Jiqiang's right, so I'm reopening.

Thanks for reopening. I'm moving this to CmdStan since this code has moved. This should no longer be a problem for Stan proper.

This issue was moved to stan-dev/cmdstan#339