Getting System.NullReferenceException during form initialization
During initializecomponent the IDE is throwing a nullreferenceexception from ffme.win.dll. The stacktrace shows some partial
information with "at Unosquare.FFME.Platform.GUIContext..ctor()
I have built a control using VB.NET and the control works in a much smaller test project just fine, but when I include the same control
and call it the same way in a larger project I am getting the above error.
I have wrapped InitializeComponent inside a try-catch, but it never falls into the catch while in the IDE. I can disable breaking for this error and things work correctly, but it seems dangerous do disable breaking for a nullreferenceexception as it disables it globally.
Oddly the compiled code runs fine so it has to be some environment setting that is outside of my knowledge...
Issue Categories
[x] Bug
[ ] Feature Request
[ ] Question
[ ] Not sure
Version Information
[X] NuGet Package 4.4.350
[ ] Build From Master branch, Commit Enter commit id. Example: 704c482
[ ] Build from Branch Name, Commit Enter commit id. Example: 704c482
Public Sub New()
Try
' This call is required by the designer.
InitializeComponent() '<-Systemnullreferenceexception in ffme.win.dll
Catch ex As Exception
MsgBox(ex.Message) '<-never gets here
End Try
End Sub
Getting System.NullReferenceException during form initialization
During initializecomponent the IDE is throwing a nullreferenceexception from ffme.win.dll. The stacktrace shows some partial information with "at Unosquare.FFME.Platform.GUIContext..ctor() I have built a control using VB.NET and the control works in a much smaller test project just fine, but when I include the same control and call it the same way in a larger project I am getting the above error. I have wrapped InitializeComponent inside a try-catch, but it never falls into the catch while in the IDE. I can disable breaking for this error and things work correctly, but it seems dangerous do disable breaking for a nullreferenceexception as it disables it globally. Oddly the compiled code runs fine so it has to be some environment setting that is outside of my knowledge...
Issue Categories
Version Information
Sample Code
XAML
'<UserControl x:Name="BolinWPFPTZWindow1" x:Class="BolinWPFPTZWindow" ' xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" ' xmlns:ffme="clr-namespace:Unosquare.FFME;assembly=ffme.win" ' xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ' xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" ' xmlns:d="http://schemas.microsoft.com/expression/blend/2008" ' xmlns:local="clr-namespace:Videstra" ' mc:Ignorable="d" ' d:DesignHeight="450" d:DesignWidth="800" Loaded="BolinWPFWindow_Loaded"> '
' <Canvas x:Name="GlassCanvas" HorizontalAlignment="Left" Height="450" Margin="-5,-5,0,-5" VerticalAlignment="Top" 'Width="800">
' <ffme:MediaElement x:Name="Media" Background="Gray" LoadedBehavior="Play" UnloadedBehavior="Manual" 'Height="450" Width="800" />
'
'
'
vb
Command line ffplay