mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
Some memory fixes
This commit is contained in:
@@ -10,6 +10,7 @@ using System;
|
|||||||
using System.Data.SQLite;
|
using System.Data.SQLite;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@@ -189,6 +190,20 @@ namespace VRCX
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Handle Out Of Memory
|
||||||
|
|
||||||
|
catch (SEHException e)
|
||||||
|
{
|
||||||
|
logger.Fatal(e, "Unhandled SEH Exception, most likely out of memory, closing.");
|
||||||
|
var messageBoxResult = MessageBox.Show(
|
||||||
|
"VRCX has run out of memory and needs to close.\n" +
|
||||||
|
"We're actively working on fixing this issue. \n" +
|
||||||
|
e, "Out of Memory", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
var cpuError = WinApi.GetCpuErrorMessage();
|
var cpuError = WinApi.GetCpuErrorMessage();
|
||||||
|
|||||||
+9
-3
@@ -522,17 +522,23 @@ namespace VRCX
|
|||||||
await streamReader.ReadToEndAsync()
|
await streamReader.ReadToEndAsync()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var message = webException.Message;
|
||||||
|
if (webException.InnerException != null)
|
||||||
|
message += $" | Inner Exception: {webException.InnerException.Message}";
|
||||||
return new Tuple<int, string>(
|
return new Tuple<int, string>(
|
||||||
-1,
|
-1,
|
||||||
webException.Message
|
message
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
var message = e.Message;
|
||||||
|
if (e.InnerException != null)
|
||||||
|
message += $" | Inner Exception: {e.InnerException.Message}";
|
||||||
return new Tuple<int, string>(
|
return new Tuple<int, string>(
|
||||||
-1,
|
-1,
|
||||||
e.Message
|
message
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="data-table-wrapper">
|
<div class="data-table-wrapper">
|
||||||
<el-table
|
<el-table
|
||||||
ref="tableRef"
|
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="paginatedData"
|
:data="paginatedData"
|
||||||
v-bind="mergedTableProps"
|
v-bind="mergedTableProps"
|
||||||
|
|||||||
@@ -258,6 +258,10 @@
|
|||||||
resizeObserver.value.disconnect();
|
resizeObserver.value.disconnect();
|
||||||
resizeObserver.value = null;
|
resizeObserver.value = null;
|
||||||
}
|
}
|
||||||
|
if (echartsInstance.value) {
|
||||||
|
echartsInstance.value.dispose();
|
||||||
|
echartsInstance.value = null;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
reloadData = async function () {
|
reloadData = async function () {
|
||||||
|
|||||||
@@ -95,6 +95,10 @@
|
|||||||
resizeObserver.value.disconnect();
|
resizeObserver.value.disconnect();
|
||||||
resizeObserver.value = null;
|
resizeObserver.value = null;
|
||||||
}
|
}
|
||||||
|
if (echartsInstance.value) {
|
||||||
|
echartsInstance.value.dispose();
|
||||||
|
echartsInstance.value = null;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function initResizeObserver() {
|
function initResizeObserver() {
|
||||||
|
|||||||
Reference in New Issue
Block a user