Download it now!
Bug 54000 - 3.5.6 release Static Variable Error
Summary: 3.5.6 release Static Variable Error
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.5.6.2 release
Hardware: All Windows (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 54339 55397 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-24 10:48 UTC by David Watford
Modified: 2014-11-06 17:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Extension illustrating a bug in LO Basic (11.95 KB, application/vnd.openofficeorg.extension)
2012-08-24 17:52 UTC, Dave Levitt
Details
Screen capture showing bug (138.32 KB, image/jpeg)
2012-08-24 17:55 UTC, Dave Levitt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Watford 2012-08-24 10:48:58 UTC
In Calc Basic Macro when run with Static variable the program stops at that point giving a "Internal Error" report. 3.5.5 and 3.6.0 does not have the problem.
Comment 1 Dave Levitt 2012-08-24 17:52:37 UTC
Created attachment 66077 [details]
Extension illustrating a bug in LO Basic

This extension seems to behave correctly with OO 3.4, but fails with LO 3.5
Comment 2 Dave Levitt 2012-08-24 17:55:58 UTC
Created attachment 66078 [details]
Screen capture showing bug

Screen capture, with source code excerpt showing the static variable "IndentLevel" declaration and the error when setting the value of the variable to zero
Comment 3 Dave Levitt 2012-08-24 18:03:32 UTC
This bug is not in the current [3.4] Open Office release - but is repeatable in Libre Office 3.5.6.2

-- Test case --
Setup: Install Writer2MoinMoin.oxt [attached] as the only extension for a LO install.

1) Create a new file in Writer
2) Insert two lines of text
3) Change the paragraph type of the first line to 'Heading 1'
4) Pick menu option Tools -> Add-Ons -> Writer2MoinMoin

Output:
a) New Writer window opens
b) first line emitted, with wiki markup
c) Macros & Dialogs window opens, showing the bug [screen capture attached]
Comment 4 Martin Schniewind 2012-09-04 12:19:37 UTC
Still present in 3.6.1.2
Comment 5 netzvamp 2012-09-06 10:11:40 UTC
Following example will demonstrate the bug:

Sub test
	STATIC testvar As Integer
	testvar = testvar + 1
	msgbox testvar
End Sub

Every basic routine that uses STATIC doesn't working and you get an "internal error".
It's present in 3.5.6 and 3.6.1.
Comment 6 Ralf Bensmann 2012-10-18 10:54:46 UTC
I can confirm this bug with LO 3.6.1.2 on Windows
Comment 7 Ralf Bensmann 2012-10-18 10:56:46 UTC
... and NOT with LO 3.6.2.2 on OS X
Comment 8 LeMoyne Castle 2012-12-22 03:53:22 UTC
*** Bug 54339 has been marked as a duplicate of this bug. ***
Comment 9 LeMoyne Castle 2012-12-22 03:53:40 UTC
*** Bug 55397 has been marked as a duplicate of this bug. ***
Comment 10 LeMoyne Castle 2012-12-22 04:10:01 UTC
With several reporters and examples across three bugs (cf. Bug 54339, Bug 55397).
Existed as a show-stopper for any BASIC code using static variables from 3.5 through 3.6.2.  More than one report that it works in 3.6.2 and I can confirm it is working in 3.6.3.  

I would leave it in RESOLVED until: 
1) it can be determined how this got broken/fixed, and  
2) a [very simple] regression test can be included in the BASIC unit test.   
But of course, qa may mark this as verified at any time.
Comment 11 LeMoyne Castle 2012-12-22 04:12:25 UTC
prev comment should read: 

Existed as a show-stopper for any BASIC code using static variables from 3.5 through 3.6.1*** .   More than one report that it works in 3.6.2 ...
Comment 12 Maxime de Roucy 2013-01-21 14:47:46 UTC
The problem is back on 4.1.0.0.alpha0+ (Build ID: 3207c85fc957a347aaf78e7328a52d85edab0f7).

When I execute :
1.  Sub Main
2.	STATIC testvar As Integer
3.	testvar = testvar + 1
4.	msgbox testvar
5.  End Sub

I get an error on line 3  :
  unknown.
  Internal error Opcode.
Comment 13 Joel Madero 2014-11-06 16:24:34 UTC
Confusion as to if this was ever confirmed - moving to UNCONFIRMED to get fresh eyes on it from QA. Thanks
Comment 14 raal 2014-11-06 17:23:23 UTC
I  can not confirm with Version: 4.4.0.0.alpha1+
Build ID: 04ea7b24ec1b5a027efa0b850f2bc3ac7116c52e
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-10-31_23:27:49

I can not confirm with Verze: 4.3.2.2
ID sestavení: edfb5295ba211bd31ad47d0bad0118690f76407d, windows7

Setting as worksforme.

Tested with following example:

Sub test
	STATIC testvar As Integer
	testvar = testvar + 1
	msgbox testvar
End Sub