Author Topic: lexer files ugliness  (Read 5351 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
lexer files ugliness
« on: July 04, 2005, 11:05:18 am »
CodeBlocks crashes when one has set two different lexer file configration .xml's for the same file extension.
this happened here by me now after the last cvs-update, because i wrote the Hitachi H8 Asm lexer files with other filenames than mandrav checked in into cvs.
After the new build i had both lexer files, my originally ones and the lexer_hitasm.xml, both registering for *.s20 files.

the following crash occured (RPT file log)
Code
Error occured on Monday, July 4, 2005 at 10:52:22.

E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE caused an Access Violation at location 604f20ba in module E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll Reading from location 00000000.

Registers:
eax=00000000 ebx=00000001 ecx=0022f3c0 edx=00df649c esi=ffffffff edi=00000000
eip=604f20ba esp=0022f1d0 ebp=0022f1e8 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246

Call stack:
604F20BA  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:604F20BA  EditorColorSet::GetOptionByValue(short, int)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editorcolorset.cpp:239
604F1DA2  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:604F1DA2  EditorColorSet::AddOption(short, OptionColor*, bool)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editorcolorset.cpp:192
604F1FB6  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:604F1FB6  EditorColorSet::AddOption(short, wxString const&, int, wxColour, wxColour, bool, bool, bool, bool)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editorcolorset.cpp:220
60500AA0  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:60500AA0  EditorLexerLoader::DoStyles(int, TiXmlElement*)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editorlexerloader.cpp:102
6050026C  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:6050026C  EditorLexerLoader::DoLexer(TiXmlElement*)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editorlexerloader.cpp:65
604FFFA5  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:604FFFA5  EditorLexerLoader::Load(wxString const&)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editorlexerloader.cpp:46
604F17C0  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:604F17C0  EditorColorSet::LoadAvailableSets()  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editorcolorset.cpp:114
604F08E0  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:604F08E0  EditorColorSet::EditorColorSet(wxString const&)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editorcolorset.cpp:47
605022BB  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:605022BB  EditorManager::EditorManager(wxWindow*)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editormanager.cpp:117
605015F3  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:605015F3  EditorManager::Get(wxWindow*)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/editormanager.cpp:85
60519E75  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\codeblocks.dll:60519E75  Manager::GetEditorManager()  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/sdk/manager.cpp:228
00410F6D  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE:00410F6D  MainFrame::CreateIDE()  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/src/main.cpp:453
0040F35A  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE:0040F35A  MainFrame::MainFrame(wxWindow*)  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/src/main.cpp:367
00402586  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE:00402586  CodeBlocksApp::InitFrame()  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/src/app.cpp:175
00402E9A  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE:00402E9A  CodeBlocksApp::OnInit()  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/src/app.cpp:244
10015272  D:\TOOLS\wxmsw242.dll:10015272  _Z7wxEntryPvS_Pcib
00401392  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE:00401392  WinMain  E:/cpp/_projects/CodeBlocks/CodeBlocks_src/src/src/app.cpp:40
00424EBA  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE:00424EBA
004011E7  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE:004011E7
00401238  E:\cpp\_PROJE~1\CODEBL~1\CODEBL~3\src\output\CODEBL~1.EXE:00401238
7C816D4F  C:\WINDOWS\system32\kernel32.dll:7C816D4F  RegisterWaitForInputIdle


naturally it isn't possible to assign two different lexer files to one extension, but i think CodeBlocks should not crash but rather fire an error message to the user and ignore all lexer file extensions after the first registration to an extension.

regards, tiwag

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
lexer files ugliness
« Reply #1 on: July 04, 2005, 11:27:36 am »
Just fixed it in CVS.
Thanks tiwag :)

Yiannis.
Be patient!
This bug will be fixed soon...