Author Topic: The 08 October 2018 build (11499) is out.  (Read 39566 times)

Offline riban

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: The 08 October 2018 build (11499) is out.
« Reply #15 on: October 20, 2018, 07:25:47 pm »
Windows 7 64-bit: Something triggers Codeblocks to ramp CPU up to 100% (25% on 4 core because CB only uses one core) and closing Codeblocks leaves it running in the background consuming 100% CPU. Not figured out what is causing this yet but it is not compilation because I have been using it as an editor only with three projects in a workspace.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 08 October 2018 build (11499) is out.
« Reply #16 on: October 20, 2018, 08:33:46 pm »
The easiest way is to attach a debugger and break it to see where it is stuck.
Is this reproducible? Does it happen with older night builds? With 17.12?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline New Pagodi

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: The 08 October 2018 build (11499) is out.
« Reply #17 on: October 20, 2018, 09:13:46 pm »
Windows 7 64-bit: Something triggers Codeblocks to ramp CPU up to 100% (25% on 4 core because CB only uses one core) and closing Codeblocks leaves it running in the background consuming 100% CPU. Not figured out what is causing this yet but it is not compilation because I have been using it as an editor only with three projects in a workspace.

I noticed the same thing yesterday when I heard my fans spinning louder than they should have been.  Task manager showed codeblocks was the culprit.  I then killed the program in task manager, restarted and the same problem happened again.  After doing that 2 or 3 times, I switched back to the March 10th build and didn't have any problem with the same projects.

I switched back to this build today, but the problem doesn't seem to be happening today for some reason.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 08 October 2018 build (11499) is out.
« Reply #18 on: October 21, 2018, 12:02:45 am »
Interesting... Let us know if you see it again... If you can find the culprit it would be even better.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: The 08 October 2018 build (11499) is out.
« Reply #19 on: October 21, 2018, 04:03:06 am »
Interesting... Let us know if you see it again... If you can find the culprit it would be even better.

Link no idea if it is the same issue https://trac.wxwidgets.org/ticket/17094

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 08 October 2018 build (11499) is out.
« Reply #20 on: October 21, 2018, 08:00:35 am »
Maybe, CodeCompletion plugin may cause the hang issue, but this is only a wild guess. I have to reproduce the issue.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline riban

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: The 08 October 2018 build (11499) is out.
« Reply #21 on: October 21, 2018, 11:00:38 am »
Full CPU usage is not occuring with 17.12 but continues to occur with SVN 11499. Code completion continues to work whilst in this state. I have not figured out what workflow (if any) triggers this. It looks quite random at the moment. I am running device manager to watch for when this occurs but this is proving challenging to capture.

I started SVN 11499. Opened a workplace with three projects then left it alone. When I came back 30 mins later it was consuming 100% CPU. Then I started SVN 11499 without any projects open and within 5 mins it was consuming 100% CPU. So this is not driven by a manual user workflow. Anyone have instructions on how to gather useful debug info?
« Last Edit: October 21, 2018, 12:42:38 pm by riban »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: The 08 October 2018 build (11499) is out.
« Reply #22 on: October 21, 2018, 04:11:27 pm »
Can anyone test disabling and enabling of ThreadSearch plugin?

It crashes on my Win7 64 bit PC.

Edit: I am trying to duplicate the slow down issue and it failed to enable all the plugins.
I plan to build CB from source to see where ThreadSearch crashes; but, it will likely be several days before I can do it.
Edit2: Since ollydbg posted a backtrace I will not try to locate the ThreadSearch location. That is all that I planned to do.
Fixing the reason for crashing is normally beyond my ability.

Tim S.
« Last Edit: October 21, 2018, 04:37:39 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 08 October 2018 build (11499) is out.
« Reply #23 on: October 21, 2018, 04:24:29 pm »
...
So this is not driven by a manual user workflow. Anyone have instructions on how to gather useful debug info?
Normally, I guess the parser goes to an endless loop in this case. I can debug the parser, but I need a test project to reproduce this bug.
Any way, I will review the code changes made recently in the code completion plugin.
Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 08 October 2018 build (11499) is out.
« Reply #24 on: October 21, 2018, 04:32:38 pm »
Can anyone test disabling and enabling of ThreadSearch plugin?

It crashes on my Win7 64 bit PC.

Edit: I am trying to duplicate the slow down issue and it failed to enable all the plugins.
I plan to build CB from source to see where ThreadSearch crashes; but, it will likely be several days before I can do it.

Tim S.
Hi, Tim, I just test this. I'm using 32bit mingw-w64's gcc 7.2, and wx 3.1.1 under Windows 7(64bit) OS.
I see that disabling thread-search plugin cause a crash, see the bt below:

Code
[debug][New Thread 1996.0x1c54]
[debug]Thread 1 received signal SIGSEGV, Segmentation fault.
[debug]0x0fca33bd in ThreadSearchViewManagerMessagesNotebook::RemoveViewFromManager (this=0x18cc5fd0) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearchViewManagerMessagesNotebook.cpp:61
[debug]D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearchViewManagerMessagesNotebook.cpp:61:1999:beg:0xfca33bd
[debug]>>>>>>cb_gdb:

At D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearchViewManagerMessagesNotebook.cpp:61

[debug]> show language
[debug]The current source language is "auto; currently c++".
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x0fca33bd in ThreadSearchViewManagerMessagesNotebook::RemoveViewFromManager (this=0x18cc5fd0) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearchViewManagerMessagesNotebook.cpp:61
[debug]#1  0x0fc8675c in ThreadSearch::OnRelease (this=0x86e8788) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearch.cpp:231
[debug]#2  0x694a1a56 in cbPlugin::Release (this=0x86e8788, appShutDown=false) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\sdk\cbplugin.cpp:88
[debug]#3  0x69543722 in PluginManager::DetachPlugin (this=0x8261870, plugin=0x86e8788) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\sdk\pluginmanager.cpp:209
[debug]#4  0x6954d8a9 in PluginsConfigurationDlg::OnToggle (this=0x28f3ec, event=...) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\sdk\pluginsconfigurationdlg.cpp:216
[debug]#5  0x01f72d82 in wxAppConsoleBase::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#6  0x01f73257 in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#7  0x020d01de in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#8  0x020d02aa in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#9  0x020d0a31 in wxEvtHandler::TryHereOnly(wxEvent&) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#10 0x020d0a9a in wxEvtHandler::ProcessEventLocally(wxEvent&) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#11 0x020d0af3 in wxEvtHandler::ProcessEvent(wxEvent&) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#12 0x023cb9c4 in wxWindowBase::TryAfter(wxEvent&) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#13 0x020d27e2 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#14 0x021f8dfd in wxButton::SendClickEvent() () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#15 0x021f8e81 in wxButton::MSWCommand(unsigned int, unsigned short) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#16 0x021c9d19 in wxWindow::HandleCommand(unsigned short, unsigned short, HWND__*) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#17 0x021d3a99 in wxWindow::MSWHandleMessage(long*, unsigned int, unsigned int, long) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#18 0x021c4150 in wxWindow::MSWWindowProc(unsigned int, unsigned int, long) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#19 0x021cc272 in wxWndProc(HWND__*, unsigned int, unsigned int, long)@16 () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#20 0x753e62fa in gapfnScSendMessage () from C:\windows\syswow64\user32.dll
[debug]#21 0x000412ae in ?? ()
[debug]#22 0x00000111 in ?? ()
[debug]#23 0x00008320 in ?? ()
[debug]#24 0x00021296 in ?? () from C:\Windows\SysWOW64\mpr.dll
[debug]#25 0x753e6d3a in USER32!GetThreadDesktop () from C:\windows\syswow64\user32.dll
[debug]#26 0x021cc200 in wxWindow::SubclassWin(HWND__*) () from E:\wxWidgets-3.1.1-rc\lib\gcc_dll\wxmsw311u_gcc_cb.dll
[debug]#27 0x753e965e in USER32!GetWindow () from C:\windows\syswow64\user32.dll
[debug]#28 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Kilmatead

  • Single posting newcomer
  • *
  • Posts: 5
Re: The 08 October 2018 build (11499) is out.
« Reply #25 on: October 21, 2018, 04:58:07 pm »
Normally, I guess the parser goes to an endless loop in this case. I can debug the parser, but I need a test project to reproduce this bug.
Any way, I will review the code changes made recently in the code completion plugin.
Thanks.
For what it's worth, Riban's observation that it seems to happen if you just leave CB idle in the background is an oddly reliable way of recreating the hang (anywhere from 30 minutes to an hour).

A mini procdump of this hung CodeBlocks is available here

And, just for giggles, processhacker shows the offending thread is always stuck in the same place:


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: The 08 October 2018 build (11499) is out.
« Reply #26 on: October 21, 2018, 07:09:26 pm »
Normally, I guess the parser goes to an endless loop in this case. I can debug the parser, but I need a test project to reproduce this bug.
Any way, I will review the code changes made recently in the code completion plugin.
Thanks.
For what it's worth, Riban's observation that it seems to happen if you just leave CB idle in the background is an oddly reliable way of recreating the hang (anywhere from 30 minutes to an hour).

I also duplicated the problem no idea how long I let CB idle before seeing it.
I went away and saw the problem after I came back.

I plan on trying the fix suggested in the wx bug post and seeing if it works.
Edit: https://trac.wxwidgets.org/ticket/17094   [wxMSW] High CPU usage when application is idle
Will take several hours since first I have to confirm issue is in wx git master branch
Edit2: Will likely take several days; I will need to test the changes a lot for such a small piece of code.
Edit3: Failed to see problem with CB SVN 11503 and WX Git master less than 5 days old; when only using Core plugins.
Now going to try using core and contrib plugins and see if I can get high CB CPU usage.

Tim S.
« Last Edit: October 21, 2018, 11:39:17 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 08 October 2018 build (11499) is out.
« Reply #27 on: October 22, 2018, 06:55:50 pm »
@Kilmatead: What happens if you disable the file manager plugin?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline New Pagodi

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: The 08 October 2018 build (11499) is out.
« Reply #28 on: October 22, 2018, 08:01:05 pm »
@Kilmatead: What happens if you disable the file manager plugin?

That seems to have stopped the problem for me, but I guess I should wait a day or two to say for sure.  What does that plugin do?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 08 October 2018 build (11499) is out.
« Reply #29 on: October 22, 2018, 09:20:00 pm »
Shows the File manager tab next to the Projects tab. It is showing a tree view of the files on the hard disk.
Can someone reproduce this with a build with symbols and show us the function which causes the problem?

Does this happen with the previous night build?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]