openlilylib / LO-ly

LibreOffice-LilyPond extension
13 stars 6 forks source link

Error starting extension #20

Open typiconman opened 6 years ago

typiconman commented 6 years ago

Installed the extension in LibreOffice Version: 6.0.4.2 on Linux (Build ID: 1:6.0.4~rc2-0ubuntu0.14.04.2 CPU threads: 4; OS: Linux 3.13; UI render: default; VCL: gtk2;).

When I click the OLy button on the toolbar or select Tools -> Addons -> oooLilyPond from the menus, I get the following error message:

BASIC runtime error.
An exception occurred 
Type: com.sun.star.container.NoSuchElementException
Message: .

The Syntax editor goes to line 67, DialogLibraries.LoadLibrary (constOLyLibraryName).

KlausBlum commented 6 years ago

This is really strange. LoadLibrary has to be called before creating the main window: https://wiki.openoffice.org/wiki/Documentation/DevGuide/Basic/Accessing_Libraries_from_Basic constOLyLibraryName is a variable that contains the string "OOoLilyPond". So, line 67 is equvalent to DialogLibraries.LoadLibrary ("OOoLilyPond") I know that those strings are case-sensitive, but I never experienced a problem with that. Maybe you might try it with "ooolinypond" entirely in lowercase. All development is done under Windows 7, but I have tested the result on Ubuntu Studio without issues. Unfortunately, my experiences with Linux are near zero.

Do you have similar problems with other LibreOffice extensions written in Basic?

Did you try to install OOoLilyPond in previous LibreOffice versions?

KlausBlum commented 6 years ago

Just another idea: When installing the extension, are you given the choice between installing "for all users" and "just for me"? I've read that the latter causes less problems caused by missing administrator privileges.

Cheers, Klaus

pedro-psb commented 6 years ago
Version: 6.1.1.2 (x64)
CompilationID: 5d19a1bfa650b796764388cd8b33a5af1f5baa1b
Threads da CPU:4; SO:Windows 6.1;

I have the very same problem.

I've tried:

I don't use LibreOffice very often, so I can't tell if this happens to other extensions aswell.

I've also tried commenting that line. It produces the same error message, but in "Editor" line 19, but it may be due to the commented line. oEditorDialog = createUnoDialog( DialogLibraries.GetByName(constOLyLibraryName).GetByName("GUI_Editor") )

No more ideias.

KlausBlum commented 6 years ago

Yet another idea:

If the problem persists and the macro stops at line 67, can you "watch" the DialogLibraries expression? It would be interesting to see if it contains an element named "OOoLilyPond".

macroeditor screenshot01

Cheers, Klaus

yaemmanuelli commented 5 years ago

Hello, I have the same issue with OLy 0.5.8 on LibreOffice 6.2.2.2 (Ubuntu 19.04): OOoLilypondMacrosAndDialogBoxesWatchDialogLibraries

Any clues?

Thanks!

-- Yves-Antoine.

KlausBlum commented 5 years ago

Salut Yves-Antoine,

sorry, I still have no idea what is happening here. I can reproduce the error (by using an invalid library name, something like DialogLibraries.LoadLibrary "Blahblah" ), and one problem is that "DialogLibraries" cannot be watched at that time. So we need to check that before the error happens.

Please try the following:

Go to the macro window and set a breakpoint at line 64: Zwischenablage03

Now click the OLy button again. Nothing will happen in LibreOffice, but back in the macro window you should now be able to watch the contents of "DialogLibraries": Zwischenablage05 Unfold the "ElementNames" section. Is there an entry named "OOoLilyPond"?

And please also check if "constOlyLibraryName" contains the same string "OOoLilyPond": Zwischenablage04

Hopefully this will tell us something new...

Cheers, Klaus

yaemmanuelli commented 5 years ago

Hello Klaus,

When following your instructions, there is nothing under "ElementNames" and constOlyLibraryName has the expected value "OOoLilyPond" of type String ElementNamesVoid

Thanks. Regards. -- Yves-Antoine.

KlausBlum commented 5 years ago

Hi Yves-Antoine,

thanks for testing. Now I know that your "ElementNames" list is completely empty.

Unfortunatly I really don't know what to do now. I've desribed the problem on the LO User mailing list: http://document-foundation-mail-archive.969070.n3.nabble.com/LO-Basic-DialogLibraries-contains-no-elements-td4261010.html

That's the only place I know where I could ask for help. Hopefully there is someone with a deeper knowledge than me.

Cheers, Klaus

yaemmanuelli commented 5 years ago

Hello Klaus,

Thanks for your time!

Cheers. -- Yves-Antoine.

serval2412 commented 5 years ago

@KlausBlum: I let a comment here: http://document-foundation-mail-archive.969070.n3.nabble.com/LO-Basic-DialogLibraries-contains-no-elements-td4261140.html

KlausBlum commented 5 years ago

To everyone who is concerned by this issue: Could you please perform the test mentioned by @serval2412 and report here if it helped to solve the problem? These are the steps to be taken:

1.) Uninstall OOoLilyPond via the Extension Manager.

2.) Rename the LO profile folder as desribed here: https://wiki.documentfoundation.org/UserProfile#Resolving_corruption (under "LibreOffice 5.2 and older"!)

3.) Reinstall OOoLilyPond

yaemmanuelli commented 5 years ago

Hello Klaus, I now have a new machine and I successfully installed the extension after having installed LibreOffice and Lilypond.

Thanks for your support. Yves-Antoine.

KlausBlum commented 4 years ago

A user who had the same problem has reported that deleting the subfolder "extensions" inside the user folder did the trick. Other customizations in your LO installation might remain untouched by that. But it will affect every LO extension you have installed, so be prepared that you have to re-install them.