Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error starting extension #20

Open
typiconman opened this issue Jun 23, 2018 · 13 comments
Open

Error starting extension #20

typiconman opened this issue Jun 23, 2018 · 13 comments

Comments

@typiconman
Copy link

typiconman commented Jun 23, 2018

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link

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:

  • Running as admin and "just for me"
  • Substituting line 67 with DialogLibraries.LoadLibrary ("OOoLilyPond"). The error message keeps the same.
  • Installing in version 5. In fact, I first tried installing the ext on v5. After the error I realized the Office was outdated and updated, but I the message persists.

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
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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
Copy link

Hello Klaus,

Thanks for your time!

Cheers.

Yves-Antoine.

@KlausBlum
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants