Windows fatal exception: access violation : Exception Code: 0xC0000005—the classic memory access violation.
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
@comfyanonymous @comfyui-wiki @rattus128 @kijai
--------------------------------------------------------------------------------------------------
AI Suggestion
The plot thickens! Disabling Crystools was a good first step, but this new log reveals a much more specific culprit.
The crash is now happening inside comfy_kitchen (specifically tensor\base.py) while triggered by an "Empty Cache" node from ComfyUI-Easy-Use.
The "Smoking Gun"
Look at these lines in your stack trace:
File "...ComfyUI-Easy-Use\py\nodes\logic.py", line 1674 in empty_cache
File "...ComfyUI\comfy\model_management.py", line 1782 in unload_all_models
File "...comfy_kitchen\tensor\base.py", line 400 in _handle_clone
What's happening: The "Easy Use" node is trying to force-clean your GPU memory. This triggers a chain reaction where ComfyUI tries to "unpatch" and "unload" models. During this process, Comfy-Kitchen (which likely has some custom tensor handling/wrappers active) is trying to clone or move a tensor that has already been cleared or is in an invalid state.
This results in Exception Code: 0xC0000005—the classic memory access violation.
---------------------------------------------------------------------------------------------------------------------------
Actual Error
Windows fatal exception: access violation
Thread 0x00003c80 (most recent call first):
File "threading.py", line 359 in wait
File "threading.py", line 655 in wait
File "X:\python_embeded\Lib\site-packages\tqdm\_monitor.py", line 60 in run
File "threading.py", line 1075 in _bootstrap_inner
File "threading.py", line 1032 in _bootstrap
Thread 0x000044f8 (most recent call first):
File "threading.py", line 359 in wait
File "threading.py", line 655 in wait
File "X:\python_embeded\Lib\site-packages\tqdm\_monitor.py", line 60 in run
File "threading.py", line 1075 in _bootstrap_inner
File "threading.py", line 1032 in _bootstrap
Thread 0x00003d38 (most recent call first):
File "concurrent\futures\thread.py", line 90 in _worker
File "threading.py", line 1012 in run
File "threading.py", line 1075 in _bootstrap_inner
File "threading.py", line 1032 in _bootstrap
Thread 0x00001f38 (most recent call first):
File "concurrent\futures\thread.py", line 90 in _worker
File "threading.py", line 1012 in run
File "threading.py", line 1075 in _bootstrap_inner
File "threading.py", line 1032 in _bootstrap
Current thread 0x00001a14 (most recent call first):
File "X:\python_embeded\Lib\site-packages\comfy_kitchen\tensor\base.py", line 400 in _handle_clone
File "X:\python_embeded\Lib\site-packages\comfy_kitchen\tensor\base.py", line 340 in __torch_dispatch__
File "X:\ComfyUI\comfy\ops.py", line 1155 in _apply
File "X:\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 933 in _apply
File "X:\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 933 in _apply
File "X:\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 933 in _apply
File "X:\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 933 in _apply
File "X:\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 933 in _apply
File "X:\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1381 in to
File "X:\ComfyUI\comfy\model_patcher.py", line 938 in unpatch_model
File "X:\ComfyUI\comfy\model_patcher.py", line 1077 in detach
File "X:\ComfyUI\comfy\model_management.py", line 606 in model_unload
File "X:\ComfyUI\comfy\model_management.py", line 690 in free_memory
File "X:\ComfyUI\comfy\model_management.py", line 1782 in unload_all_models
File "X:\ComfyUI\custom_nodes\ComfyUI-Easy-Use\py\libs\utils.py", line 281 in cleanGPUUsedForce
File "X:\ComfyUI\custom_nodes\ComfyUI-Easy-Use\py\nodes\logic.py", line 1674 in empty_cache
File "X:\ComfyUI\execution.py", line 296 in process_inputs
File "X:\ComfyUI\execution.py", line 308 in _async_map_node_over_list
File "X:\ComfyUI\execution.py", line 334 in get_output_data
File "X:\ComfyUI\execution.py", line 534 in execute
File "X:\ComfyUI\execution.py", line 770 in execute_async
File "asyncio\events.py", line 88 in _run
File "asyncio\base_events.py", line 1999 in _run_once
File "asyncio\base_events.py", line 645 in run_forever
File "asyncio\windows_events.py", line 322 in run_forever
File "asyncio\base_events.py", line 678 in run_until_complete
File "asyncio\runners.py", line 118 in run
File "asyncio\runners.py", line 195 in run
File "X:\ComfyUI\execution.py", line 711 in execute
File "X:\ComfyUI\main.py", line 313 in prompt_worker
File "threading.py", line 1012 in run
File "threading.py", line 1075 in _bootstrap_inner
File "threading.py", line 1032 in _bootstrap
Thread 0x00004a18 (most recent call first):
File "concurrent\futures\thread.py", line 90 in _worker
File "threading.py", line 1012 in run
File "threading.py", line 1075 in _bootstrap_inner
File "threading.py", line 1032 in _bootstrap
Thread 0x0000147c (most recent call first):
File "asyncio\windows_events.py", line 774 in _poll
File "asyncio\windows_events.py", line 445 in select
File "asyncio\base_events.py", line 1961 in _run_once
File "asyncio\base_events.py", line 645 in run_forever
File "asyncio\windows_events.py", line 322 in run_forever
File "asyncio\base_events.py", line 678 in run_until_complete
File "X:\ComfyUI\main.py", line 526 in
Exception Code: 0xC0000005
Contributor guide
Assessment
This issue has not been assessed yet.