Bug 2666 - Events not firing in every other Release build
Summary: Events not firing in every other Release build
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-12-28 12:34 UTC by ben.chester.bugzilla
Modified: 2013-12-05 18:36 UTC (History)
2 users (show)

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:

Description ben.chester.bugzilla 2011-12-28 12:34:16 UTC
I fire all of my events through the following extension method:

public static void FireIfNecessary<TEventArgs>(this EventHandler<TEventArgs> eventHandler, object sender, TEventArgs e)
			where TEventArgs : EventArgs
			if (eventHandler != null)
				//UIAlertView alert = new UIAlertView("Firing Event", "An event is being fired.", null, "Ok");
				eventHandler(sender, e);

The purpose of the commented out code will become clear.

When I perform a Release or Ad Hoc build for devices (i.e. not the simulator), both of which enable optimisations, no events that use this extension method are fired. Fortunately there is a simple but bizarre solution - when I uncomment the alert view code, the events all begin firing again, albeit in a very noisy manner with alert views popping up all over the place. When I subsequently comment out the alert view code, the next build works as expected, despite the fact that the code is exactly the same as the builds in which the events do not fire.

This is a little frustrating because I have to do every Release and Ad Hoc build twice, but my main concern is that I might inadvertently submit something to the app store in which none of the events fire.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-01-03 12:36:10 UTC
Do you have a complete sample I can try out to see this behaviour?
Comment 2 PJ 2013-11-19 17:06:04 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 3 PJ 2013-12-05 18:36:33 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.