Bug
#625
Replies: 3 comments 2 replies
-
|
params={ |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
可以具体说一下怎么用的吗?长时间创建对象并使用过?一般不都是创建一次吗? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
可以看看具体缓存了啥吗?怀疑把实例化内存的模型给删了
…---- Replied Message ----
| From | ***@***.***> |
| Date | 01/16/2026 18:26 |
| To | RapidAI/RapidOCR ***@***.***> |
| Cc | SWHL ***@***.***>,
Comment ***@***.***> |
| Subject | Re: [RapidAI/RapidOCR] Bug (Discussion #625) |
在执行每日定时自动化任务时(在循环里判断下次执行时间,到达指定时间执行任务),为了优化内存占用,我采用了 functools.cached_property 来延迟加载 OCR 实例(基于 RapidOCR),并在任务结束后通过删除缓存属性(del)来释放资源。但在实际运行中发现,当第二天 8 点任务再次执行,实例化并识别文字时,程序会阻塞。
问题发生在删除缓存这里,如果不再删除缓存则运行正常。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
问题描述 / Problem Description
python每次调用时都会输出日志,但是在循环中长时间创建对象并识别会直接阻塞,同时也没有日志输出,查看Windows日志显示0xc0000005报错
错误应用程序名称: python.exe,版本: 3.10.10150.1013,时间戳: 0x63e2893e
错误模块名称: onnxruntime_pybind11_state.pyd,版本: 0.0.0.0,时间戳: 0x664468af
异常代码: 0xc0000005
错误偏移量: 0x000000000015ac00
错误进程 ID: 0xd24
错误应用程序启动时间: 0x01dc8381fff09a53
错误应用程序路径: C:\Users\19800\Desktop\NS\toolkit\python.exe
错误模块路径: C:\Users\19800\Desktop\NS\toolkit\lib\site-packages\onnxruntime\capi\onnxruntime_pybind11_state.pyd
报告 ID: 9c30944c-de99-4533-897a-6cdbafba870d
错误程序包全名:
错误程序包相对应用程序 ID:
运行环境 / Runtime Environment
onnxruntime-directml==1.18.0
rapidocr==3.4.5
python==3.10.10
复现代码 / Reproduction Code
可能解决方案 / Possible solutions
AI说这是内存访问越界可以降级onnxruntime-directml,但试了几个版本都没有解决,有没有推荐的版本
Beta Was this translation helpful? Give feedback.
All reactions