Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 314
user9857589 Avatar asked Dec 17 '22 23:12

user9857589


1 Answers

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.

like image 188
joydeep bhattacharjee Avatar answered Dec 22 '22 15:12

joydeep bhattacharjee