CefSharp.WinForms Error (GPU process exited unexpectedly: exit_code=-532462766) - cefsharp

I'm getting CefSharp setup for the first time. I've installed the NuGet CefSharp.WinForms version 99.2.90. I've ran it in both build x64 and x86. x64 threw a DLL error which shows me it should be built in x86.
I've tried quite a few different methods I've found online but simply starting CefSharp throws an error.
running chromeBrowser = new ChromiumWebBrowser("www.google.com"); results in the below error:
[0315/133306.821:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=-532462766
[0315/133306.821:WARNING:gpu_process_host.cc(1277)] The GPU process has crashed 6 time(s)
[0315/133306.821:FATAL:gpu_data_manager_impl_private.cc(447)] GPU process isn't usable. Goodbye.
The program '[18264] CefSharp.exe' has exited with code 1073741855 (0x4000001f).
Form Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CefSharp.WinForms;
using CefSharp;
using System.Threading;
using System.IO;
using System.Diagnostics;
using CefSharp.DevTools.IO;
namespace TemarkNamespace
{
public partial class CefSharpController : Form
{
private ChromiumWebBrowser chromeBrowser;
public CefSharpController()
{
InitializeComponent();
chromeBrowser = new ChromiumWebBrowser("www.google.com");
}
private void FormClosed(object sender, FormClosedEventArgs e)
{
Cef.Shutdown();
}
}
}
Event Viewer error:
Application: CefSharp.BrowserSubprocess.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.BadImageFormatException
at CefSharp.BrowserSubprocess.Program.Main(System.String[])

I missed the instructions https://github.com/cefsharp/CefSharp/blob/cefsharp/99/NuGet/Readme.txt#L13
I created the app.manifest file and it worked great. Thanks for the help amaitland!

Related

The type or namespace for SQLiteConnection could not be found

I am trying to build a Xamarin form and came across this error while coding
"the type or namespace for SQLiteConnection could not be found".
I installed sqllite-new-pcl for this project and can see it under references tab.
I have added the following in the code but it is throwing error:
using SQLite;

libcurl error executing dotnet 2.0 console program in raspberry

I'm trying to execute a simple program in a Raspberry 2 (raspbian). Other little console projects work Ok, but this one shows this error:
dotnet: relocation error: /opt/dotnet/shared/Microsoft.NETCore.App/2.0.4/System.Net.Http.Native.so: symbol curl_multi_wait, version CURL_OPENSSL_3 not defined in file libcurl.so.4 with link time reference
I tried to install libcurl4-openssl-dev but that doesn't solve the problem. Any ideas?
Edit:
The program is using the WebClient class in the System.Net library, this one doesn't work either:
using System;
using System.Net;
namespace pruebahttpnet
{
class Program
{
static void Main(string[] args)
{
var cander = new WebClient().DownloadString(new Uri("https://gist.githubusercontent.com/febuiles/caec38b2bdf5768f4abf0677249d6901/raw/4426349bdb23018088e19db0dc22dcd4f3e1fee1/foo.txt"));
Console.WriteLine(cander);
}
}
}
The problem was that I installed dotnet for Jessie distribution and Raspbian was in Wheezy version:
deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main
I solved it upgrading Raspbian to jessie version to get libcurl >7.28 that has the curl_multi_wait function definition.

Xamarin Sqlite-pcl library problems

I try to make a app and work with sqlite-pcl and got the following error when my app starts;
DllImport attempting to load: 'e_sqlite3'.
DllImport error loading library '/storage/emulated/0/Android/data/appTecnicos.appTecnicos/files/.__override__/libe_sqlite3': 'dlopen failed: library "/data/app/appTecnicos.appTecnicos-1/lib/x86//storage/emulated/0/Android/data/appTecnicos.appTecnicos/files/.__override__/libe_sqlite3" not found'.
DllImport error loading library '/storage/emulated/0/Android/data/appTecnicos.appTecnicos/files/.__override__/libe_sqlite3.so': 'dlopen failed: library "/data/app/appTecnicos.appTecnicos-1/lib/x86//storage/emulated/0/Android/data/appTecnicos.appTecnicos/files/.__override__/libe_sqlite3.so" not found'.
DllImport error loading library '/system/lib/libe_sqlite3': 'dlopen failed: library "/data/app/appTecnicos.appTecnicos-1/lib/x86//system/lib/libe_sqlite3" not found'.
DllImport error loading library '/system/lib/libe_sqlite3.so': 'dlopen failed: library "/data/app/appTecnicos.appTecnicos-1/lib/x86//system/lib/libe_sqlite3.so" not found'.
DllImport error loading library 'libe_sqlite3': 'dlopen failed: library "/data/app/appTecnicos.appTecnicos-1/lib/x86/libe_sqlite3" not found'.
DllImport loaded library 'libe_sqlite3.so'.
DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
Searching for 'sqlite3_libversion_number'.
An unhandled exception occured.
I installed the nuget package in both solutions, portable and droid. I installed the Sqlite component in droid project.
I cleaned the build and recompiled but it returned the same error.
EDIT:
I found this on my Compiler debug;
Loaded assembly: /storage/emulated/0/Android/data/appTecnicos.appTecnicos/files/.__override__/SQLitePCLRaw.lib.e_sqlite3.dll
Its seems like the e_sqlite3.dll its already on the proyect.
Thanks in advance
The "DllImport error loading library '.../.override/libe_sqlite3'" message has been misleading to me as well. The debug output was just coinciding with the actual exception that froze my app.
For me, it was using a relative path in the new SQLiteConnection() -- which was working perfectly fine before with the UWP version. After I changed it to use an absolute path, it also worked on Android:
var dbpath = Path.Combine(System.Environment.GetFolderPath(
System.Environment.SpecialFolder.LocalApplicationData), "myData.sqlite");
db = new SQLiteConnection(dbpath, false);
I think that the package has not been correctly installed on your starting app. Remove sqlite-pcl, clean, rebuild & install it to your starting app and droid project. Also check your references to see if its really there.
I found my error. I got a class like;
public class StaticsValues
{
[...]
public static string FOLDERPATH;
public static string DBPATH;
public static BD.BDManager BDMANAGER = new BD.BDManager;
}
And the object BDManager start in the solution before my DROID project compiled. I change to:
public class StaticsValues
{
[...]
public static string FOLDERPATH;
public static string DBPATH;
public static BD.BDManager BDMANAGER ;
}
And start BD.Manager in App.cs and now works.

Can't add reference to System.ServiceProcess.dll

I am using System.ServiceProcess.dll in my ASP.NET application. I added a reference and intellisense recognizes it. But when I build an application, there is no System.ServiceProcess.dll in bin folder and application says it can't find a namespace. What may be wrong? Can I use this dll in IIS?
This is what I get:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'ServiceProcess' does not exist in the namespace 'System' (are you missing an assembly reference?)
Source Error:
Line 5: using System.Diagnostics;
Line 6: using System.Linq;
Line 7: using System.ServiceProcess;
Line 8: using System.Web;
Line 9: using System.Web.UI;
Add a reference in the process to System.ServiceProcess.dll.
To do this, in the solution window, right click on "References" and choose "Add Reference.." Go to the .NET tab, and double click on System.ServiceProcess.dll.
Most likely you added reference to the DLL of wrong .NET version. (so it exists, but when trying to actually compile, it's breaking)
When adding the reference, make sure the version match the version of your project:

Compilation error when running ASP.NET application

Getting this compile error when I debug the ASP.NET project. How do I add the reference properly?
Compilation Error
Description: An error occurred during
the compilation of a resource required
to service this request. Please review
the following specific error details
and modify your source code
appropriately.
Compiler Error Message: CS0246: The
type or namespace name 'BasePage'
could not be found (are you missing a
using directive or an assembly
reference?)
Source Error:
Line 8: namespace DisplayPage.UI
Line 9: { Line 10: public partial
class _Default : BasePage Line 11:
{ Line 12: protected void
Page_Load(object sender, EventArgs e)
I am using .NET 3.5 and vs 2008
what namespace is BasePage in?
I'm not quite sure how to make ASP.NET find classes from source files in the regular directory. I usually circumvent this problem by moving classes I want to access in that fashion into App_Code. Make sure you give it a namespace and import it.

Resources