Author Topic: Three minor bugs  (Read 6756 times)

Offline shajunxing

  • Multiple posting newcomer
  • *
  • Posts: 25
  • Sorry for my poor English ;)
Three minor bugs
« on: October 31, 2007, 05:12:13 am »
When I first tried CB I deeply loved it and moved all my jobs from fat slow VS.NET to CB. Since I am a teacher of programming, it is my duty to popularize it to my students and report bugs here in order to make CB better and better, I think. :D

I reported a minor bug long ago and to my surprise it was fixed immediately. These days I found some little bugs again. My OS is XP chinese version and I use CB with MinGW. Some times my project's path contains chinese characters. Editing, compiling and linking is OK but while debugging, it will prompt that "xxx/xxx/xxx.c" can not found. It seems that the chinese path can not be recognized. Maybe japanese and korean characters also have this problem. I am not sure whether this problem due to CB or MinGW.

Second bug is about the "Symbol" window. When a project is opened from menu, tool bar or by dragging it to an active CB window, All the symbols are parsed correctly. But when it is opened by dragging it to a CB shortcut, symbols can't be parsed.

Last bug I found is about building. After I changed some positions of source files and pressed "build" button, it should rebuild but actually it only prompted that nothing to be done. I have do delete ".depend" and ".layout" file and rebuild. I checked ".depend" file and found it contained absolute path, not relative path. Is it the reason?

Thanks. :lol:

Offline Morphius Faydal

  • Multiple posting newcomer
  • *
  • Posts: 75
Re: Three minor bugs
« Reply #1 on: October 31, 2007, 05:32:38 am »
I believe the first one will be a bug with GDB not handling CJK languages correctly.

The second; no idea.

The third; none of the source files have actually *changed*.  Your executable would be exactly the same if you moved some of the source around.  If you really want to force a rebuild, go to "Build" --> "Rebuild" or "Rebuild Workspace".  Also; the fourth icon on the compilation toolbar (the button that looks like a little window with two arrows circling round on it), will initiate a complete rebuild.  ALSO! You can hit Ctrl-F11 (assuming you haven't changed keymapping) and that tool will start a rebuild.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Three minor bugs
« Reply #2 on: October 31, 2007, 08:18:11 am »
It seems that the chinese path can not be recognized. Maybe japanese and korean characters also have this problem. I am not sure whether this problem due to CB or MinGW.
As you might know using non-ANSI characters in development projects (for files and /or paths) is usually bad practice. But yes - this is surely a bug. Unfortunately I can't reproduce (obviously). Could you try with a very simple console project (not using C::B) whether it's actually MinGW or C::B, please?

Second bug is about the "Symbol" window.
I will try to reproduce...

I checked ".depend" file and found it contained absolute path, not relative path. Is it the reason?
If you move files without updating the project it won't work and C::B will report exactly what you say. The reason: The files that are not existing anymore cannot be build, files that have been moved keep their date stamp and don't need to be build. So IMHO C::B behaves fully correct. (...or do I miss something...?!)

With regards, Morten.
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 shajunxing

  • Multiple posting newcomer
  • *
  • Posts: 25
  • Sorry for my poor English ;)
Re: Three minor bugs
« Reply #3 on: October 31, 2007, 09:20:37 am »
Thanks, and I'll try it. :P

Offline shajunxing

  • Multiple posting newcomer
  • *
  • Posts: 25
  • Sorry for my poor English ;)
Re: Three minor bugs
« Reply #4 on: October 31, 2007, 09:58:19 am »
I tried GDB and it worked well, see my snapshot. Is it because that GDB uses relative path? Or C::B is using unicode instead of ansi? But as I know that in CJK version windows, disk label and path use ansi code. CJK words just extend ansi and each takes two bytes. :?

[attachment deleted by admin]

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Three minor bugs
« Reply #5 on: October 31, 2007, 10:15:21 am »
In this gdb test of yours, you didn't try to set a breakpoint *inside* gdb (with a path containing Chinese chars)...
You see that's what C::B is trying to do  and gdb responds with failure.
Be patient!
This bug will be fixed soon...

Offline shajunxing

  • Multiple posting newcomer
  • *
  • Posts: 25
  • Sorry for my poor English ;)
Re: Three minor bugs
« Reply #6 on: October 31, 2007, 11:32:53 am »
In this gdb test of yours, you didn't try to set a breakpoint *inside* gdb (with a path containing Chinese chars)...
You see that's what C::B is trying to do  and gdb responds with failure.

Again it works well... It's very simple to take a test. Open "Regional Settings" in the control panel. In the second tab sheet, check "Install files for East Asian languages". In the third tab sheet, change language for non-unicode programs to Chinese (or Japanese and Korean). Reboot and now you can install a Chinese imput method such as "pinyin" and type Chinese characters, or just simply copy characters from web page, or from here: "测试".

I believe once this problem(or other unknown problem about East Asian languages) is resoved, C::B will be much more perfect. :P

[attachment deleted by admin]

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Three minor bugs
« Reply #7 on: October 31, 2007, 12:33:48 pm »
Quote
Again it works well...

No, that's not what I asked. You still didn't pass any Chinese chars yourself to gdb. You just set a breakpoint in the current file.

Do the following:

  • Add a new file in your project, residing in a subdirectory using Chinese characters.
  • Run gdb manually like you did before and try to set a breakpoint on the file in the subdirectory.
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Three minor bugs
« Reply #8 on: October 31, 2007, 12:40:05 pm »
It's very simple to take a test. Open "Regional Settings" in the control panel. In the second tab sheet, check "Install files for East Asian languages". In the third tab sheet, change language for non-unicode programs to Chinese (or Japanese and Korean). Reboot and now you can install a Chinese imput method such as "pinyin" and type Chinese characters, or just simply copy characters from web page, or from here: "测试".

Yes, assuming I use windows at all :).

Anyway, I did test this under linux and works as expected. Try upgrading to a more recent gdb version. 5.2.1 is very old anyway. Try 6.x.


[attachment deleted by admin]
Be patient!
This bug will be fixed soon...

Offline shajunxing

  • Multiple posting newcomer
  • *
  • Posts: 25
  • Sorry for my poor English ;)
Re: Three minor bugs
« Reply #9 on: November 01, 2007, 01:36:38 pm »
Still I can't resovle the problem. I didn't use any chinese characters in the project such as filenames and folders. I know that's a bad habit. :D But you know east asian version windows have some funny characteristics. For example, the desktop's path is "C:\Documents and Settings\Administrator\Desktop" in english version, but in chinese version it is "C:\Documents and Settings\Administrator\桌面". When I demonstrat to my student and create a new project in the desktop, problem occurs. :shock:But Visual C++ works well.

Thank you anyway. I'll try to change my habit, and best wishes to you.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Three minor bugs
« Reply #10 on: November 01, 2007, 02:20:06 pm »
Still I can't resovle the problem. I didn't use any chinese characters in the project such as filenames and folders. I know that's a bad habit. :D But you know east asian version windows have some funny characteristics. For example, the desktop's path is "C:\Documents and Settings\Administrator\Desktop" in english version, but in chinese version it is "C:\Documents and Settings\Administrator\桌面". When I demonstrat to my student and create a new project in the desktop, problem occurs. :shock:But Visual C++ works well.

Thank you anyway. I'll try to change my habit, and best wishes to you.

As I displayed above, it works fine here. Just try upgrading gdb to a newer version.
Be patient!
This bug will be fixed soon...