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

[Xamarin.Android.Build.Tasks] Handle Empty R.txt file. #7133

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

dellis1972
Copy link
Contributor

Fixes https://i.azdo.io/1439405

The ManagedResourceParser was not handling the case where we do not
get four items per line. As a result it would crash with the following
error.

System.IndexOutOfRangeException: Index was outside of bounds of the array.
as Xamarin.And.Tasks.ManagedResourceParser.ProcessRtxtFile (System.String file)

If we do not get the expected four items from the line in the file we
should ignore that line. A unit test has been added to check that the
task does not fail when this happens.

Fixes https://i.azdo.io/1439405

The ManagedResourceParser was not handling the case where we do not
get four items per line. As a result it would crash with the following
error.

```
System.IndexOutOfRangeException: Index was outside of bounds of the array.
as Xamarin.And.Tasks.ManagedResourceParser.ProcessRtxtFile (System.String file)
```

If we do not get the expected four items from the line in the file we
should ignore that line. A unit test has been added to check that the
task does not fail when this happens.
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the test failures are unrelated:

06-29 10:43:52.573  4924  4924 I XALINKERTESTS: [FAIL] HttpClientTest.Post FAILED: System.Net.Http.HttpRequestException: Response status code does not indicate success: 504 (Gateway Time-out).
06-29 10:43:52.573  4924  4924 I XALINKERTESTS:   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode () [0x00040] in <8ef0bbcec78b495f8aa1c8e4c4c398b3>:0 
06-29 10:43:52.573  4924  4924 I XALINKERTESTS:   at HttpClientTest.Post () [0x0002f] in <80b7ca95626f470f8b58e6d11ea567ea>:0 
error ANDZA0000: Unable to open 'obj/Debug/android/bin/com.xamarin.applicationjavaclassproperties.apk' as zip archive 

@jonpryor jonpryor merged commit 57f280c into dotnet:main Jul 5, 2022
@dellis1972 dellis1972 deleted the WI1439405 branch July 11, 2022 14:09
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants