Bug 43071 - Suggested method overload leads to a SIGSEGV
Summary: Suggested method overload leads to a SIGSEGV
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 9.8 (tvOS / C7)
Hardware: PC Windows
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-04 22:17 UTC by Cody Beyer (MSFT)
Modified: 2016-10-23 22:51 UTC (History)
3 users (show)

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


Attachments
Sample (2.82 MB, application/x-zip-compressed)
2016-08-04 22:17 UTC, Cody Beyer (MSFT)
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 NORESPONSE

Description Cody Beyer (MSFT) 2016-08-04 22:17:02 UTC
Created attachment 16907 [details]
Sample

# Description

The following sample demonstrates an issue with VTCompressionSession, where the obsoleted method overload works, however the suggested replacement results in a SIGSEGV

For running the app, you can change the method at lines 133-134 of AppDelegate.cs

Working:

>VTCompressionSession compressionSession = VTCompressionSession.Create(width, height,
CMVideoCodecType.JPEG, CompressionOutputCallback, null, attributes.Dictionary);

Failing:

>VTCompressionSession compressionSession = VTCompressionSession.Create(width, height,
 CMVideoCodecType.JPEG, CompressionOutputCallback, null, attributes);

# Sample

Attached

# Steps to Reproduce

	1. Download sample
	2. Deploy to device

# Expected Results

App should run

# Actual Results

SIGSEGV thrown

# Versions

Microsoft Visual Studio Professional 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Professional

LightSwitch for Visual Studio 2015   00322-40000-00000-AA599
Microsoft LightSwitch for Visual Studio 2015

Visual Basic 2015   00322-40000-00000-AA599
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA599
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA599
Microsoft Visual C++ 2015

Visual F# 2015   00322-40000-00000-AA599
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA599
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.0.20622.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.1.2.18 (fcbe082)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.1.2.21 (1cf254d)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   9.8.2.22 (f37444a)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Cody Beyer (MSFT) 2016-08-04 22:20:23 UTC
Eek, to clean up the code in my original comment:

Working:

>VTCompressionSession compressionSession = VTCompressionSession.Create(width, >height, CMVideoCodecType.JPEG, CompressionOutputCallback, null, >attributes.Dictionary);

Failing:

>VTCompressionSession compressionSession = VTCompressionSession.Create(width, >height, CMVideoCodecType.JPEG, CompressionOutputCallback, null, >attributes);//.Dictionary);
Comment 2 Manuel de la Peña [MSFT] 2016-09-15 11:30:34 UTC
Hello,

When trying to reproduce the bug I get the following exception:

Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/DF4A4971-8FCD-423C-8362-21C5B18AA374/data/Containers/Bundle/Application/4573DB09-990E-45B2-BF16-C70217A57278/avcaptureframes.app/Xamarin.iOS.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/DF4A4971-8FCD-423C-8362-21C5B18AA374/data/Containers/Bundle/Application/4573DB09-990E-45B2-BF16-C70217A57278/avcaptureframes.app/System.dll [External]
Thread started:  #2
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/DF4A4971-8FCD-423C-8362-21C5B18AA374/data/Containers/Bundle/Application/4573DB09-990E-45B2-BF16-C70217A57278/avcaptureframes.app/avcaptureframes.exe
2016-09-15 13:28:18.689 avcaptureframes[8367:20355683] critical: Stacktrace:

2016-09-15 13:28:18.689 avcaptureframes[8367:20355683] critical:   at <unknown> <0xffffffff>
2016-09-15 13:28:18.690 avcaptureframes[8367:20355683] critical:   at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (intptr,intptr,intptr) <0x00012>
2016-09-15 13:28:18.691 avcaptureframes[8367:20355683] critical:   at AVFoundation.AVCaptureSession.set_SessionPreset (Foundation.NSString) [0x00022] in /Users/mandel/Xamarin/maccore-master/xamarin-macios/src/build/ios/native/AVFoundation/AVCaptureSession.g.cs:418
2016-09-15 13:28:18.691 avcaptureframes[8367:20355683] critical:   at avcaptureframes.AppDelegate.SetupCaptureSession () [0x0000e] in /Users/mandel/Downloads/364440/AppDelegate.cs:48
2016-09-15 13:28:18.691 avcaptureframes[8367:20355683] critical:   at avcaptureframes.AppDelegate.FinishedLaunching (UIKit.UIApplication,Foundation.NSDictionary) [0x00075] in /Users/mandel/Downloads/364440/AppDelegate.cs:35
2016-09-15 13:28:18.691 avcaptureframes[8367:20355683] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_bool__this___object_object (object,intptr,intptr,intptr) <IL 0x00061, 0x00237>
2016-09-15 13:28:18.691 avcaptureframes[8367:20355683] critical:   at <unknown> <0xffffffff>
2016-09-15 13:28:18.692 avcaptureframes[8367:20355683] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00015>
2016-09-15 13:28:18.692 avcaptureframes[8367:20355683] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/mandel/Xamarin/maccore-master/xamarin-macios/src/UIKit/UIApplication.cs:79
2016-09-15 13:28:18.692 avcaptureframes[8367:20355683] critical:   at UIKit.UIApplication.Main (string[]) [0x00000] in /Users/mandel/Xamarin/maccore-master/xamarin-macios/src/UIKit/UIApplication.cs:73
2016-09-15 13:28:18.692 avcaptureframes[8367:20355683] critical:   at avcaptureframes.Application.Main (string[]) [0x00002] in /Users/mandel/Downloads/364440/Main.cs:7
2016-09-15 13:28:18.693 avcaptureframes[8367:20355683] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00051, 0x001d2>
2016-09-15 13:28:18.693 avcaptureframes[8367:20355683] critical: 
Native stacktrace:

2016-09-15 13:28:18.693 avcaptureframes[8367:20355683] critical: 
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================




Can you please double check that the project works as expected.
Comment 3 Alex Soto [MSFT] 2016-10-23 22:51:27 UTC
We have not received the requested information. If you are still 
experiencing this issue please provide all the requested information 
and re-open the bug report. Thanks!