I just did a code search for the message and found one in "wxApp::OnExceptionInMainLoop" that is in file "src/msw/app.cpp".
bool wxApp::OnExceptionInMainLoop()
{
// ask the user about what to do: use the Win32 API function here as it
// could be dangerous to use any wxWidgets code in this state
switch (
::MessageBox
(
NULL,
wxT("An unhandled exception occurred. Press \"Abort\" to \
terminate the program,\r\n\
\"Retry\" to exit the program normally and \"Ignore\" to try to continue."),
wxT("Unhandled exception"),
MB_ABORTRETRYIGNORE |
MB_ICONERROR|
MB_TASKMODAL
)
)
{
case IDABORT:
throw;
default:
wxFAIL_MSG( wxT("unexpected MessageBox() return code") );
wxFALLTHROUGH;
case IDRETRY:
return false;
case IDIGNORE:
return true;
}
}
Tim S.
I think I've found the culprit !!
call
'm_pData->EnsureConsistentLineEnds();'
who call
'control->ConvertEOLs(control->GetEOLMode());'
which is creating the problem!
A remark : 'control->GetEOLMode()' return 0 (CRLF) while the file contains only 'LF' !
If I comment on this call the problem disappears!
So it's in ...
void wxScintilla::ConvertEOLs(int eolMode)
{
SendMsg(SCI_CONVERTEOLS, eolMode, 0);
}
Then I'm no longer competent.
By finding out why
A remark : 'control->GetEOLMode()' return 0 (CRLF) while the file contains only 'LF' !
I replaced
// control->ConvertEOLs(control->GetEOLMode());
by
in 'Scintilla.h' we find
and then BINGO : it works, no more problems !!
It is therefore a bad detection of the end of line by
int wxScintilla::GetEOLMode() const
{
return SendMsg(SCI_GETEOLMODE, 0, 0);
}
with Win32.
Gentlemen developers, to your keyboards!
My OS Linux, 64bit.
Please post step by step instructions.
1. start codeblocks
2. open this
3. do this
4.
5.
If you want this fixed please fill steps 2-5. I've spend too much time trying to reproduce it and if I'm not able to reproduce it in 5 minutes, I'll switch to doing something else.