Author Topic: The 25 August 2012 build (8248) is out.  (Read 171885 times)

stefanos_

  • Guest
Re: The 25 August 2012 build (8248) is out.
« Reply #30 on: September 01, 2012, 03:07:48 pm »
@jens: I have compiled svn-8322 on Debian wheezy (32-bit) and crashed upon closing a project. I did not compile it with 2.9.x as I said I would, but decided to do the standard compilation process for now. I have attached the crash report and i hope it helps a bit.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 25 August 2012 build (8248) is out.
« Reply #31 on: September 01, 2012, 03:27:12 pm »
@jens: I have compiled svn-8322 on Debian wheezy (32-bit) and crashed upon closing a project. I did not compile it with 2.9.x as I said I would, but decided to do the standard compilation process for now. I have attached the crash report and i hope it helps a bit.
I see no stack info in the crash report. :)
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.

stefanos_

  • Guest
Re: The 25 August 2012 build (8248) is out.
« Reply #32 on: September 01, 2012, 03:33:40 pm »
well, whatever the system generated, i copied it and pasted it in a .txt file and attached it here. also, as i have already stated in a previous comment, when Code::Blocks is crashing on a UNIX-like environment, it would be nice to let user save the report somewhere and not place it in tmp directory which gets deleted upon Code::Blocks's closing.

It sounds silly isn't it? Strange, but now I see a generated folder with dbgrpt name and timestamp that has the codeblocks.xml file in it.
« Last Edit: September 01, 2012, 03:37:00 pm by stefanos_ »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 25 August 2012 build (8248) is out.
« Reply #33 on: September 01, 2012, 03:40:00 pm »
greetings everyone.

I have built svn-8251, and when I right-click on a Headers / Sources sub-folder in Manager to remove files, it crashes.

Below you can find as an attachment the crash report.

System Specs:

OS = Windows XP SP3 [32-bit]
Compiler: TDM's GCC (the latest available)
wxWidgets = 2.8.10
I'm not sure which c::b did you run? To catch the bug, I suggest you can run the c::b under devel folder, because it has debug information there, so when it crashes, it will have file and line info in the backtrace report. :)
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: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 25 August 2012 build (8248) is out.
« Reply #34 on: September 01, 2012, 04:37:21 pm »
Sure thing, it's really a very simple test though, the entire test project that works as a test case consists of one file which is as follows:

Code
#include <iostream>

using namespace std;

int main()
{
    string s = "Test";
    cout << s << endl;
    return 0;
}

The breakpoint is set on the "cout << s << endl" line. I think it most surely is a gcc/gdb/mingw issue though, cause 4.6.1 works fine and 4.7.1 doesn't. I have, in addition to everything else, made double sure that I'm generating debugging symbols and that no optimizations are set, so it looks like a bug in gcc/gdb... Thanks for your desire to look into it!


I found the reason from gdb IRC, see below:
Quote
   ollydbg   I have a problem under windows: gcc 4.7.x gdb-cvs, when try to show a std::string, I enter the command: output s.c_str(), but gdb response: Cannot evaluate function -- may be inlined
   ollydbg   what cause this kind of problem? thanks
   ollydbg   For the record, if gcc 4.6.x does not have such issue.
   jankratochvil   Try to use this function in the program, be sure to use -O0 -g (and not -O2 -g) and try -fkeep-inline-functions.
   ollydbg   OK, I will try this soon
   ollydbg   Hi, jan, thanks, it works.
   ollydbg   In-fact, I'm forum Code::blocks forum, we use such script to show the std::string value: output s.c_str()[0]@s.size()
   ollydbg   But, if the user does not expicit call the c_str() and size() in there code, gdb will report failure in running such script.
   ollydbg   That's strange, does gcc changed something?
   ollydbg   BTW: If I enable the python pretty printer, then I have no such issue, the str::string's content shown correctly either under gcc 4.7.x or gcc 4.6.x
   jankratochvil   Newer gcc has more optimizations, it has the right to do these optimizations. And sure Pretty Printers do not depend on inferior function calls, so that Pretty Printers can work also on core files.
   ollydbg   Ok, thanks, I will forward your explanation to Code::blocks forum, many thanks.
   ollydbg   So, it looks like gdb pretty-printer is the most suggest way to show std::string like contents, other gdb script are not suggest because they will cause such issue.


So, I suggest you can use gdb python pretty printer to show the value, they work OK with gcc 4.6.x and 4.7.x.


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.

stefanos_

  • Guest
Re: The 25 August 2012 build (8248) is out.
« Reply #35 on: September 01, 2012, 05:36:18 pm »
greetings everyone.

I have built svn-8251, and when I right-click on a Headers / Sources sub-folder in Manager to remove files, it crashes.

Below you can find as an attachment the crash report.

System Specs:

OS = Windows XP SP3 [32-bit]
Compiler: TDM's GCC (the latest available)
wxWidgets = 2.8.10
I'm not sure which c::b did you run? To catch the bug, I suggest you can run the c::b under devel folder, because it has debug information there, so when it crashes, it will have file and line info in the backtrace report. :)

ollydbg you must have confused my posts :) you commented for Debian wheezy issue on my Windows XP's post :D anyhow, i will try your suggestion on Monday when I will get back to work for I use Debian at home exclusively.

Offline Agetian

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: The 25 August 2012 build (8248) is out.
« Reply #36 on: September 01, 2012, 06:55:10 pm »
I found the reason from gdb IRC, see below:
Quote
   ollydbg   I have a problem under windows: gcc 4.7.x gdb-cvs, when try to show a std::string, I enter the command: output s.c_str(), but gdb response: Cannot evaluate function -- may be inlined
   ollydbg   what cause this kind of problem? thanks
   ollydbg   For the record, if gcc 4.6.x does not have such issue.
   jankratochvil   Try to use this function in the program, be sure to use -O0 -g (and not -O2 -g) and try -fkeep-inline-functions.
   ollydbg   OK, I will try this soon
   ollydbg   Hi, jan, thanks, it works.
   ollydbg   In-fact, I'm forum Code::blocks forum, we use such script to show the std::string value: output s.c_str()[0]@s.size()
   ollydbg   But, if the user does not expicit call the c_str() and size() in there code, gdb will report failure in running such script.
   ollydbg   That's strange, does gcc changed something?
   ollydbg   BTW: If I enable the python pretty printer, then I have no such issue, the str::string's content shown correctly either under gcc 4.7.x or gcc 4.6.x
   jankratochvil   Newer gcc has more optimizations, it has the right to do these optimizations. And sure Pretty Printers do not depend on inferior function calls, so that Pretty Printers can work also on core files.
   ollydbg   Ok, thanks, I will forward your explanation to Code::blocks forum, many thanks.
   ollydbg   So, it looks like gdb pretty-printer is the most suggest way to show std::string like contents, other gdb script are not suggest because they will cause such issue.

So, I suggest you can use gdb python pretty printer to show the value, they work OK with gcc 4.6.x and 4.7.x.

Oh, thanks a lot for sorting this out, I'll try it out!
EDIT: Tried this out and it works perfectly! Thanks again! :)
« Last Edit: September 01, 2012, 08:03:24 pm by Agetian »

stefanos_

  • Guest
Re: The 25 August 2012 build (8248) is out.
« Reply #37 on: September 01, 2012, 10:34:07 pm »
new awkward situation with svn-8322, Debian wheezy. On "Logs & Others", I right-clicked on a line from "Build Messages", select one of the options, or press the escape button, click anywhere with the mouse, it re-pops up the . Is that behavior normal? No it's not :)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 25 August 2012 build (8248) is out.
« Reply #38 on: September 01, 2012, 11:21:15 pm »
new awkward situation with svn-8322, Debian wheezy. On "Logs & Others", I right-clicked on a line from "Build Messages", select one of the options, or press the escape button, click anywhere with the mouse, it re-pops up the . Is that behavior normal? No it's not :)
It is not normal, but it is not a new problem.
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: The 25 August 2012 build (8248) is out.
« Reply #39 on: September 02, 2012, 09:56:36 am »
new awkward situation with svn-8322, Debian wheezy.
This seems a Linux only problem. On Windows it works as expected. Maybe a wx issue, not a C::B one.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline raynebc

  • Almost regular
  • **
  • Posts: 217
Re: The 25 August 2012 build (8248) is out.
« Reply #40 on: September 04, 2012, 02:59:30 am »
When I ran the cppcheck plugin, the results showed the too many #ifdef message.  Where is it I go to configure the plugin as it is used in C::B?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: The 25 August 2012 build (8248) is out.
« Reply #41 on: September 04, 2012, 07:59:38 am »
Where is it I go to configure the plugin as it is used in C::B?
Settings -> Environment -> CppCheck.

If that is not available for you, you need a more recent / next nightly. This was added just recently.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline raynebc

  • Almost regular
  • **
  • Posts: 217
Re: The 25 August 2012 build (8248) is out.
« Reply #42 on: September 04, 2012, 08:53:57 am »
Thank you, I was able to find it and configured it to suppress some checks I don't care about.

Offline BrianSidebotham

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: The 25 August 2012 build (8248) is out.
« Reply #43 on: September 04, 2012, 04:48:52 pm »
Since a few nightlies ago (I'm not sure how long this has been present) processing of #if statements appears to be inverted when using equality.

The following works fine:
Code
#if 0
dont_do_this();
#endif

But the following highlights the code not being compiled:
Code
#define OPT1    1
#define OPT2    2
#define OPTION  OPT1

#if OPTION == OPT1
    option1();
#else
    dont_process_me();
#endif

On Windows XP SP3 - SVN 8248 (This nightly)

Hopefully it's a quick fix. Thanks for keeping up the good work guys, I'm using Code::Blocks every day at work for some decent size codebases. Thanks! :D

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 25 August 2012 build (8248) is out.
« Reply #44 on: September 06, 2012, 03:26:57 pm »
Any one see this kind of problem? (vertical horizontal scroll bar does not shown correctly)
see image below:
« Last Edit: September 11, 2012, 09:54:18 am by ollydbg »
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.