Author Topic: The 27 October 2014 build (10016) is out.  (Read 78361 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 27 October 2014 build (10016) is out.
« Reply #45 on: November 17, 2014, 11:39:39 pm »
Khram: Please try to describe the problem with more details, so we can try to solve it. Steps to reprocude, OS? Does it happen with the previous nightly?
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 27 October 2014 build (10016) is out.
« Reply #46 on: November 18, 2014, 01:28:04 am »
Debugged a while, I found the reason why this bug happens, but I don't have a clean way to fix this issue.
See, the CC setting was stored in configure file.
When C::B start up, CC will create a default parser object called "temp parser".
When a parser object is created, it will copy the settings(such as the "Case sensitive matches") from the configure file to its own member variable.
When you open the CC dialog, the active parser object's setting will be modified also the CC related setting in configure files will get updated. This means, the configure file contains the active parser's settings.

When a CB project loaded, a new parser object(we call "new parser" here) is created and activated. So far, so good. When you changed the CC setting, both the "new parser"'s setting and the configure file get updated.

The issue comes when you close C::B, which means, you need to
1, destroy "new parser"
2, destroy "temp parser"

When destroy "new parser", all its setting was saved, but after that, the active parser switches to "temp parser", the setting in "temp parser" was active, and finally the "temp parser" get destroyed, its setting was saved (not the "new parser"), so your setting was lost!

I have not a good idea to fix this issue. Say, we have a setting shared by several parser objects. But they may be different, but the last destroyed parser's setting will be saved to the configure file.
Any plans to fix this issue? If not please say so, so I can take a look at it ...  it is quite annoying...
I know it's annoying. As a workaround, you can just open C::B (without any project opened), and open the setting dialog for CodeCompletion, then close C::B, all the settings should be saved.

If you do want to forbid the setting saving of the "temp parser", you can just add an parameter of the Parser's constructor, say
Code
Parser::Parser(....., bool saveSetting = true)
{
...
}

And create a temp parser in the code
Code
m_TempParser = new Parser(this, nullptr, false); // the last parameter means we don't want to save the setting of this temp parser

But note that this still break something, such as the workaround I said before.
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 Manolo

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: The 27 October 2014 build (10016) is out.
« Reply #47 on: November 18, 2014, 06:56:45 pm »
Hi
Something has gone wrong in my CB svn 10032 (Ubuntu 14.04 64bits) with the watches window:
'tmpv' is a double and it'a shown OK.
'float3' is defined in the previous line to the breakpoint as
Code
float float3[3] = {0, -1.5, 8.3};
As you can see every value != 0 is splitted into two lines: the integer and the decimal parts.

Would this issue be related to localization? (I'm at Spain) It does not happen in Windows 8.1

THX

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 27 October 2014 build (10016) is out.
« Reply #48 on: November 18, 2014, 07:47:28 pm »
Manolo: Can you post the full log from the debugger?
(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 Manolo

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: The 27 October 2014 build (10016) is out.
« Reply #49 on: November 18, 2014, 08:00:35 pm »
I have created a new console project with this code:
Code
#include <iostream>

using namespace std;

int main()
{
    float float3[3] = {0, -1.5, 8.3};
    cout << "Hello world!" << endl;
    return float3[0] ? 0 : 1;
}
Put a breakpoint at "cout <<..." line. The behaviour for the watches window is still broken.

Here is the full debugger log:
Code
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /home/manolo/PROGS/ConsoleMinimal/
Adding source dir: /home/manolo/PROGS/ConsoleMinimal/
Adding file: /home/manolo/PROGS/ConsoleMinimal/bin/Debug/ConsoleMinimal
Changing directory to: /home/manolo/PROGS/ConsoleMinimal/.
Set variable: LD_LIBRARY_PATH=.:/usr/lib32

[debug]Command-line: /usr/bin/gdb -nx -fullname -quiet  -args /home/manolo/PROGS/ConsoleMinimal/bin/Debug/ConsoleMinimal
[debug]Working dir : /home/manolo/PROGS/ConsoleMinimal

Starting debugger: /usr/bin/gdb -nx -fullname -quiet  -args /home/manolo/PROGS/ConsoleMinimal/bin/Debug/ConsoleMinimal
done

[debug]Leyendo símbolos desde /home/manolo/PROGS/ConsoleMinimal/bin/Debug/ConsoleMinimal...
[debug]hecho.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
[debug]Copyright (C) 2014 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-linux-gnu".
[debug]Type "show configuration" for configuration details.
[debug]Para las instrucciones de informe de errores, vea:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Punto de captura 1 (lanzar)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /home/manolo/PROGS/ConsoleMinimal/
[debug]Source directories searched: /home/manolo/PROGS/ConsoleMinimal:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "/home/manolo/PROGS/ConsoleMinimal/main.cpp:8"
[debug]Punto de interrupción 2 at 0x400880: file /home/manolo/PROGS/ConsoleMinimal/main.cpp, line 8.
[debug]>>>>>>cb_gdb:

Punto de interrupción 2 at 0x400880: file /home/manolo/PROGS/ConsoleMinimal/main.cpp, line 8.

[debug]Using terminal's PID as console PID 13970, TTY /dev/pts/11
[debug]> tty /dev/pts/11
[debug]Queued:[tty /dev/pts/11]
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /home/manolo/PROGS/ConsoleMinimal/bin/Debug/ConsoleMinimal
[debug]Breakpoint 2, main () at /home/manolo/PROGS/ConsoleMinimal/main.cpp:8
[debug]/home/manolo/PROGS/ConsoleMinimal/main.cpp:8:94:beg:0x400880
[debug]>>>>>>cb_gdb:

At /home/manolo/PROGS/ConsoleMinimal/main.cpp:8

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 27 October 2014 build (10016) is out.
« Reply #50 on: November 18, 2014, 09:20:40 pm »
Hm, does this happen you start C::B from console like LC_ALL=C codeblocks?
C::B parses the output of the debugger, so a localized gdb is expected to break pretty badly.
(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 Manolo

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: The 27 October 2014 build (10016) is out.
« Reply #51 on: November 18, 2014, 09:49:26 pm »
Starting C:B from a terminal with command "LC_ALL=C codeblocks" does not show the issue.
So, it seems it's a gdb localized problem.

I haven't changed anything, just used gdb as it is right after installing it.
Should I change it or would C:B be aware of it?

THX

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 27 October 2014 build (10016) is out.
« Reply #52 on: November 18, 2014, 09:54:47 pm »
@Jens: Any idea how do we solve this same problem for the compiler? I've tried to search for locale setting code, but I couldn't find any.
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: The 27 October 2014 build (10016) is out.
« Reply #53 on: November 18, 2014, 10:10:41 pm »
For the compiler I added LC_ALL with the value C to "Settings -> Environment... -> Environment variables".
This might (hopefully) also work for gdb.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 27 October 2014 build (10016) is out.
« Reply #54 on: November 18, 2014, 10:37:02 pm »
Are you adding this manually?
(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 Manolo

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: The 27 October 2014 build (10016) is out.
« Reply #55 on: November 18, 2014, 11:16:11 pm »
Quote
For the compiler I added LC_ALL with the value C to "Settings -> Environment... -> Environment variables".
This might (hopefully) also work for gdb.
Doing this manually works for me.
Thank you for showing this easy solution.

ca1e

  • Guest
Re: The 27 October 2014 build (10016) is out.
« Reply #56 on: November 02, 2019, 07:39:33 am »
My keyboard shortcuts for 'debugging windows' (namely 'alt-shift-x' where x is a digit between 0 and 9) doesn't work after I load a project. Although they are unchanged in the 'cbKeyBinder10.ini', they are not listed in settings->editor->keyboard shortcuts-> corresponding entries nor do they work. Even when I load a modified codeblocks.cbp project file, 'cbKeyBinder10.ini' changes with all the targets added to the file and 'debugging windows' shortcuts gone. I attached a zip containing 2 'cbkeybinder10.ini' files, one before any project loaded and one after codeblocks.cbp loaded. Also what is the .bak file used for?

Btw is there a way to prevent editor from editing while debugging? I often find myself trying to edit the code during a debugging session which is very frustrating. ;)

Win7 x64 SP1

fyi..
5 years later this bug persists.

i see one other post on the forum about this bug, from this same user.

is there a fix?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 27 October 2014 build (10016) is out.
« Reply #57 on: November 02, 2019, 11:09:11 am »
ca1e: The quote contains two requests. Which one is bothering you?
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2769
Re: The 27 October 2014 build (10016) is out.
« Reply #58 on: November 02, 2019, 07:33:48 pm »
@ca1e: cbKeyBinder10.ini is not used by any current nightly. cbKeyBinder10.ini is only referenced to save previous versions of CB key bindings when needed.

Also, I cannot reproduce the described problem. I have no problem using Alt-Shift-0 thru 9. They work for me.
They also display correctly. See attached image.
« Last Edit: November 02, 2019, 07:42:42 pm by Pecan »

ca1e

  • Guest
Re: The 27 October 2014 build (10016) is out.
« Reply #59 on: November 15, 2019, 05:04:53 am »
i set hotkeys for debugging windows (memory view, registers) so i can toggle these windows on/off when debugging
after closing a workspace and re-opening it, the keys are erased

it would appear only debugging windows hotkeys are affected
« Last Edit: November 15, 2019, 05:16:06 am by ca1e »