Bug 112282 - Crash in: ntdll.dll
Summary: Crash in: ntdll.dll
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-08 02:56 UTC by PaulJayD
Modified: 2018-12-18 12:23 UTC (History)
2 users (show)

See Also:
Crash report or crash signature: ["ntdll.dll"]


Attachments
basic macros (41.90 KB, text/plain)
2017-09-10 22:04 UTC, PaulJayD
Details
Document loaded when error occurs. (17.24 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-09-11 12:56 UTC, PaulJayD
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PaulJayD 2017-09-08 02:56:06 UTC
This bug was filed from the crash reporting server and is br-cc4f9d91-0fb0-4372-9cbd-933b40a8269e.
=======================================
Basic macro caused this error.
I believe there is simply an un-balanced if/endif.
That is, a missing endif.
Comment 1 Julien Nabet 2017-09-08 07:13:06 UTC
Would it be possible you attach the file to allow us to reproduce this?
Comment 2 PaulJayD 2017-09-10 22:04:20 UTC
Created attachment 136156 [details]
basic macros

Attached is the file ("basic macros" causing the bug:
It consists of 2 macro 'sets'. The first is "sDoc" (secure Documents). It goes from line 1 to line 1125. It's purpose is to suggest Save/File to the S: disk.
It has been in use for a long time with no problems.

I added the "PoolColSort" (lines 1126-1365) macro recently, and if you comment out line 1350 (the "endif") (which I inadvertently left out) and hit the "Compile" button, the compiler will loop forever or possibly crash (I'm no longer sure which is the case).

Good luck
Comment 3 Xisco Faulí 2017-09-11 09:49:56 UTC
In

Version: 5.4.1.2
Build ID: 1:5.4.1~rc2-0ubuntu0.17.04.1~lo0.1
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

if I remove the endif in line 1350 I get this error when I try to run the macro:

BASIC syntax error.
Statement block still open: End Sub missing.

Could you please attach the whole document instead of only the macro...
Comment 4 PaulJayD 2017-09-11 12:56:06 UTC
Created attachment 136171 [details]
Document loaded when error occurs.

This is the document that's loaded when the PoolColSort macro is being editted/compiled
Comment 5 PaulJayD 2017-09-11 12:57:17 UTC
Calc document attached
Comment 6 Xisco Faulí 2017-09-11 20:01:34 UTC
So, how do I reproduce the crash? In the document attached, the endif is gone, and if I add it and run it, it doesn't crash. BTW, do you reproduce the crash systematically?
Comment 7 PaulJayD 2017-09-12 01:11:19 UTC
1. The 'endif' IS present in the file. It's just above the comment line: 
 
      ' add majority pick to column header

2. The problem is reproduceable on my machine.

3. To reproduce:

   Load spreadsheet into LO.
   Click Tools / Macros / Organize Macros / LibreOffice Basic.
   Expand My Macros / Standard.
   Click New.
   Remove "sub Macro1...end sub" text.
   Load my .BAS file.
   Comment-out line 1350 ("endif"), 
   Hit Compile button.

Result: My machine hangs for about 15 seconds, then crashes.

Paul
Comment 8 PaulJayD 2017-09-21 14:15:47 UTC
Are you able to reproduce this?
Paul
Comment 9 Xisco Faulí 2017-11-13 09:10:42 UTC
(In reply to PaulJayD from comment #7)
> 1. The 'endif' IS present in the file. It's just above the comment line: 
>  
>       ' add majority pick to column header
> 
> 2. The problem is reproduceable on my machine.
> 
> 3. To reproduce:
> 
>    Load spreadsheet into LO.
>    Click Tools / Macros / Organize Macros / LibreOffice Basic.
>    Expand My Macros / Standard.
>    Click New.
>    Remove "sub Macro1...end sub" text.
>    Load my .BAS file.
>    Comment-out line 1350 ("endif"), 
>    Hit Compile button.
> 
> Result: My machine hangs for about 15 seconds, then crashes.
> 
> Paul

Hi Paul,
I've followed all your steps, and when I compile the code i still get the same error: BASIC syntax error.
Statement block still open: End Sub missing.

Version: 6.0.0.0.alpha1+
Build ID: b73c66597884f03443ee8888cb6c204b78bb6cda
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

nor in

Version: 6.0.0.0.alpha1+
Build ID: a7f961ddd88df4117de5f7c199881cf75d2905b5
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 10 Julien Nabet 2017-11-13 09:22:45 UTC
Paul: could you give a try to 5.4.3 + use a brand new LO profile (see https://wiki.documentfoundation.org/User_Profile#Windows)
Perhaps it could be already fixed?
Comment 11 PaulJayD 2017-12-10 15:41:23 UTC
I want to close this bug.
I can reproduce it, however, it's clearly the unbalanced if/endif and all the 
code accompanying it.
Comment 12 Mike Kaganski 2018-12-18 12:23:22 UTC
I didn't try to repro it (just came across), but what I wanted to tell is even if it's a crash related to unbalanced if/endifs, such crashes should be fixed (if reproducible), because user errors should be reported as messages, not crash software.