How to troubleshoot the DEPS Solver initialization error in macro in Calc 7.3?

I want to use the DEPS solver inside a macro and get an error. For this report, I have used an example from The macro blows up on the command:
Solver.Objective = ObjectiveCell with the following message:

Message: [jni_uno bridge error] UNO calling Java method Objective: [] null-ref given! java stack trace: ./bridges/source/jni_uno/jni_uno2java.cxx:783.

The problem relates to LO Calc version:

Thanks in advance for your advice.

For me, runs to completion, per se, on Calc 7.4.2 on Windows 10 with no special provisions.


If IsNull(ObjectCell) Then MsgBox "ObjectivCell is null."

before the method call to prove to yourself that is the case. Have you modified the ObjectiveCell reference in any way? Are you still going after simple sheet 0, etc.?

1 Like

Thanks for your efforts, but it doesn’t work for me.

  1. I have specially installed LO via snap.

  2. I installed the extension from the nlpsolver.oxt file for this version of LO.

  3. I am getting the same error.

  4. The ObjectCell contains the cell address and is not Null

I’m still looking for a solution.

Have you tried a full install of LO, rather than a snap install? That would be a difference in our systems.

Hi @joshua4,
I have installed version LO on Windows 10 machine, and I confirm - The DEPS solver works fine :slight_smile:.
Now I need to find a solution for Linux Mint 21 Cinnamon. After installing the snap, I have two versions of LO 7.2 and 7.4. In this setup, version 7.4 is extremely slow, so I’m looking for a way to avoid uninstalling version 7.2 permanently. Does anyone have a similar experience?

No progress for me today. But I have an interesting observation. In sequence:

  MsgBox IsNull(oSolver.Variables)
  MsgBox IsNull(oSolver.Constraints)
  MsgBox IsNull(oSolver.Objectives)

the first two statements correctly return False, and the last one informs that Objectives was not found. How to explain it?

It is odd that you have oSolver.Objectives in the plural. Variables and Contraints are arrays, but Objective (singular) is just a CellAddress object.