Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on build #63

Open
woollybah opened this issue Jun 27, 2019 · 1 comment
Open

Crash on build #63

woollybah opened this issue Jun 27, 2019 · 1 comment

Comments

@woollybah
Copy link
Member

woollybah commented Jun 27, 2019

The following will crash MaxIDE on build.

SuperStrict

Framework brl.standardio

Type Dummy

Note: Type Dummy is the last line in the source.

The issue appears to be that the compiler is reporting an error on the line after Type Dummy, line 6, which doesn't actually exist in the source. MaxIDE then attempts to highlight the line, and Scintilla blows up :

#0  0x0000000000472b72 in Scintilla::Editor::WndProc(unsigned int, unsigned long long, long long) ()
#1  0x000000000042dd60 in ScintillaWin::WndProc(unsigned int, unsigned long long, long long) ()
#2  0x00007ffc474c6d41 in USER32!CallWindowProcW () from C:\WINDOWS\System32\user32.dll
#3  0x00007ffc474c690b in USER32!CallWindowProcW () from C:\WINDOWS\System32\user32.dll
#4  0x000000000076d200 in maxgui_win32maxguiex_TWindowsGUIDriver_ClassWndProc_pb_pbuWL ()
#5  0x00007ffc474c6d41 in USER32!CallWindowProcW () from C:\WINDOWS\System32\user32.dll
#6  0x00007ffc474c634e in USER32!SendMessageW () from C:\WINDOWS\System32\user32.dll
#7  0x00007ffc474d7335 in USER32!SendMessageA () from C:\WINDOWS\System32\user32.dll
#8  0x0000000000424f78 in bmx_mgta_scintilla_gettextrange ()
#9  0x0000000000423a25 in _maxgui_maxguitextareascintilla_win32_TWindowsScintillaTextArea_AreaText_iii ()
#10 0x000000000040bf98 in __m_maxide_TOpenCode_HighlightLine_ii ()
#11 0x0000000000401937 in __m_maxide_TOpenCode_Debug_ii ()
#12 0x0000000000405e18 in __m_maxide_TCodePlay_SelectError_Sii ()
#13 0x0000000000407410 in __m_maxide_TCodePlay_ParseError_S ()
#14 0x000000000040df12 in __m_maxide_TOutputPanel_OnEvent ()
#15 0x000000000040b840 in __m_maxide_TCodePlay_poll ()
#16 0x00000000004230d9 in _bb_main ()
#17 0x00000000007d82d9 in __bb_brl_appstub_appstub ()
#18 0x000000000090f352 in main ()

I wouldn't expect Scintilla to necessarily abort given a range outwith the source. So perhaps it may be considered a bug there.
However, we may be able to mitigate by limiting range to actual lines.

@GWRon
Copy link

GWRon commented Jun 27, 2019

Might that be related to bmx-ng/bcc#381 ?
So BCC reports the line where it expects something instead of reporting the line where the expectation was "built up" (IF ... in a multiline if-then, SELECT, Function, Method, Type, Rem, ...)

So if there is a function MyTest() but no end function it will fail too:

SuperStrict

Framework brl.standardio

Function MyTest:int()

-> crash.

Maybe it would be helpful to add both information (somehow):

  • start of the error (assumption)
  • end of the error (when the compiler finally decided to not be able to find the "closing element")

Why? I am annoyed by getting lines highlighted ("expecting ')'") and then have to search for the code line initially opening the block (in my example the "("). There are times where you have to scroll through your code where you forgot to add the "endif" (left an "if" open) or so. Maybe this can get improved somehow.

@ scintilla
I would too limit "highlightline" for all widget systems - native, GTK, WXMax ... so this means limit it in MaxIDE rather than adding a check to the scintilla-wrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants