pangao1990 / PPX

基于Python和JavaScript,一键生成macOS、Windows和Linux平台客户端应用程序
https://blog.pangao.vip/docs-ppx/
GNU Affero General Public License v3.0
232 stars 39 forks source link

win10上面,启动以后直接关闭窗口,控制台 #32

Closed obrua closed 1 year ago

obrua commented 1 year ago

image

Bottle v0.12.25 server starting up (using ThreadedAdapter())... Listening on http://127.0.0.1:47712/ Hit Ctrl-C to quit.

C:\Program Files\Python39\lib\tempfile.py:821: ResourceWarning: Implicitly cleaning up <TemporaryDirectory 'C:\Users\cy\AppData\Local\Temp\tmph1r85bq5'> _warnings.warn(warn_message, ResourceWarning) 2023-11-17 17:22:57,241 INFO sqlalchemy.engine.Engine BEGIN (implicit) 2023-11-17 17:22:57,242 INFO sqlalchemy.engine.Engine SELECT version_num FROM alembic_version 2023-11-17 17:22:57,242 INFO sqlalchemy.engine.Engine [generated in 0.00025s] () 2023-11-17 17:22:57,243 INFO sqlalchemy.engine.Engine COMMIT [nodemon] watching 5104 files Windows fatal exception: access violation

Thread 0x0006fd94 (most recent call first): File "C:\Program Files\Python39\lib\selectors.py", line 315 in _select File "C:\Program Files\Python39\lib\selectors.py", line 324 in select File "C:\Program Files\Python39\lib\socketserver.py", line 232 in serve_forever File "D:\code\github\PPX\pyapp\pyenv\pyenv\lib\site-packages\webview\http.py", line 73 in run File "D:\code\github\PPX\pyapp\pyenv\pyenv\lib\site-packages\bottle.py", line 3175 in run File "D:\code\github\PPX\pyapp\pyenv\pyenv\lib\site-packages\webview\http.py", line 141 in File "C:\Program Files\Python39\lib\threading.py", line 917 in run File "C:\Program Files\Python39\lib\threading.py", line 980 in _bootstrap_inner File "C:\Program Files\Python39\lib\threading.py", line 937 in _bootstrap

Current thread 0x000709e8 (most recent call first): File "D:\code\github\PPX\pyapp\pyenv\pyenv\lib\site-packages\clr_loader\types.py", line 64 in call File "D:\code\github\PPX\pyapp\pyenv\pyenv\lib\site-packages\pythonnet__init__.py", line 161 in unload

未经处理的异常: System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。 在 System.Runtime.InteropServices.Marshal.ReadInt32(IntPtr ptr, Int32 ofs) 在 Python.Runtime.ManagedType.TryFreeGCHandle(BorrowedReference reflectedClrObject, BorrowedReference type) 在 Python.Runtime.Runtime.NullGCHandles(IEnumerable`1 objects) 在 Python.Runtime.Runtime.TryCollectingGarbage(Int32 runs, Boolean forceBreakLoops) 在 Python.Runtime.Runtime.Shutdown() 在 Python.Runtime.PythonEngine.Shutdown() 在 Python.Runtime.Loader.Shutdown(IntPtr data, Int32 size) [nodemon] app crashed - waiting for file changes before starting...

pangao1990 commented 1 year ago

是的,在pnpm run start开发模式下,的确是关闭窗口会导致报错,我目前也没找到原因。所以,我一般是在终端控制台ctrl+C终止程序。不过,打包后的程序,关闭窗口并不会导致报错的。