-
Notifications
You must be signed in to change notification settings - Fork 19
Global variable "paths" overflows #55
Comments
You are confusing me a bit. In #40 (comment) you said
It has been moved out of the |
No, it hasn't. It gets initialized outside, but each call to locate appends more and more entries. |
I think I get it now. You are talking about the multiple calls to |
No. The multiple calls to locate() are OK. |
OK, I see what you mean now. Checking the length of the array produced a very large number. So the fix would be to initialize the paths However, there still has to be some editing somewhere. Since the array starts out with the |
come on, it is not that complicated. simply MOVE the paths.append() calls to the beginning of the script, The paths array then can stay as it is the whole lifetime of the script. There is no need to modify it again. Its search order will be correct and will be used for every file loaded. The bug we talk about here is just that the PLACE of the paths.append() calls is wrong. They ALL should simply be done BEFORE the first call to locate() and then never again. The whole discussion here already took more time to EXPLAIN the problem than to FIX it... :´( |
Assigning to v1.1.5 milestone. |
ad87d66 should finally fix this. 😅 Apologies for not understanding the issue completely. I didn't mean to annoy you. Sometimes I have trouble understand what people are trying to explain (it probably stems from my inability to sometimes explain what I am taking about). 😟 |
If everything looks good, I'll merge this and prepare the v1.1.5 release. |
This should be fixed by #56. Closing. 👍 |
the current master codeline (up to commit f3a7dd4) to me appears to have a bug at the global variable "paths".
It gets initialized ONCE as empty array
paths = []
, but EACH call of the function "locate" appends more and more values to it.The fix is easy.
Simply initialize it ONCE, BEFORE all the part loading stuff starts.
The text was updated successfully, but these errors were encountered: