The program which I debug: https://gistgithubcom/Yanpas/f5c5f1359a384c3174de Placing BP on line 60 causes segfault soon Pressing OK on SegFault message hangs geany
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/347
Well, it's an interesting problem but I'm not sure it totally qualifies as a bug. Your sample file leads to infinite recursion, thus exploding the stack and leading to the crash. This makes GDB return 104806 stack frames (on my machine), which, well, is a lot. The hang you see is the time the plugin takes to process all the frames and populate the *Call Stack* tab.
There is an easy optimization that makes a part of the process quite a lot faster (in *dbm_gdb.c:get_stack()*), but it's still a tiny part of the overall time it takes, which is almost entirely taken building the *Call Stack* tab. Not quite sure what can be done here apart making the whole thing a lot faster (not sure how), or make the population incremental (probably tricky in the current state, and not very practical for the user as the frames will be missing).
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/347#issuecomment-178932997
@Yanpas Could you try #349? It goes as down as possible as what the plugin's code itself is concerned: the plugin itself takes less than 0.3s for me now (compared to more than 100s before). In practice it still takes around 10s, but that's spent in GDB. I believe it's fixed then, at least for now.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/347#issuecomment-181664299
Still the same. maybe I do something wrong? from history: ``` 26 git clone https://github.com/b4n/geany-plugins.git 27 cd geany-plugins/ 28 git checkout debugger/master 29 sudo apt-get build-dep geany-plugins 30 sudo apt-get remove geany-plugins-common 31 sudo apt-get remove geany-plugin-debugger geany-plugins-common 32 #sudo apt-get install g++ 33 g++ 34 sudo apt-get install g++ autoconf checkinstall 35 ./autogen.sh --help 36 ./configure --disable-all-plugins --enable-debugger 37 make 38 sudo checkinstall -D ```
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/347#issuecomment-181837992
Hum, I'm not suite sure about the checkinstall part, but the rest look fine. What is taking CPU when the hang occurs? Geany or GDB? It'd be expected GDB does for like 10s, and then everything gets back to normal. In any case, could you give a backtrace of when Geany hangs?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/347#issuecomment-181856811
I've given more RAM and CPU time to my virtual machine. Now after clicking OK gdb eats RAM (for about 600MB) and takes 98% of CPU time. After 600 mb were eaten, it stops and returns some messages. The bug is fixed, thanks!
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/347#issuecomment-181862386
Closed #347.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/347#event-548897871
github-comments@lists.geany.org