Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: shajunxing on November 29, 2007, 12:08:05 pm

Title: [BUG] Crashed while identifying encoding of the source file
Post by: shajunxing on November 29, 2007, 12:08:05 pm
I don't remember when this problem appeared, but it exists a long time :shock: It is that when a project containing chinese characters is opened, a "Choose encoding" dialog flashes and soon the whole IDE crashes. I checked the config and found the default encoding is "default", and it must be changed to "windows-936" in order to avoid this problem.

I post my project here. :P

[attachment deleted by admin]
Title: Re: [BUG] Crashed while identifying encoding of the source file
Post by: shajunxing on November 29, 2007, 12:10:03 pm
I found some infomation in "codeblocks.RPT" which may be useful. :lol:

Code: [Select]
Error occured on Thursday, November 29, 2007 at 18:47:38.

D:\Program Files\CodeBlocks\codeblocks.exe caused an Access Violation at location 6c9fa8eb in module D:\Program Files\CodeBlocks\wxscintilla.dll Reading from location 00000150.

Registers:
eax=00000000 ebx=00b51ca8 ecx=0022eba4 edx=617c752a esi=00485b88 edi=0022ef84
eip=6c9fa8eb esp=0022eb7c ebp=0022eb94 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202

Call stack:
6C9FA8EB  D:\Program Files\CodeBlocks\wxscintilla.dll:6C9FA8EB  _ZN11wxScintilla7SendMsgEill
6C9FC47D  D:\Program Files\CodeBlocks\wxscintilla.dll:6C9FC47D  _ZN11wxScintilla9GetModifyEv
617C7551  D:\Program Files\CodeBlocks\codeblocks.dll:617C7551  _ZNK8cbEditor11GetModifiedEv
00423F37  D:\Program Files\CodeBlocks\codeblocks.exe:00423F37
6CCCA4AE  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCA4AE  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
6CCCBA89  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBA89  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
6CCCBFBF  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBFBF  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CDE07FA  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CDE07FA  _ZN12wxWindowBase9TryParentER7wxEvent
6CCCBF71  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF71  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CDD89D8  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CDD89D8  _ZN13wxToolBarBase14UpdateWindowUIEl
6CD14C72  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD14C72  _ZN8wxWindow14OnInternalIdleEv
6CD6E30A  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD6E30A  _ZN9wxAppBase14SendIdleEventsEP8wxWindowR11wxIdleEvent
6CD6E342  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD6E342  _ZN9wxAppBase14SendIdleEventsEP8wxWindowR11wxIdleEvent
6CD6E4A8  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD6E4A8  _ZN9wxAppBase11ProcessIdleEv
6CD90AD1  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD90AD1  _ZN17wxEventLoopManual3RunEv
6CD33CC7  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD33CC7  _ZN8wxDialog9ShowModalEv
6CDE7E7C  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CDE7E7C  _Z22wxGetSingleChoiceIndexRK8wxStringS1_iPS0_P8wxWindowiibii
6CD96DA2  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD96DA2  _ZN12wxFontMapper17CharsetToEncodingERK8wxStringb
618362BC  D:\Program Files\CodeBlocks\codeblocks.dll:618362BC  _ZN16EncodingDetector14DetectEncodingEPKhjb
6183676D  D:\Program Files\CodeBlocks\codeblocks.dll:6183676D  _ZN16EncodingDetectorC1EP10LoaderBase
6193E1EB  D:\Program Files\CodeBlocks\codeblocks.dll:6193E1EB  _ZN20cbEditorInternalDataC1EP8cbEditorP10LoaderBase
617D46CF  D:\Program Files\CodeBlocks\codeblocks.dll:617D46CF  _ZN8cbEditor17DoInitializationsERK8wxStringP10LoaderBase
617D4C51  D:\Program Files\CodeBlocks\codeblocks.dll:617D4C51  _ZN8cbEditorC1EP8wxWindowP10LoaderBaseRK8wxStringP15EditorColourSet
61829918  D:\Program Files\CodeBlocks\codeblocks.dll:61829918  _ZN13EditorManager4OpenEP10LoaderBaseRK8wxStringiP11ProjectFile
617DC7BB  D:\Program Files\CodeBlocks\codeblocks.dll:617DC7BB  _ZN9cbProject10LoadLayoutEv
6188668E  D:\Program Files\CodeBlocks\codeblocks.dll:6188668E  _ZN14ProjectManager17EndLoadingProjectEP9cbProject
61888C9D  D:\Program Files\CodeBlocks\codeblocks.dll:61888C9D  _ZN14ProjectManager11LoadProjectERK8wxStringb
0042D178  D:\Program Files\CodeBlocks\codeblocks.exe:0042D178
0042D4DD  D:\Program Files\CodeBlocks\codeblocks.exe:0042D4DD
0042DE61  D:\Program Files\CodeBlocks\codeblocks.exe:0042DE61
6CCCA4AE  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCA4AE  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
6CCCBA89  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBA89  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
6CCCBFBF  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBFBF  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CCCBF61  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCCBF61  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD99760  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD99760  _ZN11wxFrameBase14ProcessCommandEi
6CD37531  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD37531  _ZN7wxFrame13HandleCommandEttPv
6CD38FB7  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD38FB7  _ZN7wxFrame13MSWWindowProcEjjl
6CD147A1  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD147A1  _Z9wxWndProcP6HWND__jjl@16
7E418734  C:\WINDOWS\system32\USER32.dll:7E418734  GetDC
7E418816  C:\WINDOWS\system32\USER32.dll:7E418816  GetDC
7E4189CD  C:\WINDOWS\system32\USER32.dll:7E4189CD  GetWindowLongW
7E418A10  C:\WINDOWS\system32\USER32.dll:7E418A10  DispatchMessageW
6CCFC0E0  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCFC0E0  _ZN11wxEventLoop14ProcessMessageEP6tagMSG
6CCFC3EC  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCFC3EC  _ZN11wxEventLoop8DispatchEv
6CD90AE3  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD90AE3  _ZN17wxEventLoopManual3RunEv
6CD6E3EB  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD6E3EB  _ZN9wxAppBase8MainLoopEv
0040374A  D:\Program Files\CodeBlocks\codeblocks.exe:0040374A
6CC770AD  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CC770AD  _Z12wxInitializeiPPw
6CCD21B8  D:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCD21B8  _Z7wxEntryP11HINSTANCE__S0_Pci
00405C62  D:\Program Files\CodeBlocks\codeblocks.exe:00405C62
0044C1F8  D:\Program Files\CodeBlocks\codeblocks.exe:0044C1F8
0040124B  D:\Program Files\CodeBlocks\codeblocks.exe:0040124B
004012B8  D:\Program Files\CodeBlocks\codeblocks.exe:004012B8
7C816FD7  C:\WINDOWS\system32\kernel32.dll:7C816FD7  RegisterWaitForInputIdle



Title: Re: [BUG] Crashed while identifying encoding of the source file
Post by: MortenMacFly on November 29, 2007, 12:59:45 pm
I post my project here. :P
This project works just fine here but has no chinese characters at all...?! Are you sure you posted a right example?
Title: Re: [BUG] Crashed while identifying encoding of the source file
Post by: shajunxing on November 29, 2007, 02:00:57 pm
Thanks for your reply. I tried again and found it very strange that some can open and some cannot, whether or not containing chinese characters. I posted some of them below, "samples" can open but "unihead" can't. My OS is Windows XP english version (Regional and language are all set to China). :shock:

[attachment deleted by admin]
Title: Re: [BUG] Crashed while identifying encoding of the source file
Post by: Biplab on November 29, 2007, 02:47:03 pm
Thanks for your reply. I tried again and found it very strange that some can open and some cannot, whether or not containing chinese characters. I posted some of them below, "samples" can open but "unihead" can't. My OS is Windows XP english version (Regional and language are all set to China). :shock:

Both projects open fine in my PC. Though the Chinese characters didn't appear as I don't have that language installed in my PC. :)

I don't have much time at hand to check this further. But if the Project path contains non-english characters, C::B may not open the project / crash sometimes.

Also your crash report is not pointing to the the encoding detection routine. :)
Title: Re: [BUG] Crashed while identifying encoding of the source file
Post by: MortenMacFly on November 29, 2007, 02:56:12 pm
Both projects open fine in my PC.
For me, too.  What version are you using? Please try the one of 28th of november and look if the bug still persists.

Also your crash report is not pointing to the the encoding detection routine. :)
Could be of course... but we have no demangling... so this is of not much help. :-(
Title: Re: [BUG] Crashed while identifying encoding of the source file
Post by: thomas on November 29, 2007, 04:30:51 pm
Is the encoding UTF-16 or UTF-32 by any chance?
Title: Re: [BUG] Crashed while identifying encoding of the source file
Post by: shajunxing on December 01, 2007, 12:29:23 am
It really did maze me, so I did some experiments again in my virtual machine. The OS is windows XP english version and the project is my "unihead", and the path didn't contain any chinese characters, and so on... :lol: I found that whether the whole envirment is chinese or english(switched in regional settings) is not the point. I tried to delete C::B configuration files and to my surprise, the problem disappeared. So I carefully checked the default settings and found that the default encoding is "windows-1252". When it is changed to "default", problem appears... :shock:
Title: Re: [BUG] Crashed while identifying encoding of the source file
Post by: shajunxing on December 01, 2007, 01:22:41 am
I am using the newest 4681 version :P