java.lang.VerifyError: Verifier rejected class in debug build

I get the following error in an Android-App-Project in AndroidStudio:

java.lang.VerifyError: Verifier rejected class CLASSNAME: void CLASSNAME.FKTNAME(ARGS) failed to verify: void CLASSNAME.FKTNAME(ARGS): [0xBEEF] copy1 vXX <-vYY type=Imprecise Constant: 127 cat=3

This question is similar to my error, except for the exact situation and that I get it in debug-build, which has isMinifyEnabled = false and pro-guard is only applied to release-build.

The error happens in the context of androidx.compose.

The original error

I already got a similar error before (a different code section, the same function and obviously different registers), that I was able to solve by putting LocalContext.current (just this, no assignment or similar) at the beginning of the box that contained the Column whose modifier contained the problematic code section.

The error came as the box was added to surround the Column. One of the candidates for causing the issue was this code section:

val isLandscape
    @Composable
    @ReadOnlyComposable
    get() = LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE

If the value of get-function was replaced by true or false, the error would not be there (if all other problematic code was removed/commented).

The new error

I analysed the changes of the commit that introduced the issue. It looked like a very similar problem.

The main part of the problem is related to a function call. This made it nessesary to extract the section to a function, as I was not able to create dummy values for all required arguments (as this was part of the diagnosis of the old problem) and this way I can just disable the call to the original function inside of the new function and decide what arguments I want to test.

This way I was able to find “one-line breaking changes”. One example is putting or not putting the first problematic argument to the new function. This argument is passed to the top-level function (the one mentioned in the error log), is it is not changed (in obvious ways) inside of it. This might also be the reason why this time I was not able to get around it by a similar trick as the old error.

The original error message (before I extracted the function) contains this

[0x56A0] copy1 v6<-v69 type=Imprecise Constant: 127 cat=3

The following I created based on the smali-code that is generated for the function and it contains some relevant lines of the decompiled smali-code.

166: .param p0, "navController"    # Landroidx/navigation/NavController;
170: p4, "shape"    # Landroidx/compose/foundation/shape/RoundedCornerShape;
172: param p6, "$composer"    # Landroidx/compose/runtime/Composer;
221: v1, p6
249: v68, v1
259: v68, p3
263: .local v68, "modifier":Landroidx/compose/ui/Modifier;
318: .local v1, "shape":Landroidx/compose/foundation/shape/RoundedCornerShape;
325: v69, v1  # "shape"
333: v69, p4
341: .local v69, "shape":Landroidx/compose/foundation/shape/RoundedCornerShape
1075: p4, v11  # not important
1077: .local p4, "$this$cache$iv":Landroidx/compose/runtime/Composer;
3505: v6, v69
9074: v69, 0x6
31302: .end local v6
31535: sget-object v6, Landroidx/compose/runtime/Composer;->Companion:Landroidx/compose/runtime/Composer$Companion;
31547: v6, v4
31554: v6, 0x0  # null?
31557: .local v6, "$i$a$-cache-PlayerModernKt$PlayerModern$30$5":I
31565: .end local v6
31566: v6, v7
31569: .local v6, "value$iv":Ljava/lang/Object;
31576: .end local v6    # "value$iv":Ljava/lang/Object;
31744: sget-object v6, Landroidx/compose/runtime/Composer;->Companion:Landroidx/compose/runtime/Composer$Companion;
31765: v6, 0x0  # null?
31769: .local v6, "$i$a$-cache-PlayerModernKt$PlayerModern$30$8":I
31780: .end local v6    # "$i$a$-cache-PlayerModernKt$PlayerModern$30$8":I
31988: v6, v69
32271: v6, v69
32488: v10, Lcom/example/app/ui/screens/player/PlayerModernKt$PlayerModern$1;
32490: v1, v10  # PlayerModern$1
32492: v2, p0  # "navController"
32494: v3, p1  # "layoutState"
32496: v4, p2  # "playerState"
32498: v5, v68  # "modifier"
32500: v6, v69  # should be Landroidx/compose/foundation/shape/RoundedCornerShape
32502: v7, p5  # "onDismiss"    # Lkotlin/jvm/functions/Function0;
32504: v8, p7  # "$composer"    # Landroidx/compose/runtime/Composer;
32506: v9, p8  # ?

I guess that the error is about line 32500.

In general compose-related issues seem like a very difficult thing to debug.

Can someone please explain why this old error was fixed via this way and what I can do about the new error?

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