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
History
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)."
Please post a small resource file for testing.
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)
So? No one can confirm/fix it? It's really annoying... :(
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
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..
Anyone else who can confirm this behaviour?
Nobody. Well, i'll try to build C::B and see where it hangs.
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.
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 :)
Patch available here: http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1108&group_id=5358
This bug has been already fixed in HEAD.
Thank you.