Godot version:
3.2-stable, Standard edition
OS/device including version:
Windows 10 Pro 64-bit
Issue description:
I have a 2D scene where there's only one node (class Node, not Node2D) and a valid script with no errors attached to it. This scene has no child nodes at all.
Every time I save such scene directly or via saving its script, the following error messages appear (even though the scene file itself is still saved):
core/image.cpp:1596 - Index p_width - 1 = -1 is out of bounds (MAX_WIDTH = 16384).
Width of image must be greater than 0.
core/image.cpp:2376 - Condition "data.size() == 0" is true.
drivers/png/png_driver_common.cpp:56 - png_image_write_to_memory: invalid argument
drivers/png/png_driver_common.cpp:183 - Condition "compressed_size <= png_size_estimate" is true. Returned: FAILED
Can't convert image to PNG.
However, if I save an empty scene with the Node2D root, these errors messages don't appear.
Steps to reproduce:
Node root.Minimal reproduction project:
A scene with a Node root and no children. It may or may not be the main scene of the game, it doesn't matter.
Scenes are not inherently 2D or 3D, the only thing that matters is what node types it contains. If the scene only has a single node of type Node in it, then it's not a 2D scene.
That's probably due to thumbnail generation. Since the scene is neither detected as 2D nor 3D, it likely can't generate a thumbnail and does not fail gracefully.
Can't reproduce on Win64 with current 'master' branch :/
@MxZhur - is it happening for you all the time? I've tested it with 3.2 too and tried, like 30 times to replicate that bug - and for me happened only once, but I can't recall the order of events I performed to get there.
Do you have some guideline of exact 'clicks' you perform to achieve it?
Do you have some guideline of exact 'clicks' you perform to achieve it?
@dreamsComeTrue I just created a new project through the Project Manager's menu, then clicked
Other Node in the Scene tab, then selected Node, renamed it to Main and saved the node as a scene. And these messages appeared.
I'm able to reproduce the errors on Windows 10 using 3.2 stable (Mono), and have been seeing them consistently in scenes with a top level Node.

I can't reproduce this in latest master https://www.youtube.com/watch?v=SJrnxVco8fE
Also tried renaming it to Main, no difference.
I am on the current 3.2 stable release. At the time of this writing I found out it was occurring only when I had the 3D view disabled via unchecking it in Editor > Manage Editor Features and then creating a brand new project and attempting to save a scene with the generic root node.
If the 3D viewport was _ever_ visible at any time after creating the project (even if it is immediately disabled after switching to it and switching back to 2D view or a script), the thumbnail error would _not_ appear upon saving a scene or any subsequent scenes thereafter.
If explicitly adding a 2D node or Control node or any of their child node types to the scene, it will not throw the error. If the nodes are deleted, the error will return.
This was tested on both Windows 10 and MacOS Catalina.
Most helpful comment
I am on the current 3.2 stable release. At the time of this writing I found out it was occurring only when I had the 3D view disabled via unchecking it in Editor > Manage Editor Features and then creating a brand new project and attempting to save a scene with the generic root node.
If the 3D viewport was _ever_ visible at any time after creating the project (even if it is immediately disabled after switching to it and switching back to 2D view or a script), the thumbnail error would _not_ appear upon saving a scene or any subsequent scenes thereafter.
If explicitly adding a 2D node or Control node or any of their child node types to the scene, it will not throw the error. If the nodes are deleted, the error will return.
This was tested on both Windows 10 and MacOS Catalina.