mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Browser crash message, mutual friends message
This commit is contained in:
@@ -69,28 +69,17 @@ namespace VRCX
|
|||||||
public void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status,
|
public void OnRenderProcessTerminated(IWebBrowser chromiumWebBrowser, IBrowser browser, CefTerminationStatus status,
|
||||||
int errorCode, string errorMessage)
|
int errorCode, string errorMessage)
|
||||||
{
|
{
|
||||||
switch (status)
|
var message = status switch
|
||||||
{
|
{
|
||||||
case CefTerminationStatus.AbnormalTermination:
|
CefTerminationStatus.AbnormalTermination => "Browser terminated abnormally.",
|
||||||
_logger.Error("Browser terminated abnormally.");
|
CefTerminationStatus.ProcessWasKilled => "Browser was killed.",
|
||||||
break;
|
CefTerminationStatus.ProcessCrashed => "Browser crashed.",
|
||||||
|
CefTerminationStatus.OutOfMemory => "Browser out of memory.",
|
||||||
case CefTerminationStatus.ProcessWasKilled:
|
_ => $"Browser terminated with unhandled status code '{status}'"
|
||||||
_logger.Error("Browser was killed.");
|
};
|
||||||
break;
|
_logger.Error("Render process terminated: {Message} ErrorCode: {ErrorCode} ErrorMessage: {ErrorMessage}",
|
||||||
|
message, errorCode, errorMessage);
|
||||||
case CefTerminationStatus.ProcessCrashed:
|
StartupArgs.LaunchArguments.LaunchCommand = $"crash/{message}";
|
||||||
_logger.Error("Browser crashed.");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CefTerminationStatus.OutOfMemory:
|
|
||||||
_logger.Error("Browser out of memory.");
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
_logger.Error($"Browser terminated with unhandled status '{status}' while at address.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (chromiumWebBrowser.IsDisposed || chromiumWebBrowser.IsLoading)
|
if (chromiumWebBrowser.IsDisposed || chromiumWebBrowser.IsLoading)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Generated
+16
-7
@@ -43,6 +43,7 @@ namespace VRCX
|
|||||||
this.TrayMenu = new ContextMenuStrip(this.components);
|
this.TrayMenu = new ContextMenuStrip(this.components);
|
||||||
this.TrayMenu_Open = new ToolStripMenuItem();
|
this.TrayMenu_Open = new ToolStripMenuItem();
|
||||||
this.TrayMenu_DevTools = new ToolStripMenuItem();
|
this.TrayMenu_DevTools = new ToolStripMenuItem();
|
||||||
|
this.TrayMenu_ForceCrash = new ToolStripMenuItem();
|
||||||
this.TrayMenu_Separator = new ToolStripSeparator();
|
this.TrayMenu_Separator = new ToolStripSeparator();
|
||||||
this.TrayMenu_Quit = new ToolStripMenuItem();
|
this.TrayMenu_Quit = new ToolStripMenuItem();
|
||||||
this.TrayIcon = new NotifyIcon(this.components);
|
this.TrayIcon = new NotifyIcon(this.components);
|
||||||
@@ -53,13 +54,13 @@ namespace VRCX
|
|||||||
//
|
//
|
||||||
// TrayMenu
|
// TrayMenu
|
||||||
//
|
//
|
||||||
this.TrayMenu.Items.AddRange(new ToolStripItem[]
|
this.TrayMenu.Items.Add(this.TrayMenu_Open);
|
||||||
{
|
this.TrayMenu.Items.Add(this.TrayMenu_DevTools);
|
||||||
this.TrayMenu_Open,
|
if (Program.LaunchDebug)
|
||||||
this.TrayMenu_DevTools,
|
this.TrayMenu.Items.Add(this.TrayMenu_ForceCrash);
|
||||||
this.TrayMenu_Separator,
|
this.TrayMenu.Items.Add(this.TrayMenu_Separator);
|
||||||
this.TrayMenu_Quit
|
this.TrayMenu.Items.Add(this.TrayMenu_Quit);
|
||||||
});
|
|
||||||
this.TrayMenu.Name = "TrayMenu";
|
this.TrayMenu.Name = "TrayMenu";
|
||||||
this.TrayMenu.Size = new Size(132, 54);
|
this.TrayMenu.Size = new Size(132, 54);
|
||||||
//
|
//
|
||||||
@@ -77,6 +78,13 @@ namespace VRCX
|
|||||||
this.TrayMenu_DevTools.Text = "DevTools";
|
this.TrayMenu_DevTools.Text = "DevTools";
|
||||||
this.TrayMenu_DevTools.Click += new EventHandler(this.TrayMenu_DevTools_Click);
|
this.TrayMenu_DevTools.Click += new EventHandler(this.TrayMenu_DevTools_Click);
|
||||||
//
|
//
|
||||||
|
// TrayMenu_ForceCrash
|
||||||
|
//
|
||||||
|
this.TrayMenu_ForceCrash.Name = "TrayMenu_ForceCrash";
|
||||||
|
this.TrayMenu_ForceCrash.Size = new Size(131, 22);
|
||||||
|
this.TrayMenu_ForceCrash.Text = "Force Crash";
|
||||||
|
this.TrayMenu_ForceCrash.Click += new EventHandler(this.TrayMenu_ForceCrash_Click);
|
||||||
|
//
|
||||||
// TrayMenu_Separator
|
// TrayMenu_Separator
|
||||||
//
|
//
|
||||||
this.TrayMenu_Separator.Name = "TrayMenu_Separator";
|
this.TrayMenu_Separator.Name = "TrayMenu_Separator";
|
||||||
@@ -119,6 +127,7 @@ namespace VRCX
|
|||||||
private ContextMenuStrip TrayMenu;
|
private ContextMenuStrip TrayMenu;
|
||||||
private ToolStripMenuItem TrayMenu_Open;
|
private ToolStripMenuItem TrayMenu_Open;
|
||||||
private ToolStripMenuItem TrayMenu_DevTools;
|
private ToolStripMenuItem TrayMenu_DevTools;
|
||||||
|
private ToolStripMenuItem TrayMenu_ForceCrash;
|
||||||
private ToolStripSeparator TrayMenu_Separator;
|
private ToolStripSeparator TrayMenu_Separator;
|
||||||
private ToolStripMenuItem TrayMenu_Quit;
|
private ToolStripMenuItem TrayMenu_Quit;
|
||||||
private NotifyIcon TrayIcon;
|
private NotifyIcon TrayIcon;
|
||||||
|
|||||||
@@ -243,6 +243,11 @@ namespace VRCX
|
|||||||
{
|
{
|
||||||
Instance.Browser.ShowDevTools();
|
Instance.Browser.ShowDevTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TrayMenu_ForceCrash_Click(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
Instance.Browser.LoadUrl("chrome://crash");
|
||||||
|
}
|
||||||
|
|
||||||
private void TrayMenu_Quit_Click(object sender, System.EventArgs e)
|
private void TrayMenu_Quit_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -584,6 +584,20 @@
|
|||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="mutualFriendsError"
|
||||||
|
@click="openExternalLink('https://docs.vrchat.com/docs/vrchat-202542#mutuals')"
|
||||||
|
style="
|
||||||
|
margin-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #f56c6c;
|
||||||
|
cursor: pointer;
|
||||||
|
">
|
||||||
|
<el-icon style="margin-right: 5px"><Warning /></el-icon>
|
||||||
|
<span>Mutual Friends unavailable due to VRChat staged rollout, click for more info</span>
|
||||||
|
</div>
|
||||||
<ul
|
<ul
|
||||||
class="x-friend-list"
|
class="x-friend-list"
|
||||||
style="margin-top: 10px; overflow: auto; max-height: 250px; min-width: 130px">
|
style="margin-top: 10px; overflow: auto; max-height: 250px; min-width: 130px">
|
||||||
@@ -1536,6 +1550,7 @@
|
|||||||
|
|
||||||
const isEditNoteAndMemoDialogVisible = ref(false);
|
const isEditNoteAndMemoDialogVisible = ref(false);
|
||||||
const vrchatCredit = ref(null);
|
const vrchatCredit = ref(null);
|
||||||
|
const mutualFriendsError = ref(false);
|
||||||
|
|
||||||
const userDialogAvatars = computed(() => {
|
const userDialogAvatars = computed(() => {
|
||||||
const { avatars, avatarReleaseStatus } = userDialog.value;
|
const { avatars, avatarReleaseStatus } = userDialog.value;
|
||||||
@@ -2222,6 +2237,7 @@
|
|||||||
const mutualIds = userDialog.value.mutualFriends.map((u) => u.id);
|
const mutualIds = userDialog.value.mutualFriends.map((u) => u.id);
|
||||||
database.updateMutualsForFriend(userId, mutualIds);
|
database.updateMutualsForFriend(userId, mutualIds);
|
||||||
}
|
}
|
||||||
|
mutualFriendsError.value = !success;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1964,6 +1964,9 @@
|
|||||||
"screenshot_metadata": {
|
"screenshot_metadata": {
|
||||||
"deleted": "Screenshot metadata deleted",
|
"deleted": "Screenshot metadata deleted",
|
||||||
"delete_failed": "Failed to delete screenshot metadata"
|
"delete_failed": "Failed to delete screenshot metadata"
|
||||||
|
},
|
||||||
|
"crash": {
|
||||||
|
"vrcx_crash": "VRCX has recovered from a crash."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"prompt": {
|
"prompt": {
|
||||||
|
|||||||
+13
-2
@@ -525,11 +525,22 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
|||||||
|
|
||||||
async function startupLaunchCommand() {
|
async function startupLaunchCommand() {
|
||||||
const command = await AppApi.GetLaunchCommand();
|
const command = await AppApi.GetLaunchCommand();
|
||||||
if (command) {
|
if (!command) {
|
||||||
eventLaunchCommand(command);
|
return;
|
||||||
}
|
}
|
||||||
|
if (command.startsWith('crash/')) {
|
||||||
|
const crashMessage = command.replace('crash/', '');
|
||||||
|
console.error('VRCX recovered from crash:', crashMessage);
|
||||||
|
ElMessageBox.alert(
|
||||||
|
crashMessage,
|
||||||
|
t('message.crash.vrcx_crash')
|
||||||
|
).catch(() => {});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eventLaunchCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// called from C#
|
||||||
function eventLaunchCommand(input) {
|
function eventLaunchCommand(input) {
|
||||||
if (!watchState.isLoggedIn) {
|
if (!watchState.isLoggedIn) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user