Bug 35539 - generator.exe crashes when build Android Java Binding Solution
Summary: generator.exe crashes when build Android Java Binding Solution
Status: RESOLVED ANSWERED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 5.1
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2015-11-04 12:31 UTC by 13725522378
Modified: 2015-11-11 21:05 UTC (History)
1 user (show)

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

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:
RESOLVED ANSWERED

Description 13725522378 2015-11-04 12:31:12 UTC
Issue:
 generator.exe exited with code -1073741819. (MSB6006)

Platform: Windows7/10 x64

**Environment: **
Xamarin Studio
Version 5.9.7 (build 22)
Installation UUID: a8c48873-bcd7-410a-8758-281379d4e884
Runtime:
	Microsoft .NET 4.0.30319.42000
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

Xamarin.Android
Version: 5.1.7 (Indie Edition)
Android SDK: C:\Program Files (x86)\Android\android-sdk
	Supported Android versions:
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)
Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_55
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)

Xamarin Android Player
Not Installed

Build Information
Release ID: 509070022
Git revision: 6bd1f169df44ca96addf8a035316c535a4fa46fa
Build date: 2015-09-30 10:13:51-04
Xamarin addins: 1c3e5c0859bdfec0ecd481a57ad6c03bc22f5536

Operating System
Windows 6.2.9200.0 (64-bit)
Jar to be built: Selendroid Standalone with dependencies from http://selendroid.io/

**Step to reproduce:**
S1. Create a Android Java Binding Solution

S2. Add the jar selendroid-standalone-0.17.0-with-dependencies.jar to the jars directory

S3. Replace the metadata.xml with below content: (to walk around many errors ...)

<metadata>
  <remove-node path="/api/package[@name='com.google.common.util.concurrent']"/>
  <remove-node path="/api/package[@name='com.android.ddmlib.log']" name="managedName">com.android.ddmlib.log0</remove-node>
  <remove-node path="/api/package[@name='com.sun.jna.platform']" name="managedName">com.sun.jna.platform0</remove-node>
  <remove-node path="/api/package[@name='com.sun.jna.platform.dnd']" name="managedName">com.sun.jna.platform0.dnd</remove-node>
  <remove-node path="/api/package[@name='com.sun.jna.platform.mac']" name="managedName">com.sun.jna.platform0.mac</remove-node>
  <remove-node path="/api/package[@name='com.sun.jna.platform.unix']" name="managedName">com.sun.jna.platform0.unix</remove-node>
  <remove-node path="/api/package[@name='com.sun.jna.platform.win32']" name="managedName">com.sun.jna.platform0.win32</remove-node>
  <remove-node path="/api/package[@name='com.sun.jna.platform.win32.COM']" name="managedName">com.sun.jna.platform0.win32.COM</remove-node>
  <remove-node path="/api/package[@name='com.sun.jna.platform.win32.COM.tlb.imp']" name="managedName">com.sun.jna.platform0.win32.COM.tlb.imp</remove-node>
  <remove-node path="/api/package[@name='io.netty.channel']"/>
</metadata>

S4. Build it.

Then the generator crashes...

From the test, it is adding of line <remove-node path="/api/package[@name='io.netty.channel']"/>
casuing the crashes.


Can anyone help to take a look ? Or help to build this jar ? (It would be very much grateful)

Thanks

**More question: **

1.Will this affect the library's functionality when we would need to remove-node to walk-around the error when building the jar?


2.Any official guide line regarding resolving the errors seen when building Java Binding Solution ?


Thanks again.
Comment 2 Atsushi Eno 2015-11-06 06:50:27 UTC
Selendroid is for Desktop, not design to run *from inside* Android framework i.e. you could write your tests that manipulates Android targets via ADB *using* Selendroid *from desktop*, not to embed in mobile app.

Those packages clearly tells that: com.android.ddmlib, com.sun.jna.* (especially com.sun.jna.platform0.win32.COM.tlb.imp - COM never runs on Android).
Comment 3 13725522378 2015-11-11 21:05:59 UTC
Thank you so much!! I will read through the doc next time.