Windows fatal exception: access violation / Process finished with exit code -1073741819 (0xC0000005)
解决Pycharm报错 Windows fatal exception: access violation 以及Process finished with exit code -1073741819 (0xC0000005)首先,是在做人脸识别定位时候遇到的这个问题,报错内容如下:I1229 14:40:58.1530188996 create_pascal_tf_record.py:163] R
·
解决Pycharm报错 Windows fatal exception: access violation 以及Process finished with exit code -1073741819 (0xC0000005)
首先,是在做人脸识别定位时候遇到的这个问题,报错内容如下:
I1229 14:40:58.153018 8996 create_pascal_tf_record.py:163] Reading from PASCAL widerface dataset.
Windows fatal exception: access violation
Current thread 0x00002324 (most recent call first):
File "C:\Users\86132\anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow_core\python\lib\io\file_io.py", line 84 in _preread_check
File "C:\Users\86132\anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow_core\python\lib\io\file_io.py", line 183 in readlines
File "E:\Python\python_user\Practice_codes\second\widerface\models-master\research\object_detection\utils\dataset_util.py", line 67 in read_examples_list
File "E:/Python/python_user/Practice_codes/second/widerface/models-master/research/object_detection/dataset_tools/create_pascal_tf_record.py", line 167 in main
File "C:\Users\86132\anaconda3\envs\tensorflow-gpu\lib\site-packages\absl\app.py", line 250 in _run_main
File "C:\Users\86132\anaconda3\envs\tensorflow-gpu\lib\site-packages\absl\app.py", line 299 in run
File "C:\Users\86132\anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow_core\python\platform\app.py", line 40 in run
File "E:/Python/python_user/Practice_codes/second/widerface/models-master/research/object_detection/dataset_tools/create_pascal_tf_record.py", line 185 in <module>
Process finished with exit code -1073741819 (0xC0000005)
经过debug,找到对应出错代码为:
examples_path = os.path.join(data_dir, year, 'ImageSets', 'Main,'
+ FLAGS.set + '.txt')#FLAGS.set
annotations_dir = os.path.join(data_dir, year, FLAGS.annotations_dir)
examples_list = dataset_util.read_examples_list(examples_path)
看了很多博客,下边这篇总结的很全:
pycharm报错:Process finished with exit code -1073741819 (0xC0000005)
之后,还看到有人说是tensorflow-gpu版本与cudnn的版本兼容问题,有人建议将1.14降到1.12等等的,还有通过pip uninstall h5py,卸载h5py文件就可以了,有的说是将文件路径改为绝对路径等等,这些方法除了改变tensorflow版本没有尝试,其他方法都试过了没有解决。
解决方法:首先看报错代码用的是join()路径拼接函数,所以直接就想到了文件中所有引用的路径是否正确,检查之后,的确!!!,其中有一处路径没改成绝对路径,但是,run之后依然报错,索性替换掉join()函数,使用:
examples_list = dataset_util.read_examples_list('E:/Python/python_user/Practice_codes/second/widerface/Main/train.txt')
然后,解决了!!!
Process finished with exit code -1073741819 (0xC0000005)的bug!!一定一定认真仔细重复检查所有代码中路径以及路径拼接函数等和路径相关代码!
更多推荐
所有评论(0)