What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()

I was addicted to an error when trying to process asynchronously with tensorflow. I searched for a workaround, but couldn't find it, so I hope it helps someone.

phenomenon

Running the following code causes an error in tf.train.start_queue_runners ()

filename_queue = tf.train.string_input_producer(["../dataset/sample1.tfrecord"])
reader = tf.TextLineReader()

// ...Abbreviation

with tf.Session() as sess:
    #Input enqueue thread start
    coord = tf.train.Coordinator()
    threads = tf.train.start_queue_runners(sess=sess, coord=coord)

[Execution result]

Process finished with exit code -1073741819 (0xC0000005)

Cause

The reference destination of the file path was incorrect.

(Wrong)filename_queue = tf.train.string_input_producer(["../dataset/sample1.tfrecord"])

(Positive)filename_queue = tf.train.string_input_producer(["../dataset/samples/sample1.tfrecord"])

It's just a mistake, but I'm addicted to it. I wish I could get an error with tf.train.string_input_producer () ...

Since 0xC0000005 is a memory access violation type error in the first place, you should first doubt the reference surroundings such as files.

(Reference) Asynchronous processing with Tensorflow

The following article is easy to understand. https://qiita.com/antimon2/items/c7d2285d34728557e81d https://qiita.com/ashigirl966/items/99b0f8d9713ee90db13a

Recommended Posts

What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do if a UnicodeDecodeError occurs in pip
What to do if a Unicode Encode Error occurs in Sublime Text Python
What to do if a version error occurs in the selenium Chrome driver
[Python] What to do if an error occurs in pip (pyinstaller, pyautogui, etc.)
What to do if you get a "No versions found" error in pipenv
What to do if pip gives a DistributionError in Homebrew
What to do if a symbolic link error occurs in import cv while trying to install OpenCV in Python
What to do if you get a minus zero in Python
What to do if you get a Cannot retrieve metalink for repository error in yum
What to do if pipreqs results in UnicodeDecodeError
What to do if there is a decimal in python json .dumps
What to do if an error occurs when importing numpy with VScode
[OSX] [pyenv] What to do when an SSL error occurs in pip
What to do if you get a must override `get_config` error when trying to model.save in Keras
What to do if pip --user returns an error in a virtual environment created with pyenv
What to do if pip install fails in Xcode 5.1
[python] What to do when an error occurs in send_keys of headless chrome
What to do when SSL error occurs in pip in Windows10, miniconda, VScode environment
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
What to do if an SSL connection error (ssl.SSLError: [SSL: DH_KEY_TOO_SMALL]) occurs on Ubuntu 20.04
What to do if an error occurs in TensorFlow RNN related import or RNN (LSTM) Cell (v 0.11r ~)
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What to do if yum breaks
What to do if ʻarguments [0] .scrollIntoView ();` fails in python selenium
What to do if you get a memory error when converting from PySparkDataFrame to PandasDataFrame
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)
What to do if you get "coverage unknown" in Coveralls
What to do if you get an error when importing matplotlib in Python (Mac)
What to do when an error occurs with import _ssl
What to do if you can't log in as root
What to do if an error occurs when loading a python project created with poetry into VS Code
What to do if you run python in IntelliJ and end with an error
What to do if you get a Call with too many input arguments error at DoAndReturn in a golang test
What to do if a communication error occurs due to proxy when installing with package management of pip, npm, gem
What to do when a Missing artifact occurs in a jar that is not defined in pom.xml
What to do if you get Swagger-codegen in python and Import Error: No module named
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if ʻObject arrays cannot be loaded when allow_pickle = False` occurs in numpy.load ()
What to do if you get a UnicodeDecodeError with pip install
What to do if "Unnamed: 0" is added in to_csv-> read_csv in pandas
What to do if you can't use the trash in Lubuntu 18.04.
What to do when UnicodeDecodeError occurs during read_csv in pandas (pd.read_table ())
What to do when ModuleNotFoundError: No module named'XXX' occurs in Python
What to do if Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: windows-31j occurs in PyCharm
What to do if you get angry with'vertices' must be a 2D list ... in matplotlib arrow
What to do if you get an error saying c compiler cannot create executables in configure
What to do if you can't find PDO in Laravel or CakePHP
What to do if you can't use scikit grid search in Python
What to do if you get lost in file reference with FileNotFoundError
What to do if you get angry in TensorFlow v2 without attribute'app'
What to do if pyenv install does not proceed with an error
What to do if No Python documentation found for ... appears in pydoc
What to do if you get a TypeError with numpy min, max
What to do if you get an error when trying to load mnist
What to do if you can't install with pip in babun environment
What to do if fprintd requires a password when registering your fingerprint
What happens if you do "import A, B as C" in Python?
What to do if you get an error when installing Dlib (Ubuntu)
What to do when a warning message is displayed in pip list
What to do if an error message "There was a problem displaying this web page" is displayed in Chrome's Web Driver (Selenium)