Bug 56272 - [VSfM 15.3] Designer UI throws Null Pointer Exception when API Version 4.0 (v14) is selected.
Summary: [VSfM 15.3] Designer UI throws Null Pointer Exception when API Version 4.0 (v...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Designer ()
Version: 7.1 (d15-3)
Hardware: PC Mac OS
: High major
Target Milestone: 15.3
Assignee: Jérémie Laval
URL:
: 55228 56559 57406 58106 59713 ()
Depends on:
Blocks:
 
Reported: 2017-05-12 09:40 UTC by Mohak Barokar
Modified: 2017-09-25 18:24 UTC (History)
10 users (show)

Tags: Shiproom
Is this bug a regression?: Yes
Last known good build:


Attachments
Designer Logs and Error Stacktrace (9.22 KB, application/zip)
2017-05-12 09:40 UTC, Mohak Barokar
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Mohak Barokar 2017-05-12 09:40:33 UTC
Created attachment 22110 [details]
Designer Logs and Error Stacktrace

Designer UI throws Null Pointer Exception when API Version 4.0 (v14) is selected.


==============================================================================

Environment Info: https://gist.github.com/mohakbarokar/eb35761f65ca9cb432a96cc97615789a

==============================================================================
Pre-Condition: Android 4.0 (API-14) is installed.

Steps: 
1. Create Android Application
2. Navigate to Resources > Layout
3. Open .axml file
4. Click on Version dropdown API's and select Android 4.0
5. Observe UI Rendering of Android Application

==============================================================================

Expected Result: Application UI should render properly when API-14(Android 4.0) is selected

Actual Result: Designer window throws Null Pointer exception. 

==============================================================================

Screencast Link: http://www.screencast.com/t/J1NzDVCqUx

==============================================================================

Reproducible: 100%
Comment 2 Jon Douglas [MSFT] 2017-07-05 21:21:54 UTC
I can CONFIRM this behavior on VS4Mac running even 7.0.1 (build 24).

This also happens on VS 2017 - 4.5.0.468

mono.android.DesignerException: java.lang.NullPointerException
	at mono.android.DesignerException.fromThrowable(DesignerException.java:46)
	at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:187)
	at mono.android.DesignerSession.load(DesignerSession.java:239)
	at mono.android.DesignerSession.processMessage(DesignerSession.java:702)
	at mono.android.MessageListener.executeMessage(MessageListener.java:88)
	at mono.android.MessageListener$Runner.run(MessageListener.java:44)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at android.content.res.Resources_Delegate.disposeSystem(Resources_Delegate.java:85)
	at com.android.layoutlib.bridge.android.BridgeContext.disposeResources(BridgeContext.java:264)
	at com.android.layoutlib.bridge.impl.RenderAction.tearDown(RenderAction.java:257)
	at com.android.layoutlib.bridge.impl.RenderAction.release(RenderAction.java:220)
	at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:438)
	at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:368)
	at mono.android.DesignerSession.load(DesignerSession.java:233)
	... 4 more


The limitation seems to be >= API 21 where it does indeed work. Anything below 21 fails with the exception above.
Comment 5 xamarin-release-manager 2017-07-12 19:19:19 UTC
Fixed in version 7.3.0.27 (master)

Pull Request #2198 merged by: Alan McGovern
Author: xamarin
Commit: b43b6cdadff1c5b4f342443bb1c9f76edf845e3c (xamarin/md-addins)
Included in Commit: 41a90e6dffcccb8a23aa2f15543c0d48e3ab8d1b (mono/monodevelop)
Comment 8 Jon Douglas [MSFT] 2017-07-17 17:38:08 UTC
*** Bug 58106 has been marked as a duplicate of this bug. ***
Comment 9 Jon Douglas [MSFT] 2017-07-17 17:39:07 UTC
*** Bug 55228 has been marked as a duplicate of this bug. ***
Comment 10 Jon Douglas [MSFT] 2017-07-17 17:39:36 UTC
*** Bug 57406 has been marked as a duplicate of this bug. ***
Comment 11 Jon Douglas [MSFT] 2017-07-18 16:38:41 UTC
*** Bug 56559 has been marked as a duplicate of this bug. ***
Comment 12 Jon Douglas [MSFT] 2017-09-25 18:24:33 UTC
*** Bug 59713 has been marked as a duplicate of this bug. ***