Bug 99357 - Syntax error in module crashes Basic IDE and Calc on attempt to edit
Summary: Syntax error in module crashes Basic IDE and Calc on attempt to edit
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.1.2.2 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:5.2.0 target:5.1.3
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2016-04-17 02:33 UTC by Mark_T2016
Modified: 2016-10-25 19:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with symbols (5.91 KB, text/plain)
2016-04-17 12:20 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark_T2016 2016-04-17 02:33:10 UTC
Attempt to edit a basic module with only the following content causes Calc and the IDE to crash.

REM  *****  BASIC  *****

Sub Main

	With .XAxis

End Sub

Message box shows "BASIC syntax error. Unexpected symbol: ..", clicking OK to continue results in IDE and Calc crashing and Calc tries to recover the spreadsheet that was open.

Issue found moving blocks of code to try and improve program structure, splitting large sub into separate subs. IDE showed syntax error and then both IDE and Calc crashed. I was only able to recover by editing the Module1.xba in my user profile. Above is minimum code to show the same symptoms on my PC. 

Running Windows 8.1, 64 bit version.
Comment 1 Julien Nabet 2016-04-17 12:20:50 UTC
Created attachment 124428 [details]
bt with symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.

I attached a bt with symbols.
Comment 2 Julien Nabet 2016-04-17 12:25:32 UTC
I submitted a patch on gerrit for master sources, see https://gerrit.libreoffice.org/#/c/24147/
Comment 3 Commit Notification 2016-04-17 13:49:14 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f3dcc44cecf34e00bf7bfc48640915ac87e29b5

tdf#99357: Basic, return if .with pNode null

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2016-04-18 09:47:11 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4cce16ce219eec7410399ac2129689a65ca0b2db&h=libreoffice-5-1

tdf#99357: Basic, return if .with pNode null

It will be available in 5.1.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Julien Nabet 2016-04-18 18:02:29 UTC
Let's put this one to FIXED now
Comment 6 Mark_T2016 2016-04-20 22:44:25 UTC
I verified on windows 8.1 that the latest windows 64 bit version does not crash out the IDE when trying to edit the sample module. I see the syntax error message on editing the module but this is expected.

Also verified no adverse effects on the macro I was developing.

Version tested was:-
master~2016-04-20_16.47.56_LibreOfficeDev_5.2.0.0.alpha0_Win_x64_en-US_de_ar_ja_ru_qtz.msi

I didn't see a version of 5.1.3 for windows, but if you want me to test again then please let me know which version I should try.
Comment 7 Julien Nabet 2016-04-21 05:06:38 UTC
Thank you for your feedback, let's put the tracker to VERIFIED
Comment 8 Julien Nabet 2016-04-21 05:06:56 UTC
and close it...