Bug 2609 - Duplicate ACW ctors generated
Summary: Duplicate ACW ctors generated
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-12-22 05:07 UTC by Piotr Kryger
Modified: 2012-01-02 16:23 UTC (History)
3 users (show)

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


Attachments
Sample project reproducing the problem (16.85 KB, application/zip)
2011-12-22 05:07 UTC, Piotr Kryger
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:
RESOLVED FIXED

Description Piotr Kryger 2011-12-22 05:07:06 UTC
Created attachment 1077 [details]
Sample project reproducing the problem

When I try to deploy attached project to device, packaging fails with error:
"D:\misc\M4ABugRepro\M4ABugRepro\M4ABugRepro.csproj" (SignAndroidPackage target) (1) ->
(_CompileJava target) -> 
  obj\Release\android\src\m4abugrepro\TestFilter.java(28,9): error :  TestFilter(m4abugrepro.AbstractAdapter_1) is already defined in m4abugrepro.TestFilter [D:\misc\M4ABugRepro\M4ABugRepro\M4ABugRepro.csproj]
obj\Release\android\src\m4abugrepro\TestFilter.java(28,9): error : 	public TestFilter (m4abugrepro.AbstractAdapter_1 p0) [D:\misc\M4ABugRepro\M4ABugRepro\M4ABugRepro.csproj]
obj\Release\android\src\m4abugrepro\TestFilter.java(28,9): error :  [D:\misc\M4ABugRepro\M4ABugRepro\M4ABugRepro.csproj]

Bug is reproducable always on Mono for Android 4.0.1 running on Windows and Visual Studio 2010. It works with m4A 4.0.

Steps to reproduce:
1. Open attached project.
2. Try to deploy to the device.
Comment 1 Jonathan Pryor 2011-12-22 10:21:44 UTC
The problem is M4ABugRepro.TestFIlter. The ACW contains:

	public TestFilter (m4abugrepro.AbstractAdapter_1 p0) {...}

	public TestFilter (m4abugrepro.AbstractAdapter_1 p0) {...}

Oops.

It looks like the logic of "generate all base constructors, then generate current constructors" doesn't check to see if the current ctor was already generated in the base case.
Comment 2 Jonathan Pryor 2012-01-02 16:23:25 UTC
Fixed in commit a3d0015f.