Author Topic: CodeBlocks freezes during startup.  (Read 23572 times)

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
CodeBlocks freezes during startup.
« on: October 10, 2005, 05:12:01 pm »
  I got a strange thing this morning. I start CodeBlocks, it shows the splash screen, ask to choose the default compiler and freezes in minimized state :( . When I click on the taskbar it doesn't maximize. So I used the task managerto maximized it, and I see that it loaded the last project (CodeBlocks-wx2.6.0.cbp) - RC2, but everything is freezed.
  I'm still able to start CodeBlocks using the official binary package(RC1-1) downloaded from SourceForge, but it doesn't load any project.
Where is stored the last project that should be loaded at startup ?

OS: WinXP

Note: I'm talking about CodeBlocks RC2 compiled with wxWidgets 2.6.1.
« Last Edit: October 10, 2005, 05:29:46 pm by adorlith »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: CodeBlocks freezes during startup.
« Reply #1 on: October 10, 2005, 05:29:59 pm »
...  I'm still able to start CodeBlocks using the official binary package(RC1-1) downloaded from SourceForge, but it doesn't load any project.
there was a change in the project file (*.cbp) format
notice the "::" between "Code" and "Blocks"

CodeBlocks RC1 *.cbp format
Code
<?xml version="1.0"?>
<!DOCTYPE Code::Blocks_project_file>
<Code::Blocks_project_file>
    ...
</Code::Blocks_project_file>


CodeBlocks actual CVS version *.cbp format
Code
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_project_file>
<CodeBlocks_project_file>
    ...
</CodeBlocks_project_file>


if you open an old (<=RC1) project file with a new (CVS) version of Codeblocks,
then the project file is updated to the new format
and the old (<=RC1) Codeblocks cannot read the new project file format.

if you want to open this project with CB-RC1, you have to edit the project file by hand

replace
Code
CodeBlocks_project_file
with
Code
Code::Blocks_project_file


Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: CodeBlocks freezes during startup.
« Reply #2 on: October 10, 2005, 05:42:17 pm »
...Note: I'm talking about CodeBlocks RC2 compiled with wxWidgets 2.6.1.

btw: i'm using the same wxWidgets version as you and never had a freeze  :?
strange - but i have read elsewhere from that freezing too

you could try to start CodeBlocks (RC2) with the following commandline:

Code
<Path_to_Codeblocks>\codeblocks --clear-configuration

and look, if you get the freeze afterwards too.

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #3 on: October 10, 2005, 05:53:13 pm »
Is not that the problem. I'm using CB RC2 and the project file I used last time is CodeBlocks-wx2.6.0.cbp from the RC2, so there's no incompatibility.
 I renamed the project so CB cannot find it, but it still freezes. I maximize it using the task manager and I see it shows the start page. The last message is:
"Found 9 plugins: AStylePlugin..... WindowsXPLookNFeel"
 Should be any other messages written following this one during a normal startup ? A never paid attention to the startup messages.

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #4 on: October 10, 2005, 05:57:01 pm »
...Note: I'm talking about CodeBlocks RC2 compiled with wxWidgets 2.6.1.

btw: i'm using the same wxWidgets version as you and never had a freeze  :?
strange - but i have read elsewhere from that freezing too

you could try to start CodeBlocks (RC2) with the following commandline:

Code
<Path_to_Codeblocks>\codeblocks --clear-configuration

and look, if you get the freeze afterwards too.


I cleared the config but it still freezes showing the Start here page.

Everything went ok the previous days, I compiled some wxWidgets test app. Strange :(

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: CodeBlocks freezes during startup.
« Reply #5 on: October 10, 2005, 05:58:15 pm »
adorlith:

:D *THANK YOU!!!!* :D

I've been having  this freeze and nobody seemed to reproduce it. At least we're two now.

Some questions:

* In Settings, Plugins, Code Completion, what is your setup? Do you have the "improved stability" flag checked?
* Is the "show progress dialog on parsing" (or something) checked?
* have you tried deleting the .cbCache files on your project's directory?

It seems that the freeze only occurs when loading the parser cache. Try opening a .c or .cpp file with codeblocks (by double clicking) and then close the file, save the workspace. This will prevent project loading.

Then, switch the information pane to "Codeblocks debug" or "Application debug log" (what was the name?). It gives more info than the default "codeblocks" tab.

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #6 on: October 10, 2005, 06:33:37 pm »
* In Settings, Plugins, Code Completion, what is your setup? Do you have the "improved stability" flag checked?

I remember that I didn't check the flag. And now I cannot check it anymore since the CB freezes.

Quote
* Is the "show progress dialog on parsing" (or something) checked?

I don't know :(

Quote
* have you tried deleting the .cbCache files on your project's directory?

no


Quote
It seems that the freeze only occurs when loading the parser cache. Try opening a .c or .cpp file with codeblocks (by double clicking) and then close the file, save the workspace. This will prevent project loading.

I tried, but it still loads the project file and freezes after. I renamed the project directory, so now it cannot find the project file, and now it freezes showing the start page. :)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: CodeBlocks freezes during startup.
« Reply #7 on: October 10, 2005, 06:58:08 pm »
OK...

time for REGEDIT! :D

from windows, run: "regedit". Then search for HKEY_CURRENT_USER, Software, Code::Blocks, Code::Blocks v1.0. Please  type in what you read under "code_completion","environment", and "message_manager".

BTW, what color and screen resolution are you using? I'm using 1024x768, 15 bits color.
« Last Edit: October 10, 2005, 07:05:09 pm by rickg22 »

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #8 on: October 10, 2005, 07:22:00 pm »
OK...

time for REGEDIT! :D

from windows, run: "regedit". Then search for HKEY_CURRENT_USER, Software, Code::Blocks, Code::Blocks v1.0. Please  type in what you read under "code_completion","environment", and "message_manager".

BTW, what color and screen resolution are you using? I'm using 1024x768, 15 bits color.

There's no "code_completion" section.
The "safe_but_slow" value was set to 0, I set to 1 but no luck.

[attachment deleted by admin]

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #9 on: October 10, 2005, 07:27:25 pm »

BTW, what color and screen resolution are you using? I'm using 1024x768, 15 bits color.

1024x768, 32 bits color.

Do you think there's any hidden code that checks for screen resolution and freezes the program for poor programmers using less than 1200x1024 ?  :lol:

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: CodeBlocks freezes during startup.
« Reply #10 on: October 10, 2005, 07:42:22 pm »
I supposed it *might* be a bug in wxwidgets regarding dialogs with 15bits color resolution, but it seems not.

Oh yeah. Mind posting a screenshot of the frozen C::B? And a try including the CPU usage (press ctrl-alt-del) so we can see the tasks.

Finally, as a workaround, try setting the blank_workspace to 1 and see if it doesn't freeze now.
« Last Edit: October 10, 2005, 07:45:31 pm by rickg22 »

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #11 on: October 10, 2005, 08:17:58 pm »
 No luck with blank_workspace.

[attachment deleted by admin]

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: CodeBlocks freezes during startup.
« Reply #12 on: October 10, 2005, 08:21:27 pm »
WEIRD! VERY WEIRD! It doesn't seem like it froze at all to me...

In the freeze that I experience, nothing is shown, just a white blank window. (This is getting more creepy everytime)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: CodeBlocks freezes during startup.
« Reply #13 on: October 10, 2005, 08:32:19 pm »
If you're looking for more startup freeze experiences, it's happening for me as well.

The symptoms:
1. codeblocks.exe is run.
2. The compiler auto-detection window appears. I click Close.
3. Nothing happens
4. Code::Blocks v1.0 appears on the taskbar, but clicking it does not bring it up and right-clicking has no effect
5. It appears as "Running" in the Applications tab of the Task Manager, with 00 CPU usage and about 14,900 k mem usage
6. It can be "artificially" shown by right-clicking in the Applications tab of the Task Manager and choosing "Maximize". The main window appears mostly as normal; however, it does not respond to anything.

My screenshots would be basically identical to adorlith's.

I conjecture it's freezing/pausing somewhere in wxWidgets. I'll try running it in GDB to find out where shortly.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #14 on: October 11, 2005, 02:24:48 pm »
  Here's the stack:
....................................................................................................................
(gdb) attach 7588                                                               
Attaching to program `D:\Utils\CodeBlocksRC2_debug\codeblocks.exe', process 7588
                                                                               
[Switching to thread 7588.0x145c]                                               
(gdb) where                                                                     
#0  0x7c901231 in wxscintilla_dll_iname ()                                     
#1  0x7c9507a8 in wxscintilla_dll_iname ()                                     
(gdb)                                                                           
.....................................................................................................................

Am I missing something ? I was expecting to see more function calls.

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #15 on: October 11, 2005, 04:30:49 pm »
 Step by step debug:

CodeBlocks compiled with wxWidgets 2.6.2
...........................................................
(gdb) step                                                                     
59      in ../../runtime/gccmain.c                                             
(gdb)                                                                           
_GLOBAL__I__ZN12wxExSplitter12ms_classInfoE ()                                 
    at src/wxDockit/src/generic/exsplitter.cpp:107                             
107                 if ((pos.x < boundary[0].x) ||                             
Current language:  auto; currently c++                                         
(gdb) step                                                                     
__static_initialization_and_destruction_0(int, int) (__initialize_p=1,         
    __priority=65535) at src/wxDockit/src/generic/exsplitter.cpp:22             
22      IMPLEMENT_CLASS( wxExSplitter, wxWindow )                               
(gdb) step                                                                     
wxClassInfo::wxClassInfo(char const*, wxClassInfo const*, wxClassInfo const*, in
t, wxObject* (*)()) (this=0x4937c0, className=0x489011 "wxExSplitter",         
    baseInfo1=0x10550f90, baseInfo2=0x0, size=496, ctor=0)                     
    at D:/Work/wxWidgets-2.6.2/include/wx/object.h:74                           
74              {                                                               
(gdb)                                                                           
75                  sm_first = this;                                           
(gdb)                                                                           
76                  Register();                                                 
(gdb)                                                                           
                                                                               
Program received signal SIGILL, Illegal instruction.                           
0x100594f5 in wxClassInfo::Register() ()                                       
    at sdk/wxscintilla/src/scintilla/src/LexPerl.cxx:464                       
464                                                     while (bk > 0 && styler.
StyleAt(bk) == SCE_PL_IDENTIFIER) {                                             
(gdb) where                                                                     
#0  0x100594f5 in wxClassInfo::Register() ()                                   
    at sdk/wxscintilla/src/scintilla/src/LexPerl.cxx:464                       
#1  0xffffffff in ?? ()                                                         
#2  0x0044b123 in wxClassInfo::wxClassInfo(char const*, wxClassInfo const*, wxCl
assInfo const*, int, wxObject* (*)()) (this=0x4937c0,                           
    className=0x489011 "wxExSplitter", baseInfo1=0x10550f90, baseInfo2=0x0,     
    size=496, ctor=0) at D:/Work/wxWidgets-2.6.2/include/wx/object.h:76         
#3  0x004372d7 in __static_initialization_and_destruction_0(int, int) (         
    __initialize_p=1, __priority=65535)                                         
    at src/wxDockit/src/generic/exsplitter.cpp:22                               
#4  0x0043751a in _GLOBAL__I__ZN12wxExSplitter12ms_classInfoE ()               
    at src/wxDockit/src/generic/exsplitter.cpp:107                             
#5  0x004465f7 in __do_global_ctors () at ../../runtime/gccmain.c:59           
#6  0x00446459 in main (argc=1, argv=0x156bcf8, __p__environ=0x3e2a08)         
    at ../../runtime/main.c:24                                                 
(gdb)         
............................................................

CodeBlocks compiled with wxWidgets 2.6.1

............................................................
(gdb)                                                                   
Single stepping until exit from function _Z7wxEntryP11HINSTANCE__S0_Pci,
which has no line number information.                                   
                                                                         
Program received signal SIGSEGV, Segmentation fault.                     
0x10060575 in wxArrayString::Init(bool) ()                               
    at sdk/wxscintilla/src/scintilla/src/LexSmalltalk.cxx:222           
222             ident[il++] = static_cast<char>(sc.chNext);             
(gdb) where                                                             
#0  0x10060575 in wxArrayString::Init(bool) ()                           
    at sdk/wxscintilla/src/scintilla/src/LexSmalltalk.cxx:222           
#1  0x0022fed8 in ?? ()                                                 
#2  0x100b07c0 in wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int) ()     
#3  0x004013da in WinMain (hInstance=0x400000, hPrevInstance=0x0,       
    lpCmdLine=0x251f10 "", nCmdShow=10) at src/app.cpp:297               
#4  0x00446538 in main (argc=1, argv=0x14db6a0, __p__environ=0x3e2a08)   
    at ../../runtime/main.c:73                                           
(gdb)                                                                   
................................................................................................................

There  are different lines where it crashes, but both are from wxscintilla module.
         

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #16 on: October 11, 2005, 04:33:59 pm »
 I tried once again to debug and now I get a different file where it crashes:

Program received signal SIGSEGV, Segmentation fault.                           
0x10041e32 in wxHashTable::MakeKey(char const*) const ()                       
    at sdk/wxscintilla/src/scintilla/src/LexForth.cxx:136                       
136                 styler.ColourTo(pos1,SCE_FORTH_COMMENT);                   
(gdb) where                                                                     
#0  0x10041e32 in wxHashTable::MakeKey(char const*) const ()                   
    at sdk/wxscintilla/src/scintilla/src/LexForth.cxx:136                       
#1  0xb8fd2200 in ?? ()                                                         
#2  0x10041ea0 in wxHashTable::Put(char const*, wxObject*) ()                   
    at sdk/wxscintilla/src/scintilla/src/LexForth.cxx:139                       
#3  0x10058fb9 in wxClassInfo::Register() ()                                   
    at sdk/wxscintilla/src/scintilla/src/LexPerl.cxx:353                       
#4  0x0044b113 in wxClassInfo::wxClassInfo(char const*, wxClassInfo const*, wxCl
assInfo const*, int, wxObject* (*)()) (this=0x4937c0,                           
    className=0x489011 "wxExSplitter", baseInfo1=0x10541f40, baseInfo2=0x0,     
    size=496, ctor=0) at D:/Work/wxWidgets-2.6.1/include/wx/object.h:76         
#5  0x004372d7 in __static_initialization_and_destruction_0(int, int) (         
    __initialize_p=1, __priority=65535)                                         
    at src/wxDockit/src/generic/exsplitter.cpp:22                               
#6  0x0043751a in _GLOBAL__I__ZN12wxExSplitter12ms_classInfoE ()               
    at src/wxDockit/src/generic/exsplitter.cpp:107                             
#7  0x004465e7 in __do_global_ctors () at ../../runtime/gccmain.c:59           
#8  0x00446449 in main (argc=1, argv=0x14db6a0, __p__environ=0x3e2a08)         
    at ../../runtime/main.c:24                                                 
(gdb)                                                                           

Very strange !

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #17 on: October 13, 2005, 11:08:52 am »
  I created a new user on my XP machine and run the CB under the new user. It works ! :?:
  I'm a unix programmer, so maybe the windows guy have any hints about this.  Thanks.

takeshimiya

  • Guest
Re: CodeBlocks freezes during startup.
« Reply #18 on: October 13, 2005, 02:13:21 pm »
Just to be sure, did you memtested recently your ram?

I often had very strange random problems, and it was a DDR module failure, those hardware problems are the worst.

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #19 on: October 13, 2005, 03:02:29 pm »
  I'm using a Dell Inspiron 510 laptop, I never had any problem other than this. Which is not a problem by itself, but due to OS, I presume.

takeshimiya

  • Guest
Re: CodeBlocks freezes during startup.
« Reply #20 on: October 13, 2005, 03:09:21 pm »
I recall that in my pc that had defective ram, on windows behave strangely, hanging some apps, corrupting some data, but on slackware, for some reason, none of that ocurred.

But anyways, it's very strange the fact that the problem wasn't gone away with --clear-configuration, but with creating another user :shock:

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: CodeBlocks freezes during startup.
« Reply #21 on: October 13, 2005, 08:58:33 pm »
In case anyone's interested, I've been debugging on my spare time (not much the past couple of days), and have so far traced a freeze point to within ShowTips(). (I had to leave my home PC for work just now or I'd have taken it further, sorry.)
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #22 on: October 13, 2005, 11:52:08 pm »
 Yes, it's working  :D !!! I've regedit-ed the show_tips value to 0, and it doesn't freeze anymore. I stil don't understand what happens  :?.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: CodeBlocks freezes during startup.
« Reply #23 on: October 14, 2005, 05:19:09 am »
Lately I've been experiencing a weird behavior. Sometimes the screen freezes using 0% CPU on exit.

I have to right click on the taskbar several times until i get a dialog that says: "Workspace has been modified. Save?" Then I choose no. Anyway it hasn't appeared anymore since i fixed a last line related to the 99%-CPU freeze i mentioned earlier.

Anyway, try doing the right-click trick if you have the showtips enabled. Oh, yeah. Download from CVS first :-P parser.cpp, nativeparser.cpp and cbthreadpool.cpp have changed. If your CVS doesn't update them, you might have to wait until the anonymous CVS is refreshed. It may take a few hours.

Offline adorlith

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: CodeBlocks freezes during startup.
« Reply #24 on: October 17, 2005, 01:35:59 pm »
 I've downloaded the HEAD and it works. But now it works also the version that didn't work before.