Author Topic: Build Toolbar dead  (Read 3955 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Build Toolbar dead
« on: November 10, 2005, 04:53:37 pm »
Help please,

The build section of the toolbar stopped functioning for me. The section to the left of the build section works fine, ie. "new project" through "replace". Everything to the right is dead.
What did I do?

So... I uninstalled C::B, used regcrawler to remove all footprints
of "codeblocks" and "Code::blocks" from the registry. then
re-installed a fresh distribution of C::B rc2-mingw.

Then I used the wizard to generate a console app. The build/run/debug section
of the toolbar is still dead. It doesnt even show the bubble tips.

How do I get it back??

thanks
Pecan

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Build Toolbar dead
« Reply #1 on: November 10, 2005, 04:56:48 pm »
Almost all problems with the toolbar like the one you state are due to a corrupt .cb_layout.bin file (found in your home folder). This may get corrupted when the app crashes.
Delete that, and try again.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Build Toolbar dead
« Reply #2 on: November 10, 2005, 05:00:40 pm »
Thanks thomas,

That was it. Guess my asm("int3")'s finally bit me in the ass.

thanks
Pecan

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Build Toolbar dead
« Reply #3 on: November 10, 2005, 06:12:59 pm »
This is a deja vu ~ common problem.


There is a way of preventing the corruption of the wxDockIt layout?

It seems to me that the .cb_layout.bin gets corrupted when exiting C::B (and C::B crashed) while the layout was saving to disk.

Can something like this be done?:
Code: [Select]
Exit()
{
    bool saved_ok = wxDockItSaveFile(".cb_layout.bin.temp");

    if(saved_ok)
        OperatingSystemMoveFile(".cb_layout.bin.temp", ".cb_layout.bin");
    else
        Print("Something gone wrong, so better we don't replace the previous .cb_layout.bin");
}


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Build Toolbar dead
« Reply #4 on: November 10, 2005, 07:15:52 pm »
Technically yes, there is even a dedicated wxWindows class to do this (wxTempFile).

However, this change does not make much sense now, since .cb_layout.bin will 99% likely no longer exist after next week.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

  • Guest
Re: Build Toolbar dead
« Reply #5 on: November 11, 2005, 12:11:21 am »
Technically yes, there is even a dedicated wxWindows class to do this (wxTempFile).

However, this change does not make much sense now, since .cb_layout.bin will 99% likely no longer exist after next week.

Thats good to know.  8)

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Build Toolbar dead
« Reply #6 on: November 11, 2005, 10:38:07 am »
Great! :D

Where it'll be stored?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Build Toolbar dead
« Reply #7 on: November 11, 2005, 11:11:44 am »

You didn't see anything!
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Build Toolbar dead
« Reply #8 on: November 11, 2005, 10:40:16 pm »
eh? O.o

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Build Toolbar dead
« Reply #9 on: November 11, 2005, 10:42:05 pm »
me neither o_O