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
455 views
in Technique[技术] by (71.8m points)

python - Process finished with exit code -1073741571

I have a recursion function which is finding Eulerian Path. I do not think that the definition of the function is relevant (but if someone thinks so, I will paste it as well).

The problem is that when I am running the function with a big graph, I receive the following well known error: RuntimeError: maximum recursion depth exceeded in cmp

Even without the above-mentioned question, I know that I need to increase recursion limit with the following commands

import sys
sys.setrecursionlimit(5000)

The problem is that when no matter what number am I using I either get the Maximum recursion error or my program just halts with no output on the screen but: Process finished with exit code -1073741571. I tried to google for this code and the only problem I was able to find was the problem in Ruby. Any idea how I can overcome this problem.

If this is relevant I am on Windows 8 64 bit, I have plenty of RAM and I have 64bit python.

Just because for some reason this question received some attention recently, I want to highlight that I was not able to find solution to the problem. After hopelessly trying to solve the problem I gave up and rewrote it without recursion. Also it was annoying, but I spent much less time rewriting the whole algorithm, than I spent investigating this problem. I also want to mention that I do not have previous recursion code, so I will not be able to replicate the problem.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

That is the signed integer representation of Microsoft's "stack overflow/stack exhaustion" error code 0xC00000FD.

You might try increasing your executable's stack size as described in the answer here: How to overcome Stack Size issue with Visual Studio (running C codes with big array)

Anytime you see strange, large negative exit codes in windows, convert them to hex and then look them up in the ntstatus error codes http://msdn.microsoft.com/en-us/library/cc704588.aspx

You may also use the MS Error Lookup Tool to find such codes locally, or even automatically. Other, similar tools exist both by Microsoft and third parties.


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

...