Code::Blocks Forums

User forums => Nightly builds => Topic started by: killerbot on July 27, 2009, 06:32:49 pm

Title: The 27 July 2009 build (5716) is out.
Post by: killerbot on July 27, 2009, 06:32:49 pm
Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

Before you use a nightly make sure you understand how it works (http://forums.codeblocks.org/index.php/topic,3232.0.html).

A link to the unicode windows wxWidget dll for Code::Blocks : http://prdownload.berlios.de/codeblocks/wxmsw28u_gcc_cb_wx2810.7z

For those who might need this one (when no MingW installed on your system) : the mingw10m.dll : http://prdownload.berlios.de/codeblocks/mingwm10_gcc421.7z

The 27 July 2009 build is out.
  - Windows :
   http://prdownload.berlios.de/codeblocks/CB_20090727_rev5716_win32.7z
  - Linux :
   none

Resolved Fixed:


Regressions/Confirmed/Annoying/Common bugs:


Title: Re: The 27 July 2009 build (5716) is out.
Post by: Xaviou on July 27, 2009, 09:08:31 pm
Ubuntu 8.04 to 9.04 Amd64 tar.gz archive (containing '.deb' installers builds with wx2810) can be found  here (http://www.archive-host.com/compteur.php?url=http://codeblocks.archive-host.com/CB_20090726_802_rev5716_Ubuntu804-904_wx2810_amd64tar.gz) (direct link).
".mo" files for french translation can be founded here (http://www.archive-host.com/compteur.php?url=http://codeblocks.archive-host.com/CB_20090727_rev5716_fr.zip) (see below for installation instructions)
Full Win32 French Version (including wxWidgets and MinGW dlls and french ".mo" files) can be founded here (http://www.archive-host.com/compteur.php?url=http://codeblocks.archive-host.com/CB_20090727_rev5716_win32_fr.7z)

Installing french files:

Regards
Xav'
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on July 28, 2009, 01:11:05 am
Just moved the debian-build on my server (http://apt.jenslody.de/) (see signature) into the repo.

They are build on lenny-pbuilder and linked against wxWidgets 2.8.10.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: ahui886 on July 28, 2009, 07:20:38 am
thx
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Loaden on July 28, 2009, 07:54:36 am
Have a question, i hope CB term can fix it. Thanks!


[attachment deleted by admin]
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on July 28, 2009, 09:23:13 am
Have a question, i hope CB term can fix it. Thanks!
If you mean "team" by "term" the it's "fixed" (probably better to say adjusted) in trunk.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Loaden on July 28, 2009, 10:22:16 am
Have a question, i hope CB term can fix it. Thanks!
If you mean "team" by "term" the it's "fixed" (probably better to say adjusted) in trunk.
Oh. god.
Sorry for my poor english.
I build SVN5717, this question is gone!
thanks!
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Loaden on July 28, 2009, 10:32:15 am
I have a question: on the compiled information, as when using GCC 4.
I hope the CB development team can fix it, thank you!

In the 'Start here' page of the information displayed:

svn build rev 5717 (2009-07-28T07: 15:12.319835 Z) gcc 4.4.1 Windows / unicode

The time format is wrong.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: vix on July 28, 2009, 12:34:41 pm
I found a problem in File Encoding, running C::B under WinXP SP3: C files containing western characters like è, é, ò, ... aren't displayed correctly.
You can simply reproduce the problem if you create a new C file with the following content
Code
hello èé
and save it as foo.c with File encoding >> System default (that is 1252 under WinXP),
After you close and re-open it inside C::B you should see
Quote
hello ий
The two western characters with ASCII codes 0xE8 and 0xE9 aren't displayed correctly.

If you force the encoding to System default, an Encoding Changed popup appears in the bottom right corner of the display
Title: Re: The 27 July 2009 build (5716) is out.
Post by: trdm on July 28, 2009, 12:51:52 pm
try 5716-svn:


[attachment deleted by admin]
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on July 28, 2009, 12:53:55 pm
svn build rev 5717 (2009-07-28T07: 15:12.319835 Z) gcc 4.4.1 Windows / unicode
That's not wrong, that's exactly how SVN reports the date/time. It's just "a" format. Check any "entries" file in a .svn sub-foldr if you like. It's all the same.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on July 28, 2009, 02:09:35 pm
svn build rev 5717 (2009-07-28T07: 15:12.319835 Z) gcc 4.4.1 Windows / unicode
That's not wrong, that's exactly how SVN reports the date/time. It's just "a" format. Check any "entries" file in a .svn sub-foldr if you like. It's all the same.
We parse the date with a regex, if we use automake on linux.

We can do something similar on windows (of course without regexes).
Any objections against this patch:

Code
Index: autorevision.cpp
===================================================================
--- autorevision.cpp (Revision 5716)
+++ autorevision.cpp (Arbeitskopie)
@@ -122,6 +122,8 @@
             if(d && d->GetText())
             {
                 date = d->GetText();
+                date.replace(date.find('T'),1," ");
+                date.resize(date.find('.'));
             }
             return 1;
         }
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on July 28, 2009, 03:18:40 pm
We parse the date with a regex, if we use automake on linux.
Linux I don't know. But he was talking about Windows. However - what's wrong with using the format as it is used in the (any) SVN repository? I mean: We *are* talking about a SVN revision here, right?
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on July 28, 2009, 04:24:26 pm
We parse the date with a regex, if we use automake on linux.
Linux I don't know. But he was talking about Windows. However - what's wrong with using the format as it is used in the (any) SVN repository? I mean: We *are* talking about a SVN revision here, right?

I know that he is talking about windows.

I don't know, why subversion uses this format for date/time of last commit (internally), but are there any objections against using a format, that's (better) human-readable for the date and time ?

The only cause would be, if we have to distinguish between to revision, that came in at the same second, but we also use the revision-number, so I don't see any problem.
And I don't think the patch to autorevision.cpp can break anything, unless the svn date-format changes.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Biplab on July 28, 2009, 04:48:39 pm
We parse the date with a regex, if we use automake on linux.
Linux I don't know. But he was talking about Windows. However - what's wrong with using the format as it is used in the (any) SVN repository? I mean: We *are* talking about a SVN revision here, right?

I know that he is talking about windows.

I don't know, why subversion uses this format for date/time of last commit (internally), but are there any objections against using a format, that's (better) human-readable for the date and time ?

The only cause would be, if we have to distinguish between to revision, that came in at the same second, but we also use the revision-number, so I don't see any problem.
And I don't think the patch to autorevision.cpp can break anything, unless the svn date-format changes.

Better consult with Thomas first. Once I wanted to fix this issue. But he didn't want to touch that code. I forgot the exact objection. :)
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on July 28, 2009, 05:18:38 pm
We parse the date with a regex, if we use automake on linux.
Linux I don't know. But he was talking about Windows. However - what's wrong with using the format as it is used in the (any) SVN repository? I mean: We *are* talking about a SVN revision here, right?

I know that he is talking about windows.

I don't know, why subversion uses this format for date/time of last commit (internally), but are there any objections against using a format, that's (better) human-readable for the date and time ?

The only cause would be, if we have to distinguish between to revision, that came in at the same second, but we also use the revision-number, so I don't see any problem.
And I don't think the patch to autorevision.cpp can break anything, unless the svn date-format changes.

Better consult with Thomas first. Once I wanted to fix this issue. But he didn't want to touch that code. I forgot the exact objection. :)

Thomas ?
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Biplab on July 28, 2009, 05:20:09 pm
We parse the date with a regex, if we use automake on linux.
Linux I don't know. But he was talking about Windows. However - what's wrong with using the format as it is used in the (any) SVN repository? I mean: We *are* talking about a SVN revision here, right?

I know that he is talking about windows.

I don't know, why subversion uses this format for date/time of last commit (internally), but are there any objections against using a format, that's (better) human-readable for the date and time ?

The only cause would be, if we have to distinguish between to revision, that came in at the same second, but we also use the revision-number, so I don't see any problem.
And I don't think the patch to autorevision.cpp can break anything, unless the svn date-format changes.

Better consult with Thomas first. Once I wanted to fix this issue. But he didn't want to touch that code. I forgot the exact objection. :)

Thomas ?

Yes!!
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on July 28, 2009, 05:27:48 pm
Thomas ?

Yes!!

I just cried for him, so he can not overread it, if he looks through unread topics.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on July 28, 2009, 05:56:16 pm
Thomas ?
Yes!!
I just cried for him, so he can not overread it, if he looks through unread topics.
LOL! :lol: :lol: :lol:
Title: Re: The 27 July 2009 build (5716) is out.
Post by: squalyl on July 28, 2009, 11:35:48 pm
dear codeblocks team I love you!

Just noticed some new features in this nightly: automatic } when I type a {. That's lovely. It saves a lot of time.

BUT: what did you do with the patch that saved me, about SDCC and static libs?

here: http://forums.codeblocks.org/index.php/topic,10741.msg73652.html#msg73652

I hoped it would be integrated in new nightlies  :cry:

(note : the change is fully OK, is there any reason not to integrate it in the main branch?)

crash report: http://www.mirari.fr/RUb0
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on July 29, 2009, 08:20:02 am
BUT: what did you do with the patch that saved me, about SDCC and static libs?
...probably overseen? The next nightly will take care. I've submitted the modification.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: sbilsing on July 30, 2009, 09:33:33 am
Hello CodeBlocks team,

First, CB is great. I use the nightly builds even for production. The degree of flexibility is just beyond everything I know from certain M$ products.
But the last 3 nightly builds include a bug in the command macro expansion. I filed a bug report here:
http://developer.berlios.de/bugs/?func=detailbug&bug_id=16072&group_id=5358 (http://developer.berlios.de/bugs/?func=detailbug&bug_id=16072&group_id=5358)

Regards
S.B.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: vix on July 30, 2009, 01:40:26 pm
I did other tests, and I noticed that the encoding problem I described in my previous post
http://forums.codeblocks.org/index.php/topic,10912.msg74599.html#msg74599 (http://forums.codeblocks.org/index.php/topic,10912.msg74599.html#msg74599)
appeared from the Nightly 5696.
Nightly Build 5678 works well.

Could be related to wxAui?
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Loaden on July 30, 2009, 01:53:20 pm
svn build rev 5717 (2009-07-28T07: 15:12.319835 Z) gcc 4.4.1 Windows / unicode
That's not wrong, that's exactly how SVN reports the date/time. It's just "a" format. Check any "entries" file in a .svn sub-foldr if you like. It's all the same.
We parse the date with a regex, if we use automake on linux.

We can do something similar on windows (of course without regexes).
Any objections against this patch:

Code
Index: autorevision.cpp
===================================================================
--- autorevision.cpp (Revision 5716)
+++ autorevision.cpp (Arbeitskopie)
@@ -122,6 +122,8 @@
             if(d && d->GetText())
             {
                 date = d->GetText();
+                date.replace(date.find('T'),1," ");
+                date.resize(date.find('.'));
             }
             return 1;
         }
Thanks!
It's ok:
svn build rev 5722 (2009-07-30 09:59:52) gcc 4.4.1 Windows/unicode
Title: Re: The 27 July 2009 build (5716) is out.
Post by: killerbot on July 30, 2009, 04:04:35 pm
Hello CodeBlocks team,

First, CB is great. I use the nightly builds even for production. The degree of flexibility is just beyond everything I know from certain M$ products.
But the last 3 nightly builds include a bug in the command macro expansion. I filed a bug report here:
http://developer.berlios.de/bugs/?func=detailbug&bug_id=16072&group_id=5358 (http://developer.berlios.de/bugs/?func=detailbug&bug_id=16072&group_id=5358)

Regards
S.B.


anyone already an idea on this regression ? wxAUi related ?
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on July 30, 2009, 04:31:16 pm
anyone already an idea on this regression ? wxAUi related ?
If this is true:
Quote
Apparently the bug was introduced in svn build 5678.
...then "no". Because the wxAUI merge came later.

EDIT: Cannot even reproduce. Works fine here...?!
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Loaden on July 30, 2009, 06:38:06 pm
wxWidgets 2.9 release now.
ftp://ftp.wxwidgets.org/pub/2.9.0/ (http://ftp://ftp.wxwidgets.org/pub/2.9.0/)
 :D
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on July 30, 2009, 07:02:07 pm
anyone already an idea on this regression ? wxAUi related ?
If this is true:
Quote
Apparently the bug was introduced in svn build 5678.
...then "no". Because the wxAUI merge came later.

EDIT: Cannot even reproduce. Works fine here...?!

I can reproduce here (linux 64-bit).

I did not look into it deeper (no time), but I found a workaround (that might be a hint to find the bug):
double the $-sign and it works again (at least here).
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on July 30, 2009, 09:12:41 pm
It's commit 5636, that leads to the error. I did not (yet) look for a solution.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: killerbot on July 30, 2009, 10:05:45 pm
which is a change to 'compilercommandgenerator.cpp' base upon work of 'Biplab' : "replace macros for compiler options".
Basically 2 lines have been added, doing a macro substitution, could it be it is carried out too early ??
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on July 30, 2009, 11:30:02 pm
which is a change to 'compilercommandgenerator.cpp' base upon work of 'Biplab' : "replace macros for compiler options".
Basically 2 lines have been added, doing a macro substitution, could it be it is carried out too early ??
It seems so.

In ReplaceMacros, we replace macros and environment-variables.
Our internally used variables have the same format as the unix/linux shell-variables (if used without braces), so they get replaced by the appropriate environment variable, but such a variable does not exist, so we get an empty string instead.

ReplaceMacros should be called after our variables get expanded, not before.

EDIT:

and as I just saw, ReplaceMacros is called at the  end GenerateCommandline, so it I do not think, that there is any cause to call it so early as we do it in the moment (after the changes in commit 5636.
There might be a problem , if a user tries to add C::B variables with a script, but that does not work anyway (unless they are added with two $'s), because the variables get expanded after the scripts.

So my proposal is to revert commit 5636, unless we find a way to protect C::B's internal variables.

Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on July 31, 2009, 08:20:25 am
So my proposal is to revert commit 5636, unless we find a way to protect C::B's internal variables.
Agreed. Still: It works for me on Windows even with the patch!!!

EDIT: I've taken the action accordingly.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: sbilsing on July 31, 2009, 08:34:21 am
The workaround to double the $ works for me, too. :-)
I should have mentioned, that I use the macro in the project's compiler settings, not in the global compiler settings. In the global settings everything seems fine.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on July 31, 2009, 09:04:26 am
In the global settings everything seems fine.
Now THAT clarifies why it seemed to work for me. ;-)
Title: Re: The 27 July 2009 build (5716) is out.
Post by: sdfwds4 on August 01, 2009, 07:33:24 pm
brace completion is good, i like it, thank you!
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Biplab on August 02, 2009, 04:39:05 pm
which is a change to 'compilercommandgenerator.cpp' base upon work of 'Biplab' : "replace macros for compiler options".
Basically 2 lines have been added, doing a macro substitution, could it be it is carried out too early ??

I can't access Berlios at the moment. So I'm unable to shed more light on this. Anyway it's already been reverted and I'll see if the earlier patch can be improved or not. :)
Title: Re: The 27 July 2009 build (5716) is out.
Post by: stahta01 on August 02, 2009, 09:46:42 pm
Link to check berlios status
http://monitor.berlios.de/berlios-status/index.php

Tim S
Title: Re: The 27 July 2009 build (5716) is out.
Post by: vix on August 03, 2009, 04:49:23 pm
Sorry for my insistence,...
only to be sure that someone could confirm the File Encoding problem (see my previous post).
I can't use C::B anymore in this situation because all the characters like à, è, ò, ... are messed up.
And my C/C++ comments are full of them because they're quite common in Italian language (but I think also in French, Spanish, ...)

At the end I had to switch back to the old 5678 Nightly Build, but if I made some mistake during upgrading I could try to solve it....

Thanks for your help
Title: Re: The 27 July 2009 build (5716) is out.
Post by: ollydbg on August 03, 2009, 05:28:31 pm
Sorry for my insistence,...
only to be sure that someone could confirm the File Encoding problem (see my previous post).
I can't use C::B anymore in this situation because all the characters like à, è, ò, ... are messed up.
And my C/C++ comments are full of them because they're quite common in Italian language (but I think also in French, Spanish, ...)

At the end I had to switch back to the old 5678 Nightly Build, but if I made some mistake during upgrading I could try to solve it....

Thanks for your help

Because the latest two version of night build uses a mozilla file encoding detection scheme, so, it works better than the old 5678 in my Chinese system. :D

Not sure it works badly in your system.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on August 03, 2009, 05:29:55 pm
Sorry for my insistence,...
only to be sure that someone could confirm the File Encoding problem (see my previous post).
I can't use C::B anymore in this situation because all the characters like à, è, ò, ... are messed up.
And my C/C++ comments are full of them because they're quite common in Italian language (but I think also in French, Spanish, ...)

At the end I had to switch back to the old 5678 Nightly Build, but if I made some mistake during upgrading I could try to solve it....

Thanks for your help
I can confirm this (on wondows), and will have a look into it.
The encoding detection has also changed with the change to wxAui.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on August 04, 2009, 01:59:57 am
@vix:
could you please send me example-files that fail, if possible ?
see: http://forums.codeblocks.org/index.php/topic,10191.msg70572.html#msg70572 (http://forums.codeblocks.org/index.php/topic,10191.msg70572.html#msg70572)
Files with extremly less (non-ascii) characters are always hard to decode.

It might help to switch to multibyte-encoding (utf-8), if this is a legal alternative.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: vix on August 04, 2009, 08:24:01 am
could you please send me example-files that fail, if possible ?

just sent
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on August 04, 2009, 09:09:54 am
could you please send me example-files that fail, if possible ?

just sent
The reason is quite simple, I decided to also search for latin-2 encoding needed for langauges like Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian (when in the Latin script), Slovak, Slovenian, Upper Sorbian, and Lower Sorbian, but it breaks some latin-1 encoded texts due to their similarity, not all and not always (depending of the used characters).
FireFox 3.5 still does not automatically detect these languages correctly (at least not in all cases).

I think I will add a configuration-option that the user can decide whether he/she wants to try to detect latin-2 also (with a hint, that it might break latin-1 detection).

I don't know a better solution, the alternative would be either not to detect latin-2 or some latin-1 encodings.

By the way: I did not stumble over the problem, because if you use german umlauts (äöü) or the german sharp s (ß), even single-byte texts are detected correctly, but I use utf-8 in almost any cases anyways (except for at work where I have to use windows tools, that do not all work with unicode correctly).
Title: Re: The 27 July 2009 build (5716) is out.
Post by: vix on August 04, 2009, 11:54:40 am
The reason is quite simple, I decided to also search for latin-2 encoding needed for langauges like Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian (when in the Latin script), Slovak, Slovenian, Upper Sorbian, and Lower Sorbian, but it breaks some latin-1 encoded texts due to their similarity, not all and not always (depending of the used characters).

If I understood, the encoding is not saved into the file, so C::B tries to guess the right one when the file is opened. So when you add the latin-2 encoding, some latin-1 files are seen as latin-2, so some characters are displayed in a wrong way.
So I change the option Settings >> Editor >> General Settings >> Use This Encoding to "As default encoding", so the C::B's auto-detectionis bypassed, and this solved my problem.

If this is the situation, I think that your idea of the configuration-option is the easiest one: I'm afraid that detecting latin-1 from latin-2 is not easy...
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Biplab on August 04, 2009, 06:11:26 pm
If I understood, the encoding is not saved into the file, so C::B tries to guess the right one when the file is opened. So when you add the latin-2 encoding, some latin-1 files are seen as latin-2, so some characters are displayed in a wrong way.
So I change the option Settings >> Editor >> General Settings >> Use This Encoding to "As default encoding", so the C::B's auto-detectionis bypassed, and this solved my problem.

If this is the situation, I think that your idea of the configuration-option is the easiest one: I'm afraid that detecting latin-1 from latin-2 is not easy...


A file encoding is never saved to a file. At least I'm unaware of any widely popular method of storing file encoding data to a file. Reason is pretty simple. One need to strip that data (encoding detection data) before feeding it to another program. Or the other program should be aware of how to strip that data.

Most of the known software performs encoding detection by sampling data from file. There are BOM for UTF encoded file. But for other encoding sampling and measuring frequency of encoded characters is the only way to detect an encoding. Mozilla's encoding detection is an example of this.

For a large project with files encoded with a less popular encoding scheme will surely degrade Code:Blocks' performance. Precisely this was the reason Yiannis objected (long ago) to the inclusion of Mozilla's encoding detection code to trunk. IMHO it should be turned on as an Option only.

IMHO the solution should be to give user two option.
1) Use a simple encoding detection scheme (to detect most of the popular encodings).
2) Use Mozilla's code to detect encoding (we should make it very clear that this option may affect performance in some cases).
3) Don't detect encoding.

And to each of the above options Fallback Encoding options shall be-
a) Use System encoding.
b) Use User-provided encoding.

Code:Blocks is an IDE & IMO we should try not to transform it to a Text Editor or a Browser.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on August 05, 2009, 07:11:14 am
Code:Blocks is an IDE & IMO we should try not to transform it to a Text Editor or a Browser.
Amen. In addition what worries me: Most users don't even understand what "encoding" means and why detection has to fail using a wrong setup. For those it'll always be hard to find the right setup even with the option we have or the options Biplab is proposing. So we will always be claimed "somehow" as long as encoding exists. ;-)
Title: Re: The 27 July 2009 build (5716) is out.
Post by: critic on August 05, 2009, 11:27:03 am
In almost all my projects there are many files and I need check project's tree visually to find required file.
C::B has menu item for this task - "Finf file...", but it requires full file name and I, for example, remember only it's part. May be I make a mistake thinking that required a full file name? If so tell me, please, how need to do.
If not, I think it will be better to use regular expression to find first matching file in tree after current, because current "Find file..." is not usable for me.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: witton on August 05, 2009, 12:21:28 pm
-- removed non english content --
Jens
Title: Re: The 27 July 2009 build (5716) is out.
Post by: oBFusCATed on August 05, 2009, 01:25:32 pm
critic: have you tried the alt+g key combination, in that dialog you can type part of the filename
Title: Re: The 27 July 2009 build (5716) is out.
Post by: critic on August 05, 2009, 01:34:19 pm
Thanks, oBFusCATed
It very handy!  :D
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on August 05, 2009, 02:01:56 pm
If I understood, the encoding is not saved into the file, so C::B tries to guess the right one when the file is opened. So when you add the latin-2 encoding, some latin-1 files are seen as latin-2, so some characters are displayed in a wrong way.
So I change the option Settings >> Editor >> General Settings >> Use This Encoding to "As default encoding", so the C::B's auto-detectionis bypassed, and this solved my problem.

If this is the situation, I think that your idea of the configuration-option is the easiest one: I'm afraid that detecting latin-1 from latin-2 is not easy...


A file encoding is never saved to a file. At least I'm unaware of any widely popular method of storing file encoding data to a file. Reason is pretty simple. One need to strip that data (encoding detection data) before feeding it to another program. Or the other program should be aware of how to strip that data.

Most of the known software performs encoding detection by sampling data from file. There are BOM for UTF encoded file. But for other encoding sampling and measuring frequency of encoded characters is the only way to detect an encoding. Mozilla's encoding detection is an example of this.

For a large project with files encoded with a less popular encoding scheme will surely degrade Code:Blocks' performance. Precisely this was the reason Yiannis objected (long ago) to the inclusion of Mozilla's encoding detection code to trunk. IMHO it should be turned on as an Option only.

IMHO the solution should be to give user two option.
1) Use a simple encoding detection scheme (to detect most of the popular encodings).
2) Use Mozilla's code to detect encoding (we should make it very clear that this option may affect performance in some cases).
3) Don't detect encoding.

And to each of the above options Fallback Encoding options shall be-
a) Use System encoding.
b) Use User-provided encoding.

Code:Blocks is an IDE & IMO we should try not to transform it to a Text Editor or a Browser.

You are right, C::B is not a browser, but C::B is an IDE, so the editor is an important part, otherwise it would be not much more than a build-system like makefiles.

I did not answer yesterday, because I wanted to make some speed tests.
I did not have a project, where he new encoding detection is noticeable slower than the old one.

This might be different for some less popular (rare?) encoding schemes,as you wrote.
But in my opinion it is better to have a somewhat slower encoding-detection that works, than a fast detection, where the user has to force something to make it work.

A possible slowdown, is only a problem, if a user opens (very) many files at once.
We had some real bottlenecks, but together with the new detection, more parts of the file-loading code were improved.
Nevertheless it still needs much more time to load the file into the editor (after it's encoding has been detected and it was loaded into a string-variable), than the encoding detection took (at least in the great majority of all cases I have seen).

For my tests I use the same code except for the detection, that means all speed-ups are the same in both test-variants of C::B.

The new encoding detection does the following:

The first four did not change with new encoding detection, the ascii-detection is very fast, the last might take a little longer, but I don't get a difference, even if I use the wxStopWatch and log the time needed to open all files of a project, there is no noticeable or measurable difference.

Bypassing C::B's detection should be faster (but we still have to convert the file-content, what takes "much" time), but that's a thing the user can still do.

If it works fast for the majority of cases and possibly slower for some cases (I did not get one until now) it does not make sense to change anything (except for not probing latin2 encodings by default, because it breaks detecting of some latin1 charsets).
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Biplab on August 05, 2009, 03:16:27 pm
You are right, C::B is not a browser, but C::B is an IDE, so the editor is an important part, otherwise it would be not much more than a build-system like makefiles.

If a Cash-Rich Mozilla Corporation doesn't bother to improve it's detection code I'd also not want to spend much effort on doing so. Anyway it was my personal opinion.

But if we are able to improve the detection code I'd be happy to see that code get merged to trunk.

This might be different for some less popular (rare?) encoding schemes,as you wrote.
But in my opinion it is better to have a somewhat slower encoding-detection that works, than a fast detection, where the user has to force something to make it work.

I'd still prefer to have it as an optional feature; not as a "Default" feature. Personally I also want to support a wide variety of user base. But that shouldn't be done at the cost of other users who don't need that.


The new encoding detection does the following:
  • check for user-forced-encoding
  • search bom
  • try to detect uft16
  • try to detect uft32
  • try to detect  ascii or extended ascci encoding like HZ-GB-2312, ISO-2022-CN
  • or try to detect singlebyte, multibyte and latin1 charsets

The first four did not change with new encoding detection, ...

I disagree with this one. There were couple of changes made-
1. Api was changed.
2. UTF-8 detection code now stands commented out. (as good as deleted)

In fact I was never asked / consulted / explained why the above 2 took place. Sorry, but I couldn't understand the reason.


Anyway I don't want to stretch this any longer in this public forum. But I think we should start a thread separately (in our own space) to clear the air.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Acki on August 09, 2009, 04:15:59 am
Hi,
since the last 2 or 3 nightlies I have a problem with the editor...
If I have multiple files opened and I want to switch to one of these files I use "CTRL-Tab"...
now there pops a window up where I can select the file/tab where to go...
but I want it like in older versions, so if I press CTRL-Tab the next file/tab opens directly without this popup window !!!

I searched the options and I found "Settings->Environment->Notebooks appearance->Use drop-down tab list", but it has no effect if I disable or enable this...

also if I press Shift-CTRL-Tab to go to the previous file/tab it works like before, but it stops at the first editor tab, but I want it to go to the last tab again after the first tab...

I'm using this Nightly with WinXP-pro (sp2)...
Title: Re: The 27 July 2009 build (5716) is out.
Post by: lesc on August 10, 2009, 09:31:43 pm
Hi all!

I <3 codeblocks :D ..used the stable version from ubuntu synaptic until two days or so.. had a funny segfault when codeblocks reparsed file after saving it.. well, so I tried this nightly and at least this bug has vanished ;D

..but now all my code with OpenGL/GLUT will not work anymore :(

...seg fault in glutCreateWindow()   :(
..this code worked perfect until now :/ ..I tried to update my GLUT libs but it didn't help :(

code:
Code
void setupGLUT(int *argc, char **argv, int winid[]) {
    glutInit(argc, argv);
    glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);

    winid[0] = glutCreateWindow("OpenSG");
    //winid[1] = glutCreateWindow("OpenSG2");

    glutReshapeFunc(reshape);
    glutDisplayFunc(display);
    glutKeyboardFunc(keyboard);
    glutSpecialFunc(keyboard_special);
    glutIdleFunc(display);
}

call stack :

#0 0x7f959dc9561c   ??() (/usr/X11R6/lib64/libGL.so.1:??)
#1 0x7f959dca44d6   ??() (/usr/X11R6/lib64/libGL.so.1:??)
#2 0x7f959dcaa03a   ??() (/usr/X11R6/lib64/libGL.so.1:??)
#3 0x7f959dc9ea68   glXCreateContext() (/usr/X11R6/lib64/libGL.so.1:??)
#4 0x7f959e0c5afd   fgOpenWindow() (/usr/lib64/libglut.so.3:??)
#5 0x7f959e0c4494   fgCreateWindow() (/usr/lib64/libglut.so.3:??)
#6 0x7f959e0c5591   glutCreateWindow() (/usr/lib64/libglut.so.3:??)
#7 0x41bbfe   setupGLUT(argc=0x7fffa86e63bc, argv=0x7fffa86e6618, winid=0x7fffa86e63c0) (*projectfolder*/src/main.cpp:156)
#8 0x41c46e   main(argc=1, argv=0x7fffa86e6618) (*projectfolder*/src/main.cpp:80)

I am using Glut with OpenSG

I will try to find more things to say on this problem.. I am sorry to post without more informations on this.. (please tell me what information could help)

thanks for any ideas/sugestions/help/time

victor

Edit: humm, it still works fine at home (ubuntu 32 at home vs suse 64 at work..) ..so I don't think it has anything to do with codeblocks.. could be coincidal with my upgrade to nightly.. sry to have wasted your time.. 
Title: Re: The 27 July 2009 build (5716) is out.
Post by: critic on August 11, 2009, 07:02:53 am
Hello everybody!

Who can say when C::B will have a modern codecompletion? This functionality is very important in everyday work of programmer and I don't know when to expect it: a month, a year or never?

Under 'modern' I mean:

Below are examples to show problems

Templates:
Code
   template <class T>
   struct C1
   {
      T obj;
   };

   struct C2
   {
      void func() {}
   };

   C1<C2> obj;
   obj.obj.
And it's all - I expected 'func()', but got nothing (this bug is stable, i.e. repeatable).

Defines:
Code
   #define DECLARE_SINGLE(Class) \
      private:\
         Class() {}\
         ~Class() {}\
         Class(const Class &obj);\
         Class& operator=(const Class &obj);\
      public:\
         Class& inst()\
         {\
            static Class obj;\
            return obj;\
         }

   class SingletonTest
   {
      DECLARE_SINGLE(SingletonTest)
   public:
      void func() {}
   };

   SingletonTest::inst().
And again it's all - I expected 'func()', but got nothing (this bug is stable, i.e. repeatable).

About strange items only a few words:

It is very sad that for such long time this very important feature remains with these bugs.
Other functionality of C::B and that it written using C++ is very friendly for me.

With regards :wink:
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on August 11, 2009, 08:34:27 am
Who can say when C::B will have a modern codecompletion?
Nobody.

What you want is really the "hardest" part of CC to do. Remember that professional CC plugins (e.g. for Visual Stuidio) had required years of work by many people that got paid full-time. So most likely the quality you are looking for is a long-term goal.
However - you can try the codecompletion_refactoring branch that has several enhancements (and some more to come) to the current "trunk" version.
Of course (and not to forget): OpenSource projects live by contribution - so you can help and contribute to CC if you like. May others did which resulted really in major enhancements to CC. But surely you can always do better in the end.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: ollydbg on August 11, 2009, 01:31:25 pm
Who can say when C::B will have a modern codecompletion? This functionality is very important in everyday work of programmer and I don't know when to expect it: a month, a year or never?
Hi, critic, I have attempt to improve codecompletion, but for some reasons it is still not as good as I expect.

If you read the sub-forum: http://forums.codeblocks.org/index.php/board,18.0.html (http://forums.codeblocks.org/index.php/board,18.0.html), you can learn all the current status of CC.

I hope more people would take part in its improvement.
 
Title: Re: The 27 July 2009 build (5716) is out.
Post by: blueshake on August 11, 2009, 02:10:52 pm
actually it is not a bug. if you read the souce codes, you will know that the two functions you mention is be so
because the code completion ignore it.in current version.it is not possible to implement it.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Acki on August 11, 2009, 04:48:18 pm
another problem when creating a DLL...
let's say I'm compiling a DLL called "Irrlicht.dll", now the lib file is named "libIrrlicht.dll.a"...
but I don't want the ".dll" between "libIrrlicht" and ".a" !!!
now I either need to rename the lib manually or change the project settings for all my projects...  :?

is there a way to disable the ".dll" for the lib name ???
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on August 11, 2009, 08:35:57 pm
is there a way to disable the ".dll" for the lib name ???
Search the forums.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Acki on August 12, 2009, 12:12:51 am
is there a way to disable the ".dll" for the lib name ???
Search the forums.
ahh, so there is a way, I'll have a search, thx... ;)

but what about the Ctrl-Tab problem ???  :(

EDIT:
so I found the options "Auto-generate filename prefix" and "Auto-generate filename extension"... :lol:
but it seems to be the problem like with Ctrl-Tab !!!
the check boxes have no effect, plus it generates the extension ".exe" instead of ".dll" !!!

to illustrate some screenshots:

Auto-generate enabled and extension entered:
(http://abusoft.g0dsoft.com/temp/dll1a.jpg)

Auto-generate enabled and no extension entered:
(http://abusoft.g0dsoft.com/temp/dll1b.jpg)

Auto-generate disabled and extension entered:
(http://abusoft.g0dsoft.com/temp/dll2a.jpg)

Auto-generate disabled and no extension entered:
(http://abusoft.g0dsoft.com/temp/dll2b.jpg)
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Loaden on August 12, 2009, 08:07:33 am
another problem when creating a DLL...
let's say I'm compiling a DLL called "Irrlicht.dll", now the lib file is named "libIrrlicht.dll.a"...
but I don't want the ".dll" between "libIrrlicht" and ".a" !!!
now I either need to rename the lib manually or change the project settings for all my projects...  :?

is there a way to disable the ".dll" for the lib name ???

Since after a SVN version, it becomes the case.
I do not want that too.

The same problem: how to remove the middle of the ".dll"?
Thanks!
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Ceniza on August 13, 2009, 07:02:15 pm
Morten: can you see now that we do not like that behavior?
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on August 13, 2009, 09:06:12 pm
Morten: can you see now that we do not like that behavior?
...no?!

The point is:

The behavior we had before did not work for the cases I told you. In addition users complained.

The behavior we have now works on all cases but is less "intuitive". In addition users complain.

So - what's the better choice? Make it an option? What's the default value then?
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Ceniza on August 14, 2009, 10:47:56 am
Morten: can you see now that we do not like that behavior?
...no?!

The point is:

The behavior we had before did not work for the cases I told you. In addition users complained.

The behavior we have now works on all cases but is less "intuitive". In addition users complain.

So - what's the better choice? Make it an option? What's the default value then?

The default behavior should be that we have always seen and expected: file.dll and libfile.a.

When the user wants to create a non-as-common-as-a-plain-.dll-file (like .Plugin), he/she should then specify it somehow using a non-yet-existent-option. Splitting the output file name into name and extension fields with, probably, a checkbox saying something like "Use this extension instead" could help. If the checkbox is not selected, the extension field should not be editable. An extra read-only output field could be added to show the user the final result of the selected options (probably two: one for the file name, and one for the library name).
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on August 14, 2009, 11:15:08 am
When the user wants to create a non-as-common-as-a-plain-.dll-file (like .Plugin),
Notice that this was only *one* problem.

Even worse was if you tried to create a System.Management.DLL file. This did not work, too. And that's the one I was referring to at most. Because such misbehaviour is in fact not acceptable.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Ceniza on August 14, 2009, 11:49:38 am
When the user wants to create a non-as-common-as-a-plain-.dll-file (like .Plugin),
Notice that this was only *one* problem.

Even worse was if you tried to create a System.Management.DLL file. This did not work, too. And that's the one I was referring to at most. Because such misbehaviour is in fact not acceptable.

What was wrong with System.Management.DLL again? (I have forget only memory)
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Jenna on August 14, 2009, 11:56:05 am
When the user wants to create a non-as-common-as-a-plain-.dll-file (like .Plugin),
Notice that this was only *one* problem.

Even worse was if you tried to create a System.Management.DLL file. This did not work, too. And that's the one I was referring to at most. Because such misbehaviour is in fact not acceptable.

What was wrong with System.Management.DLL again? (I have forget only memory)
If I remember right, it was turned int "System.dll" .
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Ceniza on August 14, 2009, 12:50:25 pm
When the user wants to create a non-as-common-as-a-plain-.dll-file (like .Plugin),
Notice that this was only *one* problem.

Even worse was if you tried to create a System.Management.DLL file. This did not work, too. And that's the one I was referring to at most. Because such misbehaviour is in fact not acceptable.

What was wrong with System.Management.DLL again? (I have forget only memory)
If I remember right, it was turned int "System.dll" .

Well... with an extension field you should not have that problem.

Output file name: System.Management (user input)
[ ] Use custom extension (unchecked)
Custom extension: dll (default shown, empty, previous value, ...)
Full output file name: System.Management.dll (read-only)
Full import lib file name: libSystem.Management.a (read-only)

Is it too bad an idea?
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on August 14, 2009, 01:02:48 pm
Output file name: System.Management (user input)
Right - I should have been more precise: It's a wx function that tricks us so you cannot distinguish by a base file name "System.Management" whether it has an extension or not. Cause wx will report "Management" as extension. So is than the extension you want or do you need to add another ".dll"? How do you differ? What happened in the past was than if I enabled  "auto ext" and put "System.Management" as file name it resulted not in System.Management.dll but in System.dll because we remove any existing extension before automatically adding the new one. If you don't do that a library called "system.dll" with "auto-ext" enabled would become "system.dll.dll" and again we surely will have complaints.

To make it short: If you see a way tat copes with all the cases correctly and looks "nice" - tell me or better just implement it. I just don't see any. All I did was at least making it functioning correctly because that has highest priority for me and not if the file names are "correct". Cause again: GCC handles the files just fine the way it is now.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: Ceniza on August 14, 2009, 01:10:34 pm
Output file name: System.Management (user input)
Right - I should have been more precise: It's a wx function that tricks us so you cannot distinguish by a base file name "System.Management" whether it has an extension or not. Cause wx will report "Management" as extension. So is than the extension you want or do you need to add another ".dll"? How do you differ? What happened in the past was than if I enabled  "auto ext" and put "System.Management" as file name it resulted not in System.Management.dll but in System.dll because we remove any existing extension before automatically adding the new one. If you don't do that a library called "system.dll" with "auto-ext" enabled would become "system.dll.dll" and again we surely will have complaints.

To make it short: If you see a way tat copes with all the cases correctly and looks "nice" - tell me or better just implement it. I just don't see any. All I did was at least making it functioning correctly because that has highest priority for me and not if the file names are "correct". Cause again: GCC handles the files just fine the way it is now.

I am giving you a solution. It implies that you won't try to guess an extension at all. You read that field 'as is'. If the user has not selected an extension of his own, dll/so will be used by appending it to the base file name. If you want an extension of your own, then you check the checkbox and write the one you want. The result will be the base file name + . + the extension.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: courage on September 18, 2009, 04:34:55 am
Hello, I have a bug report. Every time when I open the main frame window in wxSmith, and I see the ckecked menu item will now be set unchecked in the MenuBar editor.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: cgarcia109 on September 18, 2009, 03:13:10 pm
*.dll.a

I didnt liked this too in the first place, but now i like it. Maybe its not de cool name youre used to, but its just a name, and i see some advatages it make clears is a stub lib to a dinamic link library, and differentiate(sp?) from a static lib, in the case you need to build both without making every library goes to a different place. What would make more complex configure dependants projects.
Actually i changed my mind and i like this way.
Title: Re: The 27 July 2009 build (5716) is out.
Post by: MortenMacFly on September 18, 2009, 03:15:36 pm
Actually i changed my mind and i like this way.
Thanks! You are the first saying so which makes me glad. I like it, too obviously. ;-)