Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

Unhandled exception layers crash :space_invader: #6503

Closed WilsonPercival closed 1 year ago

WilsonPercival commented 1 year ago

Problem description

Construct crashes.

Attach a .c3p

unhandled_exception_layers_crash_r329b_easy.zip

save open project: save_open_project.zip

Steps to reproduce

  1. Open a project.
  2. On Layout 2: move Layer 3 under Layer 2.

Observed result

https://user-images.githubusercontent.com/91274932/218316126-ab7841d1-2c28-4b5d-a3f0-2303e3d6bf04.mp4

Expected result

Construct does not crash.

More details

Error report information Type: unhandled exception File: https://editor.construct.net/r329/projectResources.js, line 1340, col 356 Message: Uncaught RangeError: Maximum call stack size exceeded Stack: RangeError: Maximum call stack size exceeded at d.BFc (https://editor.construct.net/r329/projectResources.js:1340:356) at d.Uf (https://editor.construct.net/r329/projectResources.js:1347:472) at d.Uf (https://editor.construct.net/r329/projectResources.js:1347:401) at d.Uf (https://editor.construct.net/r329/projectResources.js:1348:233) at d.Uf (https://editor.construct.net/r329/projectResources.js:1347:401) at d.Uf (https://editor.construct.net/r329/projectResources.js:1348:233) at d.Uf (https://editor.construct.net/r329/projectResources.js:1347:401) at d.Uf (https://editor.construct.net/r329/projectResources.js:1348:233) at d.Uf (https://editor.construct.net/r329/projectResources.js:1347:401) at d.Uf (https://editor.construct.net/r329/projectResources.js:1348:233) Construct version: r329 URL: https://editor.construct.net/r329/ Date: Sun Feb 12 2023 14:07:25 GMT+0200 (Восточная Европа, стандартное время) Uptime: 96.9 s

Platform information Product: Construct 3 r329 (beta) Browser: Chrome 109.0.5414.120 Browser engine: Chromium Context: browser Operating system: Windows NT 0.1.0 Device type: desktop Device pixel ratio: 1 Logical CPU cores: 2 Approx. device memory: 4 GB User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Language setting: en-US

WebGL information Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium) Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: no Supports highp precision: yes Vendor: Google Inc. (Google) Renderer: ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) (0x0000C0DE)), SwiftShader driver) Major performance caveat: yes Maximum texture size: 8192 Point size range: 1 to 1023 Extensions: EXT_color_buffer_float, EXT_color_buffer_half_float, EXT_float_blend, EXT_texture_compression_bptc, EXT_texture_compression_rgtc, EXT_texture_filter_anisotropic, OES_draw_buffers_indexed, OES_texture_float_linear, WEBGL_compressed_texture_astc, WEBGL_compressed_texture_etc, WEBGL_compressed_texture_etc1, WEBGL_compressed_texture_s3tc, WEBGL_compressed_texture_s3tc_srgb, WEBGL_debug_renderer_info, WEBGL_lose_context, WEBGL_multi_draw, OVR_multiview2

Affected browsers/platforms: Chrome

First affected release: broke in r329b

System details

View details Platform information Product: Construct 3 r329 (beta) Browser: Chrome 109.0.5414.120 Browser engine: Chromium Context: browser Operating system: Windows NT 0.1.0 Device type: desktop Device pixel ratio: 1 Logical CPU cores: 2 Approx. device memory: 4 GB User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Language setting: en-US Local storage Storage quota (approx): 59 gb Storage usage (approx): 167 mb (0.3%) Persistant storage: No Browser support notes This list contains missing features that are not required, but could improve performance or user experience if supported. UI effects are disabled in settings. WebGL indicates a major performance caveat. It is probably using software rendering. WebGL information Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium) Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: no Supports highp precision: yes Vendor: Google Inc. (Google) Renderer: ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) (0x0000C0DE)), SwiftShader driver) Major performance caveat: yes Maximum texture size: 8192 Point size range: 1 to 1023 Extensions: EXT_color_buffer_float EXT_color_buffer_half_float EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic OES_draw_buffers_indexed OES_texture_float_linear WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_lose_context WEBGL_multi_draw OVR_multiview2 Audio information System sample rate: 48000 Hz Output channels: 2 Output interpretation: speakers Supported decode formats: WebM Opus (audio/webm; codecs=opus) Ogg Opus (audio/ogg; codecs=opus) WebM Vorbis (audio/webm; codecs=vorbis) Ogg Vorbis (audio/ogg; codecs=vorbis) MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5) MP3 (audio/mpeg) FLAC (audio/flac) PCM WAV (audio/wav; codecs=1) Supported encode formats: WebM Opus (audio/webm; codecs=opus) Video information Supported decode formats: WebM AV1 (video/webm; codecs=av01.0.00M.08) MP4 AV1 (video/mp4; codecs=av01.0.00M.08) WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8) Ogg Theora (video/ogg; codecs=theora) H.264 (video/mp4; codecs=avc1.42E01E) Supported encode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8)
AshleyScirra commented 1 year ago

Can you please make sure issue reports include a valid project that can be opened, and then just the steps to follow to reproduce the problem with the opened project? This is what our bug report guidelines ask for. This report includes a project that cannot be opened because it crashes Construct, and a long list of steps starting from a new project, which makes it more difficult to investigate. Ideally the first step of the steps to reproduce is "open the provided project".

WilsonPercival commented 1 year ago

Can you please make sure issue reports include a valid project that can be opened, and then just the steps to follow to reproduce the problem with the opened project? This is what our bug report guidelines ask for. This report includes a project that cannot be opened because it crashes Construct, and a long list of steps starting from a new project, which makes it more difficult to investigate. Ideally the first step of the steps to reproduce is "open the provided project".

@AshleyScirra I didn't manage to figure out exactly where to start playing the project. But I'll try to see, it will take time.

WilsonPercival commented 1 year ago

Can you please make sure issue reports include a valid project that can be opened, and then just the steps to follow to reproduce the problem with the opened project? This is what our bug report guidelines ask for. This report includes a project that cannot be opened because it crashes Construct, and a long list of steps starting from a new project, which makes it more difficult to investigate. Ideally the first step of the steps to reproduce is "open the provided project".

@AshleyScirra I added the project and updated the steps to reproduce.

AshleyScirra commented 1 year ago

Thanks, that's better, but I'd still clarify the steps to reproduce are:

  1. Open project unhandled_exception_layers_crash_r329b_easy.zip
  2. On layout 2, move Layer 3 to be a sub-layer of Layer 2.

("Under" could mean below it in Z order, but that does not cause a crash.)

WilsonPercival commented 1 year ago

Thanks, that's better, but I'd still clarify the steps to reproduce are:

  1. Open project unhandled_exception_layers_crash_r329b_easy.zip
  2. On layout 2, move Layer 3 to be a sub-layer of Layer 2.

("Under" could mean below it in Z order, but that does not cause a crash.)

@AshleyScirra Sorry, English is not my native language.

AshleyScirra commented 1 year ago

No worries, communicating bug reports is surprisingly difficult, and it just needs careful writing and clarification to make sure we can help.

The root cause of this issue is the setup creates a cyclic reference: there are two global layers which each include each other, thereby resulting in an infinite loop when processing them. The fix is to disallow this setup, so as of the next beta it should be impossible to create such cyclic references.