简体   繁体   English

进程完成,退出代码 -1073741571

[英]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问题是,当我运行带有大图的函数时,我收到以下众所周知的错误: RuntimeError: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 .问题是,无论我使用什么数字,我要么得到最大递归错误,要么我的程序只是停止而屏幕上没有输出但是:进程已完成,退出代码为 -1073741571 I tried to google for this code and the only problem I was able to find was the problem in Ruby.我试图用谷歌搜索这段代码,我能找到的唯一问题是 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.如果这是相关的,我在 Windows 8 64 位上,我有足够的 RAM,我有 64 位 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.我还想提一下,我没有以前的递归代码,所以我将无法复制这个问题。

That is the signed integer representation of Microsoft's "stack overflow/stack exhaustion" error code 0xC00000FD.那是 Microsoft 的“堆栈溢出/堆栈耗尽”错误代码 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)您可以尝试按照以下答案中的说明增加可执行文件的堆栈大小: 如何使用 Visual Studio 解决堆栈大小问题(使用大数组运行 C 代码)

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任何时候你在 Windows 中看到奇怪的、大的负退出代码,将它们转换为十六进制,然后在 ntstatus 错误代码中查找它们http://msdn.microsoft.com/en-us/library/cc704588.aspx

You may also use theMS Error Lookup Tool to find such codes locally, or even automatically.您还可以使用MS 错误查找工具在本地或什至自动查找此类代码。 Other, similar tools exist both by Microsoft and third parties. Microsoft 和第三方都存在其他类似的工具。

You could use something like:你可以使用类似的东西:

if __name__ == '__main__':
    sys.setrecursionlimit(100000)
    threading.stack_size(200000000)
    thread = threading.Thread(target=your_code)
    thread.start()

This solved both my recursion limitation and my heap size limitation.这解决了我的递归限制和堆大小限制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM