art::StackVisitor::WalkStack break / crash while debugging

I am using Android Studio Giraffe | 2022.3.1 Patch 2 (should probably update) and encounter annoying crashes of the Debugger in the app(disassembly) in either of the methods

art::StackVisitor::WalkStack

art::jit::JitCodeCache::GetJniStubCode

The underlying codebase is fairly large and basically retrieves uvc frames using saki4510t/UVCCamera library from webcamera devices, then manipulates those UVC frames inside a custom jni c++ part and then transfers the frames into the java part to finally display the images inside an imageview.
Certainly, lots of things can go wrong here but this construct worked so far well. However investigations inside the code base using native + java debugger became impossible due to breaks in said art methods.

I’ve tried to break down a small example to reproduce the crash.The example is a modified native c++ template project selected from Android Studio’s gallery:

public class MainActivityextends AppCompatActivity {
// Used to load the 'jnibugdemo' library on application startup.
static {
    System.loadLibrary("jnibugdemo");
 }

private Thread MainProcess;
boolean MainProcessON;
private ActivityMainBindingbinding;
MainProcessClass currentMainProcessClass;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    binding = ActivityMainBinding.inflate(getLayoutInflater());
    setContentView(binding.getRoot());
    // Example of a call to a native method
    TextView tv = binding.sampleText;
    tv.setText(stringFromJNI());
    MainProcessON = false;
    }

@Override
public void onResume() {
    super.onResume();
    if( !MainProcessON) {
        MainProcessON = true;
        currentMainProcessClass= new MainProcessClass();
        MainProcess= new Thread(currentMainProcessClass);
        MainProcess.start();
        }
    }

private class MainProcessClassimplements Runnable {
    Bitmap.Config currentScreen_conf;
    Bitmap currentScreen;
    int width,height;
    byte[] RawFrameBufferIn;
    byte[] RawFrameBufferOut;
    ByteBuffer currentScreen_bytebuffer;
    int currentScreensize;
    byte bmp_rgbValues[];

    MainProcessClass() {
        width = 640;
        height = 480;
        currentScreen_conf= Bitmap.Config.ARGB_8888;
        currentScreen= Bitmap.createBitmap(width, height, currentScreen_conf);
        currentScreensize = currentScreen.getRowBytes()*currentScreen.getHeight()*4;
        bmp_rgbValues = new byte[currentScreensize];
        currentScreen_bytebuffer = ByteBuffer.wrap(bmp_rgbValues);
        currentScreen.copyPixelsToBuffer(currentScreen_bytebuffer);
        RawFrameBufferIn= new byte [width*height * 2];
        }

    public void run() {
        int count_c, count_r, count_b;
        byte check;
        while (MainProcessON) {
            // currentScreen_bytebuffer = ByteBuffer.wrap(bmp_rgbValues);
            // currentScreen.copyPixelsToBuffer(currentScreen_bytebuffer);

            RawFrameBufferOut= nativeGetRawFrames(RawFrameBufferIn);
            //      RawFrameBufferOut = nativeGetRawFrames(RawFrameBufferIn);
            count_b = 0;
            for (count_c = 0; count_c<width; count_c++) {
                for (count_r = 0; count_r<height; count_r++) {
                    check = (byte)(RawFrameBufferOut[2*(count_c*height + count_r)] &0xFF);
                    bmp_rgbValues[count_b] = check;
                    count_b++;
                    bmp_rgbValues[count_b] = check;
                    count_b++;
                    bmp_rgbValues[count_b] = check;
                    count_b++;
                    count_b++;
                            }
                    }
            currentScreen_bytebuffer.rewind();
            currentScreen.copyPixelsFromBuffer(currentScreen_bytebuffer);

            //  SetImageView(currentScreen);    
            try {
                sleep(30);
                    } catch (InterruptedException ex) {
                throw new RuntimeException(ex);
                    }
                }
        }
    }
public native byte[] nativeGetRawFrames(byte[] source);
public native String stringFromJNI();
}

Inside the native-lib.cpp this method

Java_com_example_jnibugdemo_MainActivity_nativeGetRawFrames(JNIEnv *env, jobjectthiz,
jbyteArray source) {
int nop;
nop = 1;
return source;
}

needs to be added (which needs to be created using right-click on the java method: public native byte[] nativeGetRawFrames(byte[] source); select “Show content actions” and select “Create JINI function for nativeGetRawFrames. This creates inside the native_lib.cpp the function body which needs then to be modied accordingly to the snipped given above.

If this is let run on a real device using debugger after a few seconds the mentioned breaks/crashs can be observed. It seems the crash is solely caused by accessing the bitmap – so it breaks also without invoking the native method. However not reproducible I see occasionally also breaks in the mentioned art methods without touching the bitmap if the native method is only invoked.

Would be glad if someone could give advice here.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật