View Issue Details

IDProjectCategoryView StatusLast Update
0031536RunnerBuffersPublic2021-04-23 14:52
ReporterDanAssigned ToFritz 
PriorityHighSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
Platform-OSWindows 10OS VersionPro x64
Product Version2.2.4 
Target Version2.3.0Fixed in Version2.3.0 
Summary0031536: Buffers: Creating a buffer doesn't set its "used size" properly in some cases
DescriptionCreating/decompressing a buffer doesn't set its "used size" properly in some cases.

1) When filling a buffer with the function buffer_get_surface(), other buffer functions will treat it as if the buffer was empty:
buffer_save() will create an empty file.
buffer_base64_encode() will return the string "AA=="
buffer_compress() will return a buffer of size 9, which upon decompression will return a buffer of (allegedly) only size 1.
The issue appears when trying to save, encode or compress buffers filled by the function buffer_get_surface().

2) Using game_save_buffer() and then game_load_buffer() won't result in a usable buffer. You currently have to game_save(), load that file into a buffer, and then game_load_buffer() that.

3) buffer_get_surface() will return the string "AA=="
Steps To Reproduce1. Run the first attached sample project.
2. Observe the multi-coloured surface appears and your Output Window log gives the described results / as shown in the screenshot.
Repro: 100%

1. Run the second attached sample project.
2. Pressing 1 and then 3 will game_save_buffer() and then game_load_buffer(). Observe this fails to load anything.
Repro: 100%
Additional Information

1.4 Found In
2.x Runtime Found In2.2.4.374
2.x Runtime Verified In



2019-12-09 14:00


SurfaceToBuffer.yyz (147,079 bytes)
BufferSizeWrong.png (94,638 bytes)
BufferSizeWrong.png (94,638 bytes)


2019-12-10 11:03


GameSaveBufferBug.yyz (24,880 bytes)


2020-03-27 14:39

Adminstrator   ~0065554



2021-04-23 14:52

Adminstrator   ~0065772

Fixed ages ago. Closing.