mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Handle vkCreateInstance NCNN/VK error
This commit is contained in:
@@ -68,7 +68,6 @@ namespace Flowframes
|
||||
{
|
||||
try
|
||||
{
|
||||
//await Task.Delay(100);
|
||||
Task.Run(() => Updater.UpdateModelList());
|
||||
Task.Run(() => Updater.AsyncUpdateCheck());
|
||||
Task.Run(() => GetWebInfo.LoadNews(newsLabel));
|
||||
|
||||
@@ -478,6 +478,12 @@ namespace Flowframes
|
||||
InterpolateUtils.ShowMessage($"Vulkan ran out of memory!\n\n{line}{msg}", "Error");
|
||||
}
|
||||
|
||||
if (!hasShownError && err && line.Contains("vkCreateInstance failed"))
|
||||
{
|
||||
hasShownError = true;
|
||||
InterpolateUtils.ShowMessage($"Vulkan failed to start up!\n\n{line}\n\nThis most likely means your GPU is not compatible.", "Error");
|
||||
}
|
||||
|
||||
if (!hasShownError && err && line.Contains("invalid gpu device"))
|
||||
{
|
||||
hasShownError = true;
|
||||
|
||||
@@ -36,13 +36,8 @@ namespace Flowframes
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
// Add the event handler for handling UI thread exceptions to the event.
|
||||
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
|
||||
|
||||
// Set the unhandled exception mode to force all Windows Forms errors to go through our handler.
|
||||
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
||||
|
||||
// Add the event handler for handling non-UI thread exceptions to the event.
|
||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
|
||||
mainForm = new Form1();
|
||||
|
||||
Reference in New Issue
Block a user