[Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-12-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #14 from Alain Romedenne  ---
(In reply to Isatis34 from comment #13)
> Hello,
> 
> I tested Version: 7.6.5.0.0+ (X86_64) / LibreOffice Community
> Build ID: 4073f13330600d3efc25fc25450f9f635c6e74b2
> CPU threads: 2; OS: Linux 3.10; UI render: default; VCL: gtk3
> Locale: fr-FR (fr_FR.UTF-8); UI: en-US
> Calc: threaded
> 
> There is no crash now, many thanks.
> 
> So now, this code works, When disableCommand stops, the menu About is not
> visible. :
> 
> Sub disableAboutCommand()
>   disableCommand("About")
> End Sub
> Function disableCommand( cmd As String )
> Dim keyNode As Object '
> com.sun.star.configuration.Configuration(Update)Access '
> 
>   With GlobalScope.Basiclibraries
>   If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
>   End With
> 
>   ' Set the root path for our configuration access
>   keyNode =
> Tools.Misc.GetRegistryKeyContent("org.openoffice.Office.Commands/Execute/
> Disabled", True)
> 
>   newCmd = keyNode.CreateInstanceWithArguments( Array() ) 
>   newCmd.setPropertyValue( "Command", cmd ) ' Add cmd to disabled command
> list 
>   keyNode.insertByName( "Command-" & cmd, newCmd) ' name must be unique
>   
>   keyNode.commitChanges ' flush changes
> End Function
> 
> 
> I try the inverse :
> 
> Sub enableAboutCommand()
>   enableCommand("About")
> End Sub
> 
> Function enableCommand( cmd As String )
> 'on error resume next
> 
>   Dim keyNode As Object '
> com.sun.star.configuration.Configuration(Update)Access '
> 
>   ' Set the root path for our configuration access
>   With GlobalScope.Basiclibraries
> If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
> End With
> keyNode =
> Tools.Misc.GetRegistryKeyContent("org.openoffice.Office.Commands/Execute/
> Disabled", True)
> 
>   newCmd = keyNode.CreateInstanceWithArguments( Array() ) 
> 
>   newCmd.setPropertyValue( "Command", cmd ) ' Add cmd to disabled command
> list 
> 
>   keyNode.removeByName( "Command-" & cmd) ' name must be unique
> 
>   keyNode.commitChanges ' flush changes
> 
> End Function 
> 
> This code doesn't crash, but I've to restart LibreOffice to hae About menu
> visible.

This behaviour is already reported in bug#158157

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-12-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #13 from Isatis34  ---
Hello,

I tested Version: 7.6.5.0.0+ (X86_64) / LibreOffice Community
Build ID: 4073f13330600d3efc25fc25450f9f635c6e74b2
CPU threads: 2; OS: Linux 3.10; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded

There is no crash now, many thanks.

So now, this code works, When disableCommand stops, the menu About is not
visible. :

Sub disableAboutCommand()
disableCommand("About")
End Sub
Function disableCommand( cmd As String )
Dim keyNode As Object ' com.sun.star.configuration.Configuration(Update)Access
'

With GlobalScope.Basiclibraries
If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
End With

' Set the root path for our configuration access
keyNode =
Tools.Misc.GetRegistryKeyContent("org.openoffice.Office.Commands/Execute/Disabled",
True)

newCmd = keyNode.CreateInstanceWithArguments( Array() ) 
newCmd.setPropertyValue( "Command", cmd ) ' Add cmd to disabled command
list 
keyNode.insertByName( "Command-" & cmd, newCmd) ' name must be unique

keyNode.commitChanges ' flush changes
End Function


I try the inverse :

Sub enableAboutCommand()
enableCommand("About")
End Sub

Function enableCommand( cmd As String )
'on error resume next

Dim keyNode As Object '
com.sun.star.configuration.Configuration(Update)Access '

' Set the root path for our configuration access
With GlobalScope.Basiclibraries
If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
End With
keyNode =
Tools.Misc.GetRegistryKeyContent("org.openoffice.Office.Commands/Execute/Disabled",
True)

newCmd = keyNode.CreateInstanceWithArguments( Array() ) 

newCmd.setPropertyValue( "Command", cmd ) ' Add cmd to disabled command
list 

keyNode.removeByName( "Command-" & cmd) ' name must be unique

keyNode.commitChanges ' flush changes

End Function 

This code doesn't crash, but I've to restart LibreOffice to hae About menu
visible.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-12-08 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #12 from Commit Notification 
 ---
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/5f37e4769420e216e95225a1de0c6074e97ad62b

tdf#157915 Error when running a Basic macro with instruction commitChanges

It will be available in 7.6.5.

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

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-12-08 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

Commit Notification  changed:

   What|Removed |Added

 Whiteboard|target:24.2.0   |target:24.2.0 target:7.6.5

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-12-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

Noel Grandin  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-12-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #11 from Commit Notification 
 ---
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/de9667d419bae2c03adf9a9c08b20cd519137cba

tdf#157915 Error when running a Basic macro with instruction commitChanges

It will be available in 24.2.0.

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

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-12-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

Commit Notification  changed:

   What|Removed |Added

 Whiteboard||target:24.2.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-12-06 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #10 from Noel Grandin  ---
So I have a fix for part of this, the part the Isatis34 reported, and which
primarily shows up on windows.

However, on Linux, when testing with the test document kindly supplied by
Alain, we have another problem: So the about dialog is async. But the message
box is not. Which means that, depending on timing, the AboutDialog could end up
above the message box, even though the message-box run loop is top of stack.
And I cant make the message box async, because the basic evaluation loop is
synchronous, and expects the message box to be done, when the message box
function returns.

So even though I have fixed the original problem, the test macro is still going
to freeze LO on Linux, and that is something I cannot fix - that is a broader
problem  that will affect the interaction of any asynchronous dialog and a
Basic message box.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-11-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

Stéphane Guillou (stragu)  changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=15
   ||8157

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-11-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

Stéphane Guillou (stragu)  changed:

   What|Removed |Added

  Regression By||Noel Grandin
Version|7.5.7.1 release |7.4.0.0 alpha0+
   Priority|medium  |high
   Severity|normal  |major
   Keywords||bibisected, bisected,
   ||regression
 CC||noelgran...@gmail.com,
   ||stephane.guillou@libreoffic
   ||e.org

--- Comment #9 from Stéphane Guillou (stragu) 
 ---
There could be a couple of different things in this report, but here's my test
results:

With attachment 190436, no freeze in:

Version: 7.3.7.2 / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US

Reproduced the freeze in:

Version: 7.4.7.2 / LibreOffice Community
Build ID: 723314e595e8007d3cf785c16538505a1c878ca5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US

Still freezing in recent trunk build:

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5589659829f8a1cef8ca1c8a468732105bbe231b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US

Bibisected with linux-64-7.4 to first bad build commit
[97472a721e8176c6e6309166e421dab573b0d780] which points to core commit:

commit  1576ef8532cf2cea2da361db9c5707f1994e65e2
author  Noel GrandinThu Dec 23 18:40:44 2021 +0200
committer   Noel GrandinFri Dec 24 19:50:02 2021 +0100
osl::Mutex->std::mutex in SvtCommandOptions
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127413

Noel, can you please have a look?

To be clear, I tested the attachment with a new profile before and after the
commit, with Low macro security setting. Since the commit, LO freezes after
pressing OK on the dialog with message:
> "Ok, dispatch object for .uno:Quit"

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-11-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

Alain Romedenne  changed:

   What|Removed |Added

 Blocks||127590


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=127590
[Bug 127590] [META] Application Programming Interface (API), when all scripted
languages are affected
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-10-29 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

elmau  changed:

   What|Removed |Added

Version|7.6.2.1 release |7.5.7.1 release
 OS|Windows (All)   |All

--- Comment #8 from elmau  ---
Reproducible with code Python too.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-10-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #7 from B. Antonio Fernández  ---
Created attachment 190446
  --> https://bugs.documentfoundation.org/attachment.cgi?id=190446=edit
Version

I get the same error but menu entry is disable
Version: 7.5.8.1 (X86_64) / LibreOffice Community
Build ID: a3cc32c5bcaabeae7ab60e12c44c40a7d8d36345
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-10-26 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #6 from Celia Palacios  ---
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

I ran the macro from the IDE, no messages at all. But the menus freezed and
LibreOffice crashed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-10-26 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #5 from elmau  ---
I can reproduced the problem in:

Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 50(Build:1)
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: es-MX (en_US.UTF-8); UI: en-US
7.5.7-3
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-10-26 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #4 from Alain Romedenne  ---
Created attachment 190436
  --> https://bugs.documentfoundation.org/attachment.cgi?id=190436=edit
Disable commands BASIC sample

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-10-26 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

Alain Romedenne  changed:

   What|Removed |Added

 CC||alain.romedenne@libreoffice
   ||.org
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #3 from Alain Romedenne  ---
I reproduced the problem using:

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: en-US
Calc: CL threaded

The attached doc reproduces the exception, whilst it functions properly in the
following context:

Version: 7.2.5.2 (x86) / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: en-US
Calc: CL

I assume it's a regression in .commitChanges() method

the attached doc is a BASIC port of wiki Java example at:
https://wiki.documentfoundation.org/Documentation/DevGuide/Writing_UNO_Components#Disable_Commands

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-10-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

--- Comment #2 from Isatis34  ---
Hello

I try this macro with LibreOffice 7.6.2.1 on CentOS and LO crashed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157915] Error UNO type of C++ when running a Basic macro with instruction commitChanges for org.openoffice.Office.Commands/Execute/Disabled

2023-10-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157915

Isatis34  changed:

   What|Removed |Added

Version|7.5.3.2 release |7.6.2.1 release

--- Comment #1 from Isatis34  ---
Hello, 

I just update my LO to 7.6.2.1


Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL threaded

I have the same error.

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.