Better error handling

Some small trys to fix gstreamer debug not running in win xp
This commit is contained in:
Flamefire committed 2013-04-29 01:53:40 +02:00
1 parent 7a2450782c
commit cf0fd9dbed
4 files changed
+18 -15

No files matched your search

+5 -4
View File
@@ -67,11 +67,12 @@
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>
</LinkIncremental>
<OutDir>bin\$(Configuration).$(Platform)\</OutDir> <OutDir>bin\$(Configuration).$(Platform)\</OutDir>
<IncludePath>$(MSBuildProjectDirectory)\x86\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x86\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x86\include\glib-2.0;$(MSBuildProjectDirectory)\x86\include;$(IncludePath)</IncludePath> <IncludePath>$(MSBuildProjectDirectory)\x86\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x86\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x86\include\glib-2.0;$(MSBuildProjectDirectory)\x86\include;$(IncludePath)</IncludePath>
<LibraryPath>$(MSBuildProjectDirectory)\x86\lib;$(LibraryPath)</LibraryPath> <LibraryPath>$(MSBuildProjectDirectory)\x86\lib;$(LibraryPath)</LibraryPath>
<GenerateManifest>false</GenerateManifest> <GenerateManifest>true</GenerateManifest>
<IntDir>obj\$(Configuration).$(Platform)\</IntDir> <IntDir>obj\$(Configuration).$(Platform)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugWin|x64'">
@@ -152,7 +153,7 @@
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -179,7 +180,7 @@
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>gstreamer-1.0.lib;gstcontroller-1.0.lib;gobject-2.0.lib;glib-2.0.lib;gstapp-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
+2 -2
View File
@@ -26,10 +26,10 @@ namespace Vocaluxe.Lib.Sound
class CGstreamerAudio : IPlayback class CGstreamerAudio : IPlayback
{ {
//static float LastPosition; //static float LastPosition;
private CGstreamerAudioWrapper.LogCallback _LogCallback; private readonly CGstreamerAudioWrapper.LogCallback _LogCallback;
#region log #region log
private void _LogHandler(string text) private static void _LogHandler(string text)
{ {
CLog.LogError(text); CLog.LogError(text);
} }
+4 -2
View File
@@ -202,9 +202,9 @@ namespace Vocaluxe
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show("Error on start up: " + e.Message + e.StackTrace); MessageBox.Show("Error on start up: " + e.Message + e.StackTrace);
CLog.LogError("Error on start up: " + e.Message + e.StackTrace); CLog.LogError("Error on start up: " + e);
_SplashScreen.Close();
_CloseProgram(); _CloseProgram();
Environment.Exit(Environment.ExitCode);
} }
Application.DoEvents(); Application.DoEvents();
@@ -229,6 +229,7 @@ namespace Vocaluxe
CWebcam.Close(); CWebcam.Close();
} }
catch (Exception) {} catch (Exception) {}
Environment.Exit(Environment.ExitCode);
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
@@ -243,6 +244,7 @@ namespace Vocaluxe
catch {} catch {}
MessageBox.Show("Unhandled exception: " + e.Message + stackTrace); MessageBox.Show("Unhandled exception: " + e.Message + stackTrace);
CLog.LogError("Unhandled exception: " + e.Message + stackTrace); CLog.LogError("Unhandled exception: " + e.Message + stackTrace);
_CloseProgram();
} }
private static Assembly _AssemblyResolver(Object sender, ResolveEventArgs args) private static Assembly _AssemblyResolver(Object sender, ResolveEventArgs args)
+7 -7
View File
@@ -29,7 +29,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
@@ -41,7 +41,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants> <DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -52,7 +52,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
@@ -64,7 +64,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants> <DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -74,7 +74,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
@@ -86,7 +86,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants> <DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -96,7 +96,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType> <DebugType>none</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\Output\</OutputPath> <OutputPath>bin\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>