Bug #7393 2006-05-06 11:24

kkez

CB hangs when error in a .rc file

When windres outputs a "syntax error" trying to compile a resource file, CB shows the error in the build message tab, then hangs for 3/4 seconds.

I've tried to

1) disable all the plugins

2) delete .conf file

3) compile big (400+ lines) and small (5 lines) resource files

but i always get the same delay.

4 May nightly build (rev 2411), wxwidgets 2.6.3/2.6.2

Category
 
Group
 
Status
Closed
Close date
2006-07-06 17:51
Assigned to
 
kkez 2006-05-08 17:06

Revision 2272 doesn't have this issue, while revision 2288 does. The only commit that seems error-related is at revision 2284, "* Fixed compiler couldn't jump to error line for single files (without a project)."

mandrav 2006-05-09 11:47

Please post a small resource file for testing.

kkez 2006-05-09 15:27

http://www.savefile.com/files.php?fid=8711018

It's a winapi dialog-based CB project with a .rc file.

(You need the mingw w32api headers to compile it)

kkez 2006-05-11 11:35

So? No one can confirm/fix it? It's really annoying... :(

mandrav 2006-05-16 12:03

I just downloaded and tried your project.

Works fine here. That is it displays one error while building and does so immediately. No delays whatsoever...

windres --version

GNU windres 2.15.94 20050118

kkez 2006-05-16 15:03

Well, i can't find your windres version, i have the "current" version which is 2.15.91, but i get the same delay with the candidate version (2.16.91)...

It seems indeed that it's windres.exe that is hanging, but it's weird, because the "build message" tab displays the error, but the "build log" doesn't until windres stops, and that make me think that CB is searching for the error in the .rc file...

By the way, it does not even open the file and highlight the line even if the error line is returned along with the filename..

mandrav 2006-05-25 11:30

Anyone else who can confirm this behaviour?

kkez 2006-05-30 10:42

Nobody. Well, i'll try to build C::B and see where it hangs.

kkez 2006-06-08 15:33

It hangs inside EditorManager::Open() with the call to NormalizePath(), because the filename passed to EditorManager::Open() is actually "windres.exe: res.rc", which is the normal windres output.

The regex used to find out if it's an error ( windres.exe[ \t]*(.*) ) could be applied to get the REAL filename... if i'm right.

kkez 2006-06-08 16:20

I didn't know how regexes where applied... now i've found out how to fix this nasty hang&bug.

The problems were:

1) the compiler or preprocessor error regex was applied before the windres error regex

2) you need a more precise windres error regex to handle the error in a file and not just a "windres.exe: [error]"

I'll make a patch out of it, if you agree with what i've said :)

kkez 2006-06-08 16:57
mandrav 2006-07-06 17:51

This bug has been already fixed in HEAD.

Thank you.