Skip to content

Encountering crash in 'Hello' test case #1296

Description

@pjcollins

Steps to Reproduce

  1. Install and run the provided .apk file on device.

Mono.Samples.HelloTests-Signed.zip

Expected Behavior

Application launches and the series of test cases which execute at startup will run to completion.

Actual Behavior

Application crashes on startup.

Version Information

Operating System: Microsoft Windows 10 Enterprise 64-bit
Product Name: Xamarin.Android
Branch Name: mono-2017-12
Build Revision: d386c85d46cf4d3b877d6610de14ee2fb84c1b69
[Device] Manufacturer: Google, Model: Pixel XL, Version: 7.1.1, ABI: arm64-v8a, Timezone: America/New_York

Log File

http://xqa.blob.core.windows.net/gist/log-b6d91c4d05284b508516c98e9868492f.txt

Activity

  1. added this to the d15-7 milestone on Feb 12, 2018
  2. jonpryor commented on Feb 12, 2018

    @jonpryor
    Contributor

    Can you please provide the diagnostic build log? Also, in the obj/... tree, what are the contents of main.xml?

    It looks like we’re not properly translating Mono.Samples.Hello.MyFragment into md5whatever.MyFragment, which is why Android can’t find it. Specifically, if I use apktool d to decode the contents of Mono.Samples.HelloTests-Signed.apk, res/layout-v11/main.xml contains:

    <fragment android:name="Mono.Samples.Hello.MyFragment, Hello, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" android:id="@id/csharp_full_assembly" android:layout_width="fill_parent" android:layout_height="wrap_content" />

    This is wrong; it should match one of the previous (in the same file!) lines, e.g.:

    <fragment android:name="md5c7537e80324c78ebad79edc8b8a9cda5.MyFragment" android:id="@id/csharp_full_assembly" android:layout_width="fill_parent" android:layout_height="wrap_content" />

    …but why wouldn’t that be happening? That seems quite odd. :-/

    It's plausible that this is fallout from commit e5b1c92 -- last December! -- which wasn't not part of d15-6 (deliberately!). If this is the case, then ~any Xamarin.Android build after 2017-Jan-11 should likewise exhibit this bug, meaning it is not due to the mono/2017-12 bump.

  3. pjcollins commented on Feb 12, 2018

    @pjcollins
    MemberAuthor

    @jonpryor I was unable to reproduce this issue earlier today using monodroid/master/de602598, which is why I was curious as to the delta between master and mono-2017-12.

    Diagnostic installation output can be found below:
    http://xqa.blob.core.windows.net/gist/log-e7fb0ffa8a224d2ea324a1c06bed7196.txt

    obj/Release/res/layout/main.xml contains:

    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/NameFixups" xmlns:android="http://schemas.android.com/apk/res/android"><ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/scroll"><LinearLayout android:id="@+id/extra" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"><ImageView android:id="@+id/image_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/case_check" /><md5c7537e80324c78ebad79edc8b8a9cda5.MyView android:id="@+id/csharp_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="csharp_view" /><md5c7537e80324c78ebad79edc8b8a9cda5.MyView android:id="@+id/legacy_acw_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="legacy_acw_view" /></LinearLayout></ScrollView></LinearLayout>

    obj/Release/res/layout-11/main.xml contains:

    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/NameFixups" xmlns:android="http://schemas.android.com/apk/res/android"><ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/scroll"><LinearLayout android:id="@+id/extra" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"><ImageView android:id="@+id/image_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/case_check" /><md5c7537e80324c78ebad79edc8b8a9cda5.MyView android:id="@+id/csharp_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="csharp_view" /><md5c7537e80324c78ebad79edc8b8a9cda5.MyView android:id="@+id/legacy_acw_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="legacy_acw_view" /><fragment android:name="md5c7537e80324c78ebad79edc8b8a9cda5.MyFragment" android:id="@+id/csharp_simple_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" /><fragment android:name="md5c7537e80324c78ebad79edc8b8a9cda5.MyFragment" android:id="@+id/csharp_legacy_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" /><fragment android:name="md5c7537e80324c78ebad79edc8b8a9cda5.MyFragment" android:id="@+id/csharp_partial_assembly" android:layout_width="match_parent" android:layout_height="wrap_content" /><fragment android:name="Mono.Samples.Hello.MyFragment, Hello, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" android:id="@+id/csharp_full_assembly" android:layout_width="match_parent" android:layout_height="wrap_content" /></LinearLayout></ScrollView></LinearLayout>
  4. pjcollins commented on Feb 13, 2018

    @pjcollins
    MemberAuthor

    I think my inability to reproduce yesterday against master may have been due to an accidental usage of a different version which existed in a side by side installation. I am able to reproduce this against master as well.

  5. changed the title [-][Mono 2017-12] Encountering crash in 'Hello' test case[/-] [+]Encountering crash in 'Hello' test case[/+] on Feb 13, 2018
  6. added a commit that references this issue on Feb 21, 2018
  7. pjcollins commented on Feb 22, 2018

    @pjcollins
    MemberAuthor

    Verified fixed in d15-7.

  8. ghost locked as resolved and limited conversation to collaborators on Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions