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

Crash cloning template that had a hierarchy at some point. #6473

Closed Wackytoaster closed 1 year ago

Wackytoaster commented 1 year ago

Problem description

If a cloned object had a hierarchy and is set as a template, cloning it and dragging the clone into the layout crashes C3. Maybe related to https://github.com/Scirra/Construct-3-bugs/issues/6460

Attach a .c3p

clonecrash.c3p.zip

Steps to reproduce

Note that step 1-4 have already been done in the example project.

  1. Create spriteA
  2. Set to template (give a name, might not be needed)
  3. Create spriteB and put it as a child of spriteA
  4. Delete spriteB from layout (turns out this is optional)
  5. Clone SpriteA
  6. Drag cloned object into layout

Observed result

Crash

Expected result

🍨

More details

Affected browsers/platforms:

First affected release:

System details

View details Error report information Type: unhandled exception File: https://editor.construct.net/r329/components/bars/propertiesBar/propertiesBar.js, line 94, col 212 Message: Uncaught TypeError: Cannot read properties of undefined (reading 'Tb') Stack: TypeError: Cannot read properties of undefined (reading 'Tb') at $V (https://editor.construct.net/r329/components/bars/propertiesBar/propertiesBar.js:94:212) at ofb (https://editor.construct.net/r329/components/bars/propertiesBar/propertiesBar.js:39:231) at CCG.aa.XS (https://editor.construct.net/r329/components/bars/propertiesBar/propertiesBar.js:142:179) at d.EWb (https://editor.construct.net/r329/components/bars/propertiesBar/propertiesBar.js:114:40) at d.WBc (https://editor.construct.net/r329/components/bars/propertiesBar/propertiesBar.js:114:6) at Array. (https://editor.construct.net/r329/components/bars/propertiesBar/propertiesBar.js:102:142) at window.ceb.dispatchEvent (https://editor.construct.net/r329/main.js:1234:42) at CR (https://editor.construct.net/r329/components/editors/layoutView/layoutView.js:1:394) at ibb.vo (https://editor.construct.net/r329/components/editors/layoutView/layoutView.js:210:205) at window.Gl.nQb (https://editor.construct.net/r329/components/editors/layoutView/layoutView.js:121:23) Construct version: r329 URL: https://editor.construct.net/r329/ Date: Tue Feb 07 2023 19:23:03 GMT+0100 (Mitteleuropäische Normalzeit) Uptime: 182.3 s Platform information Product: Construct 3 r329 (beta) Browser: Chrome 109.0.5414.120 Browser engine: Chromium Context: webapp Operating system: Windows 10 Device type: desktop Device pixel ratio: 1 Logical CPU cores: 8 Approx. device memory: 8 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: yes Supports highp precision: yes Vendor: Google Inc. (NVIDIA) Renderer: ANGLE (NVIDIA, NVIDIA GeForce GTX 1070 Direct3D11 vs_5_0 ps_5_0, D3D11) Major performance caveat: no Maximum texture size: 16384 Point size range: 1 to 1024 Extensions: EXT_color_buffer_float, EXT_color_buffer_half_float, EXT_disjoint_timer_query_webgl2, EXT_float_blend, EXT_texture_compression_bptc, EXT_texture_compression_rgtc, EXT_texture_filter_anisotropic, EXT_texture_norm16, KHR_parallel_shader_compile, OES_draw_buffers_indexed, OES_texture_float_linear, WEBGL_compressed_texture_s3tc, WEBGL_compressed_texture_s3tc_srgb, WEBGL_debug_renderer_info, WEBGL_debug_shaders, WEBGL_lose_context, WEBGL_multi_draw, OVR_multiview2
DiegoScirra commented 1 year ago

Will be fixed in the next beta. Fixing #6460 also fixed this issue.