Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
598 views
in Technique[技术] by (71.8m points)

python - Process finished with exit code -1073740791 (0xC0000409) pycharm error

I am trying to use fastText with PyCharm. Whenever I run below code:

import fastText

model=fastText.train_unsupervised("data_parsed.txt")

model.save_model("model")

The process exits with this error:

Process finished with exit code -1073740791 (0xC0000409)

What causes this error and what can be done to avoid it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Are you using a windows system? 0xC0000409 means stack buffer overflow as seen in this windows help link.

Below is some advice that is taken from this link to solve similar type of issues.

STATUS_STACK_BUFFER_OVERRUN is a /GS exception. They are thrown when Windows detects 'tampering' of a security cookie protecting a return address. It is probable that you are writing something past the end of a buffer, or writing something to a pointer that is pointing to the wrong place. However it is also possible that you have some dodgy memory or otherwise faulty hardware that is tripping validation code.

One thing that you could try is to disable the /GS switch (project properties, look for C/C++ -> Code Generation -> Buffer Security Check) and recompile. Running the code again may well cause an error that you can trap and trace. I think /GS is designed not to give you any info for security reasons.

Another thing you could do is run the code as is on a different PC and see if that fails, this may point to a hardware problem if it doesn't.

Other strategies are reduce the size of the training file by removing some text and reducing the size of the vocabulary by running some text normalisation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...