Ticket #174 (closed enhancement: fixed)

Opened 14 months ago

Last modified 11 months ago

COBIA initialization diagnostics

Reported by: jasper Owned by: jasper
Priority: major Milestone: Maintenance of Phase II
Component: COBIA core Version: 1.2.0.12
Keywords: Cc:

Description (last modified by michelpons) (diff)

On some systems, particularly during installations, cobiaRegister (or wCobiaRegister) typically fails with the message "CAPE-OPEN initialization fails".

Several attempts to debug this after-the-fact have failed, either because the problem is not reproducible on my computer after transferring all target files, or because the problem spontaneously corrects itself.

I suggest to put in place better textual error messages about why COBIA fails - e.g. report on failure to load the COBIA core DLL (with path to the DLL and error code), report on failure to load any of the function pointers, etc.

Change History

comment:1 Changed 13 months ago by jasper

  • Status changed from new to closed
  • Resolution set to fixed

comment:3 Changed 13 months ago by jasper

comment:4 Changed 13 months ago by michelpons

  • Description modified (diff)

comment:5 Changed 13 months ago by michelpons

Within the code changes brought through the resolution of this ticket, what is the meaning of message "CAPE-OPEN initialization failed" that can be returned by code present at line 127 in cobiaRegister.cpp?

comment:6 Changed 13 months ago by jasper

This message is followed by the reason for the failure.

comment:7 Changed 13 months ago by michelpons

The message"CAPE-OPEN initialization failed" looks like "CAPE-OPEN", whatever it means, has to be initialized.

A PMC is requested by the PME to initialize itself using ICapeUtilities::Initialize. This call may fail for various reasons.

What is the above message referring to? I don't think it relates to the call to ICapeUtilities::Initialize since the above error message may pop up during installation of a component.

comment:8 Changed 13 months ago by jasper

It pertains to COBIA.dll not being loaded, either because it was not found, or it could not be loaded into memory, or one of the entry points could not be found. The message following "CAPE-OPEN initialation failed" explains this.

It literally means the function "capeInitialize()" did not succeed.

Last edited 13 months ago by jasper (previous) (diff)

comment:9 Changed 13 months ago by michelpons

So why the message is not "COBIA failed to load:" which is more or less the message that is displayed in other cases? COBIA execution as a middleware relies on COBIA.dll. Why is it necessary to make a difference between "CAPE-OPEN initialization failed" and "COBIA failed to load"? Even, if the issue is that capeInitialize() failed, why isn't the message "COBIA failed to initialize"?

comment:10 Changed 13 months ago by jasper

Do you think if somebody uses a CAPE-OPEN unit operation or property package in - say - AspenPlus?, the message about COBIA is more helpful than the CAPE-OPEN system failing to initialize? (the second part will identify it is COBIA).

comment:11 Changed 11 months ago by jasper

Fixed a variable name: res was used in error message formatting but also elsewhere in the function, causing the compiler to complain.

Note: See TracTickets for help on using tickets.