-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PoolVectorArray locking issues #331
Comments
Since 63410bd, I haven't been able to reproduce this issue, so it may be safe to assume that it is now fixed. It seems like the |
Such locking errors I have when working with different Image functions. I believe that fixing godotengine/godot#46480, godotengine/godot#46481, godotengine/godot#46483 etc. will fix this issues in Pixelorama. I probably can't fix this issues due to not having enough skills, but I can provide easy to reproduce steps with minimal projects(just like in issues above) |
Related to the PoolVectorArray locking issue (#331). This still doesn't fix the issue itself, but at least Pixelorama does not crash anymore. It is still possible, though, to fail to load a guide when opening a project. Opening it again may solve the issue.
Steps to reproduce: pool.vector-.2.mp4Attempt 2 and 3 (both one after another) pool.vector.b.mp4 |
A new error reproduction steps for PoolVector isues in Godot screen ColorPicker: test-2021-07-23_06.29.55.mp4 |
It's very likely that the latest commit (1d20295) might have finally fixed the issue. Or at least it made it more rare. I haven't been able to reproduce the issue so far after these changes. The changes in that commit are that images no longer remain locked forever, and they get unlocked after the user is done with drawing. It seems that this was the cause of the issue. Maybe the fact that images were locked didn't let any other PoolVector also get locked? Some kind of memory conflict perhaps? In any case, it's very possible that this problem may have not been solved, or may re-appear again in the future. If that's the case, we'll re-open this issue. Nevertheless, Godot 4.x gets rid of PoolVectors and images will no longer require locking/unlocking to get edited, so if we move to Godot 4.x, this problem should never appear again. |
Pixelorama version:
v0.8, but it happens with v0.7 too, probably less often. Not sure about previous versions.
OS/device including version:
Windows 10 64-bit. Most likely happens in all platforms.
Issue description:
![image](https://user-images.githubusercontent.com/35376950/93646903-dac4b780-fa0f-11ea-96de-fed4cd7a6211.png)
When working with PoolVectorArrays, or classes that use them, like Image, Line2D, sometimes errors saying "resize: Can't resize PoolVector if locked" appear in the debug console. They look like this.
Depending on the situation, it can be relatively harmless, like some tiles missing when drawing the isometric grid, and others it can prevent something from working at all, like when exporting an image to png, an error with code 23 (ERR_LOCKED) appears.
I have observed this issue happening sometimes when: (will update the list if I find more occurrences)
Drawing the isometric grid. Some of the tiles might be missing.EDIT: No longer relevant as the isometric grid system has changed.Exporting the project.EDIT: Most likely fixed in 63410bdImage.save_png()
returns code 23 and the file fails to get saved. I've noticed that if I draw something and then attempt to export again, it usually works that time.setup_image_menu()
in TopMenuContainer.gdSteps to reproduce:
Honestly, I'm not sure. This error seems very random, although I'm guessing it has to do with the way PoolVector handles memory. Just play around with the occurrences I mentioned above, open multiple projects, and you'll come across this error sooner or later.
This is most likely a Godot bug, but so far I haven't been able to reproduce it in a minimal project in order to submit it to Godot's issues. If anyone knows anything more about the nature of this issue, or potential workarounds/solutions, feel free to reply. It's also worth noting that PoolVector is going away in Godot 4.0, so it's possible that this issue will get fixed when 4.0 is released.
The text was updated successfully, but these errors were encountered: