Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashing when trying to open scanner in release build #207

Open
hansAtLIS opened this issue Nov 27, 2024 · 0 comments
Open

App crashing when trying to open scanner in release build #207

hansAtLIS opened this issue Nov 27, 2024 · 0 comments

Comments

@hansAtLIS
Copy link

Hello,
in the project of my company the app currently crashes when trying to open it.
This only happens when the app is build in the relase configuration but works like a charm in debug.
Do you have any idea how to implement the scanner in a different way to stop this behavior?
This is how its implemented as a popup:

<?xml version="1.0" encoding="utf-8" ?>
<local:BasePage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:Class="App.Views.Popups.ScannerPopupPage"
                xmlns:zxing="clr-namespace:ZXing.Net.Maui.Controls;assembly=ZXing.Net.MAUI.Controls"
                xmlns:local="clr-namespace:App"
                xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
                xmlns:strings="clr-namespace:App.Resources.Strings"
                Title="{x:Static strings:AppResources.Scanner}">
  <Grid>
    <ContentView x:Name="BarcodeReaderContainer"
                 IsVisible="true">
      <zxing:CameraBarcodeReaderView x:Name="CameraBarcodeReader"
                                     BarcodesDetected="BarcodeDetected"
                                     VerticalOptions="FillAndExpand"
                                     HorizontalOptions="FillAndExpand" />
    </ContentView>


    <BoxView x:Name="UpperGrayedOutSection"
             Style="{StaticResource GrayedOutSection}"
             VerticalOptions="Start" />

    <BoxView x:Name="LowerGrayedOutSection"
             Style="{StaticResource GrayedOutSection}"
             VerticalOptions="End" />

    <BoxView x:Name="redline" IsVisible="true" Style="{StaticResource RedLine}"/>

    <Button x:Name="CloseButton" Style="{StaticResource CloseModalButtonStyle}"
            Clicked="OnCloseButtonClicked" />

    <Button x:Name="FlashlightButton" Style="{StaticResource FlashlightButtonStyle}"
            Clicked="OnFlashlightButtonClicked">

      <Button.ImageSource>
        <FileImageSource File="flashlight.png"></FileImageSource>
      </Button.ImageSource>

    </Button>

    <ImageButton Source="pause_icon"
                 IsVisible="False"
                 x:Name="PlayButton"
                 WidthRequest="100"
                 Clicked="PlayButton_Clicked" />

    <ContentView x:Name="AdditionaleContent"
                 VerticalOptions="End"
                 HorizontalOptions="StartAndExpand"
                 Margin="0,0,0,35" />

    <toolkit:MediaElement x:Name="beepPositive"
                          IsVisible="False"
                          Source="Resources/Sounds/BeepPositive.wav"/>
    <toolkit:MediaElement x:Name="beepNegative" 
                          IsVisible="False"
                          Source="Resources/Sounds/error-sound.wav"/>
  </Grid>

</local:BasePage>

I'll gladly provide additional info if needed.
Best regards,
Hans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant