Bug 12411 - Getting exception for sample "StillMotion"
Summary: Getting exception for sample "StillMotion"
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Samples ()
Version: 1.2.x
Hardware: PC Mac OS
: High major
Target Milestone: 1.4.x
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-05-27 10:24 UTC by Nischal
Modified: 2013-05-28 14:16 UTC (History)
4 users (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:
VERIFIED FIXED

Description Nischal 2013-05-27 10:24:05 UTC
Steps to reproduce:
1. Open sample "StillMotion".
2. Debug/run the application.

Actual result: When user debug or run the application application launched and crashed throwing exception "System.NullReferenceException".

Expected Result: Application should launch successfully.

Supplement info:
https://gist.github.com/atin360/ca414829a21600ea3948

Environment details:
X.S 4.0.8(build 2)
Mono 2.10.12
Xamarin.Mac 1.3.55

Regression Status:
Regression: This is not happening with Xamarin.Mac 1.2.43
Comment 1 Aaron Bockover [MSFT] 2013-05-28 12:30:19 UTC
This is not a regression in Xamarin.Mac, rather you are running the sample in two different environments. The environment you ran against Xamarin.Mac 1.2.43 had a camera/capture device available to it. The environment you ran 1.3.55 in did not.

I've fixed the sample to not crash when there's no camera available, but you are testing in two different environments (one in a VM one on metal?).
Comment 2 Saurabh 2013-05-28 13:57:14 UTC
We have checked this issue with Xam.Mac 1.4.0

When we run the application on the machine without having Camera, it throws exception.

However, on the machine having camera it is working fine.

Build info:
ML and Lion
Xam.Mac 1.4.0
XS 4.0.8(Build 2)
Mono 2.10.12
Comment 3 PJ 2013-05-28 13:58:23 UTC
It's fixed in the xammac-1.4 branch of mac-samples.
Comment 4 Saurabh 2013-05-28 14:15:52 UTC
We have checked this issue with 
mac-samples-xammac-1.4 branch -466e98303f84f2a5c1e0b4537366997e94d020f0

When we run the application on the machine without having Camera, it displays a message 'You dont have a camera connected' and does not throw any exception.

Build info:
ML and Lion
Xam.Mac 1.4.0
XS 4.0.8(Build 2)
Mono 2.10.12

Hence, closing this issue.