Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index


渡邊です、kaigi2018お疲れ様でした
マクロ実行時に発生するクラッシュ事例について報告します。
大阪十三でのHack時にBASEマクロでチラホラ出てたのを確認し、今日、内容を確認しました。(条件がややこしいですが、クラッシュします)

発生アプリ:BASE(FireBird)とCALC
発生状況:マクロから非表示モードでCALCシートを呼び出した後、Close処理にブレイクポイントを設け、一定時間経過後に処理を続けると発生する
症状:LibreOfficeがクラッシュ
Ver:6.0からだと思います

手順
CalcやBASEのマクロから他のCALCシートを非表示モードで呼び出すマクロを記述する
1. 処理完了時のoDoc.close(True)の行にブレイクポイントをセットする
2. CalcやBASEのマクロから他のCALCシートを非表示モードで呼び出す 処理を頭から流す
3.ブレイクポイントで処理が停止した状態を30秒程度キープする
4.キープしていた処理を続ける
5.ソフトがダウンする

LibreOfficeのCalcやBASE(Firebird)で確認しました

OS:Windows10-64
バージョン: 6.0.3.2 (x64)
Build ID: 8f48d515416608e3a835360314dac7e47fd0b821
CPU threads: 2; OS:Windows 10.0; UI render: default;
ロケール: ja-JP (ja_JP); Calc: group

表示モード時は発生しないようです。

*****マクロコード例*****

Sub Hidden_test001

'******** 非表示モードで開いたODSファイルをクローズする処理時にLibreOfficeがクラッシュします *******
Dim oSheet As Object
Dim SheetMei as string
Dim oUrl As String
Dim oDoc As Object

'******** 開く予定のODSファイルをフルパスで指定し&でファイル名を繋ぎます ********** Dドライブを指定した例です
oUrl = ConvertToURL("D:\DATA\") & "test.ods"
'*********************************************************

Dim aArg2(0) As New com.sun.star.beans.PropertyValue

'####### 非表示モード #######
aArg2(0).Name = "Hidden"        '+++++ この行を有効にすると、指定したCalcシートを非表示モードで開きます
++++++
'####### 非表示モード #######

'******* シートをaArg2(0)で指定したモードで別ウィンドウで開きます
aArg2(0).Value = True
oDoc=StarDesktop.loadComponentFromURL(oURL, "_blank", 0, aArg2())

'Calcシートの0番シートをパラメーターで指定されたシート名に変更します(処理例)
oSheet=oDoc.Sheets(0)            '0番のシートを選択します

SheetMei = "シートHidden_ON"                '非表示モードの時はシート名を"シートHidden_ON"に指定します

oSheet.Name= SheetMei          '表示したCalcファイルの0番のシート名を変更します

oDoc.store()
oDoc.close(True)                      '★ブレイクポイントをここにセットしてください
'★上のoDoc.Close(True)の行にブレイクポイントをセット後、マクロを実行し、処理停止状態のまま20~30秒程度経過後、処理を続けるとクラッシュします。

End Sub

BASEのいつもの不具合かと思いましたが、calcも絡むので全体的だと判断し報告させていただきました。

-- 
Unsubscribe instructions: E-mail to discuss+unsubscribe@ja.libreoffice.org
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/ja/discuss/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.