XuanchenLin/NanUI

[BUG]运行报错: System.Runtime.InteropServices.SEHException

Closed this issue · 5 comments

BUG描述 / Describe the bug
运行报错: System.Runtime.InteropServices.SEHException
BUG如何产生的 / To Reproduce:
在长时间操作中,如果内存持续增长,1G左右,直接报错并白屏。
程序是以32位模式运行,64位时会好点
截图 / Screenshots
If applicable, add screenshots to help explain your problem.

系统环境 / Desktop :

  • OS: Windows 7 64位 8G

异常信息 / Thrown Excpetion:
Exception Info: System.Runtime.InteropServices.SEHException
at Xilium.CefGlue.Interop.libcef.execute_process(Xilium.CefGlue.Interop.cef_main_args_t*, Xilium.CefGlue.Interop.cef_app_t*, Void*)
at Xilium.CefGlue.CefRuntime.ExecuteProcess(Xilium.CefGlue.CefMainArgs, Xilium.CefGlue.CefApp, IntPtr)
at NetDimension.NanUI.RuntimeContext.Initialize()
at NetDimension.NanUI.RuntimeContext.Run()
at NetDimension.NanUI.WinFormium.Run()
at Sorftime.Applications.Host.Program.Main()

https://blog.csdn.net/HowcanIdo/article/details/1399658

找到篇文章,如果这个问题如上面文章里提到的是由于 Application.EnableVisualStyles() 引发的,那么建议把 Main 函数里前面的几行代码(包括 Application.EnableVisualStyles())移动到 NanUI 启动构造器的 UseMainWindow 函数里。

https://github.com/NetDimension/NanUI/blob/master/src/Demo/FormiumClient/Program.cs#L85

我确认了下, Application.EnableVisualStyles() 方法调用是放在NanUI 启动构造器的 UseMainWindow 函数里的。从用户那里获取到了一些日志:
ERROR:network_service_instance_impl.cc(330)] Network service crashed, restarting service.

客户机是否使用了代理或者VPN什么的,正常情况不应该出现网络服务子进程崩溃的问题。

未使用VPN,异常时内存大于1.6G。客户机器内存:16G,有没有办法主动释放壳子的JS内存,VUE开发的SPA程序

缺少更相信的信息,无法复现此bug