BrunoLevy / GraphiteThree

Experimental 3D modeler
GNU General Public License v2.0
213 stars 18 forks source link

Lua Stack overflow #2

Open BrunoLevy opened 1 year ago

BrunoLevy commented 1 year ago

Under some circumstances, Graphite crashes with a Lua stack overflow. There may be an event handler that enters an infinite recursion. It happens after a looong time though. To reproduce, start Graphite, open the preference windows, and leave the cursor over it.

BrunoLevy commented 1 year ago

Error log:

| o-[Lua         ] Error: /home/blevy/Programming/GraphiteThree/lib/camera.lua |
|                  :193: stack overflow                                        |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/camera.lua |
|                  :193: stack overflow                                        |
|                  Error: stack overflow                                       |
|                  Error: stack overflow                                       |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/autogui.lu |
|                  a:38: stack overflow                                        |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/autogui.lu |
|                  a:38: stack overflow                                        |
|                  Error: .../blevy/Programming/GraphiteThree/lib/graphite_com |
|                  mon.lua:31: stack overflow                                  |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/autogui.lu |
|                  a:284: stack overflow                                       |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/autogui.lu |
|                  a:284: stack overflow                                       |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/autogui.lu |
|                  a:1211: stack overflow                                      |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/autogui.lu |
|                  a:1211: stack overflow                                      |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/autogui.lu |
|                  a:1211: stack overflow                                      |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/autogui.lu |
|                  a:1254: stack overflow                                      |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/scene_grap |
|                  h.lua:467: stack overflow                                   |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/scene_grap |
|                  h.lua:467: stack overflow                                   |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/scene_grap |
|                  h.lua:467: stack overflow                                   |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/scene_grap |
|                  h.lua:467: stack overflow                                   |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/scene_grap |
|                  h.lua:467: stack overflow                                   |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/scene_grap |
|                  h.lua:467: stack overflow                                   |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/scene_grap |
|                  h.lua:467: stack overflow                                   |
|                  Error: /home/blevy/Programming/GraphiteThree/lib/scene_grap |
|                  h.lua:467: stack overflow                                   |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:73: stack overflow                                  |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:45: stack overflow                                  |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:45: stack overflow                                  |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:45: stack overflow                                  |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:45: stack overflow                                  |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:45: stack overflow                                  |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:45: stack overflow                                  |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:45: stack overflow                                  |
|                  Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_im |
|                  gui.lua:89: stack overflow                                  |
Error while displaying error (!):                 Error: ...e/blevy/Programming/GraphiteThree/lib/graphite_imgui.lua:89: stack overflow
stack overflow

|                  Error: stack overflow                                       |
Error while displaying error (!):                 Error: stack overflow
stack overflow

|                  Error: stack overflow                                       |
Error while displaying error (!):                 Error: stack overflow
stack overflow

|                  Error: stack overflow                                       |
Error while displaying error (!):                 Error: stack overflow
stack overflow

|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
|                  Error: error in error handling                              |
Error while displaying error (!):                 Error: error in error handling
error in error handling

|                  Error: error in error handling                              |
Error while displaying error (!):                 Error: error in error handling
error in error handling

|                  Error: error in error handling                              |
Error while displaying error (!):                 Error: error in error handling
error in error handling

|                  Error: error in error handling                              |
Error while displaying error (!):                 Error: error in error handling
error in error handling

|                  Error: error in error handling                              |
BrunoLevy commented 1 year ago

Added a lock in graphite_gui.draw() to avoid recursive invocation (in lib/graphite_imgui.lua)

BrunoLevy commented 1 year ago

Problem still occurs sometimes (and since it is after a loooonnnng time, it is hard to reproduce / hard to debug)

BrunoLevy commented 1 year ago