SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
38 stars 10 forks source link

Layout::SketchUpModel.new - SystemStackError : Stack level too deep #897

Open bbeaulant opened 1 year ago

bbeaulant commented 1 year ago
  1. SketchUp/LayOut Version: 2023
  2. OS Platform: Old Mac OS (only ?)

On several machines, calling Layout::SketchUpModel.new generate an recursive loop and then a SystemStackError exception or a crash of SketchUp.

skp = Layout::SketchUpModel.new(skp_path, Geom::Bounds2d.new(
            page_info.left_margin,
            current_y,
            page_info.width - page_info.left_margin - page_info.right_margin,
            page_info.height - current_y - page_info.bottom_margin
          ))

Source code is here.

Unfortinately it doesn't occur on all computer. Then it's quite hard to reproduce.

Forum discussion : https://forums.sketchup.com/t/systemstackerror-stack-level-too-deep-when-invoking-layout-sketchupmodel-new/228553

BugSplat reference :

Incident Identifier: DC9B3D47-2832-453B-9D52-A7F1ED8ED2EA CrashReporter Key: A4AF8F9C-FF03-50C6-93E6-CD09F7879CAE

Thread 0 Crashed:
0   libSketchUpViewerAPI.dylib           0x00000001259cc4cd 0x12574c000 + 2622669
1   libSketchUpViewerAPI.dylib           0x0000000125c4fb53 0x12574c000 + 5258067
2   libLayOutModel.dylib                 0x000000012544c246 0x125440000 + 49734
3   libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
4   libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
5   libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
6   libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
7   libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
8   libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
9   libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
10  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
11  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
12  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
13  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
14  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
15  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
16  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
17  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
18  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
19  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
20  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
21  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
22  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
23  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
24  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
25  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
26  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
27  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
28  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
29  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
30  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
31  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
32  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
33  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
34  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
35  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
36  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
37  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
38  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
39  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
40  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
41  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
42  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
43  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
44  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
45  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
46  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
47  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
48  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
49  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
50  libLayOutModel.dylib                 0x000000012544c38b 0x125440000 + 50059
...

OR

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libLayOutModel.dylib 0x000000011a9d31f0 layout::SkpModelRef::GetDefaultPage() + 18
1 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
2 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
3 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
4 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
5 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
6 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
7 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
8 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
9 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
10 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
11 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
12 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
13 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
14 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
15 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
16 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
17 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
18 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
19 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
20 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
21 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
22 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
23 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
24 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
25 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
…
thomthom commented 1 year ago

Have you tried without any other extensions loaded on the machines where it happens?

bbeaulant commented 1 year ago

Hi @thomthom ! No, unfortunately it doesn't occur on my dev computers. Then, it's quite hard to say to users to uninstall everything to test :)

bbeaulant commented 1 year ago

Maybe this report give more details to locate the recursive loop ?

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libLayOutModel.dylib 0x000000011a9d31f0 layout::SkpModelRef::GetDefaultPage() + 18
1 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
2 libLayOutModel.dylib 0x000000011a9d338b layout::SkpModelRef::GetDefaultPage() + 429
...
sketchup[bot] commented 1 year ago

Logged as: SKEXT-3708

bbeaulant commented 1 year ago

Have you tried without any other extensions loaded on the machines where it happens?

Hi @thomthom, a user try with all extension disabled and the same crash occurs.