Intermittent forms errors related to Hint.PLL (part one)

Note: there are really two problems here & I am looking for answers to the both questions...(hence the whopping points) but may give full points to someone who helps fix only the first.

We are experiencing some intermittent errors on two of our Oracle Forms modules which seem to be caused by calls to procedures in the Oracle Forms HINT library.  The two cases seem to be related, so I have grouped them together, but they are occurring on two different form modules.

Form A:

When the form initially opens, these error messages appear, at least 50% of the time:

FRM-41045: Cannot find item: invalid ID  (appears 3 times, and is sometimes followed by:)
FRM-41058: No such property for Get-Item-Property (which may appear by itself, or after the first messages)

These error messages are intermittent, apparently originating from within the attached Oracle HINT library, from the procedure HINT.ShowButtonHelpHandler, called from the form-level When-Timer-Expired trigger, which seems to fire on a fairly random basis in relation to when the form is initially called from the menu. (well at least it seems random)
The problem can be "fixed" by commenting out the call to the HINT procedure in the When-Timer-Expired  trigger, which is the only place it appears in the form.  The drawback is that the "balloon-help" hint text no longer appears.  With or without this fix, the business functionality of the form works exactly the same...just not as polished.

We have tried the following to fix the form:
1) run the form in debug mode
2) inserted my own messages: messages seem to affect the time of the initial appearance of the defect - an unreliable testing method
3) examined the code involved in form level triggers which fire before the messages appear (i.e.. code called from the Pre-Form or When-New-Form-Instance triggers).  There were no apparent anomalies.
4) created a local copy of the procedures in the Oracle HINT library, specifically, a copy of the HINT package and       package spec.  We won't modify this library itself, as we cannot predict how it will affect the other modules.  I placed messages in it too, in the hope of finding the cause of the error.  This is high-level code, and the results of this testing were inconclusive, as I don't precisely know what I should be looking for.

(now..the related question..but answer should be posted in part two)

Form B:  

This defect is also intermittent, and seems to stem from an unhandled exception which is being raised by the form-level When-Mouse-Enter trigger.  The form opens in ENTER-QUERY mode.  We EXECUTE-QUERY on any record in the topmost block, and wait a few seconds for all of the several master-detail relations to do their work and populate the other blocks on the form.  Upon placing the cursor over a button in the last block on the screen, which calls a popup block for data entry, the message FRM-40735 When-Mouse-Enter trigger raised unhandled exception Value-Error appears.  After it has appeared once, the same message will continue to appear whenever the mouse is moved.

Additional Information:
1) Moving the mouse before the form has finished populating all the blocks and then navigating to the last record of the last block on the form seems to precipitate the problem.
2) Although the application files are all kept on our LAN, the database is at the client site, and our connection is often SLOW.
3) We are using Pentium 133 workstations, Windows NT 4.0, Oracle Developer/2000 toolset (32-bit version - the version of Forms is running against an Oracle7 Server (with the distributed, replication and parallel query options).
Any help or advice you can offer would be appreciated.  Please let us know if you need more info.  Thanks.

jtriftsMI and AutomationAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jtriftsMI and AutomationAuthor Commented:
Adjusted points to 150
jtriftsMI and AutomationAuthor Commented:
Edited text of question
jtriftsMI and AutomationAuthor Commented:
Adjusted points to 300
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

jtriftsMI and AutomationAuthor Commented:
Adjusted points to 350
Some suggestions:

It is odd that you are receiving the FRM-41045 and FRM-41058 messages. You have verified that they originate from within HINT.PLL, so I assume that these messages do not relate to missing menu items or something like that. The HINT.PLL code fires whenever the cursor enters a new object on a canvas. It verifies that the object is a button, and also that it is an icon button. If the object is not an icon button, it does not try to display balloon help. It sounds like in your case, the HINT.PLL code is somehow getting past this point for an object that is NOT an icon button, and then the code tries to get a property that applies to a button, but not to the current object.
Maybe you can add messages to HINT.PLL that identify the object that it is trying to display balloon help for, to see if it is trying to do it for objects other than icon buttons.

Also, verify that you are using the current HINT.PLL that comes with your current version of Forms. I once tried upgrading to Forms 5.0, and immediately started getting VALUE_ERROR errors from HINT.PLL.
I looked the code and discovered that a procedure is calling three times get_item_property built-in function. This code is using a system variable to get the item on which the mouse cursor is. This might be the reason of your first problem (FRM 41045 Invalid ID)

A good way forward to check if this really the problem is to display the value of that system variable from the code itself.

What you have to do:
  1 - Open the hint.pll
  2 - Copy the code into your form program unit section.
  3 - Edit the package body.
  4 - Go to sync_mouse_info procedure declaration
    4.a - Modify the procedure to display the system variable:  

-- Procedure after modification.
PROCEDURE sync_mouse_info IS
    mouse_item   := Name_In('SYSTEM.MOUSE_ITEM');
    -- Modification to display the item on which the mouse
    -- cursor is.

    mouse_canvas := Name_In('SYSTEM.MOUSE_CANVAS');
    appInst      := TO_PLS_INTEGER(
    IF mouse_item IS NOT NULL THEN
      hWind        := TO_PLS_INTEGER(
      mouse_item_hint := Get_Item_Property(mouse_item,HINT_TEXT);
      IF SUBSTR(mouse_item_hint,1,1) = CHR(0) THEN
        mouse_item_hint := NULL;
      END IF;
      hWind := NULL;
    END IF;

  5 - (Removed the library from the form in attached library section)
  6 - Run the form, try to get the error message

  When you get the FRM 41045 error, look at the mouse item value, and check if it is a propert item name. If this item name doesn't exist in your form (or is null) then this is the problem

jtriftsMI and AutomationAuthor Commented:
Apologies on taking so long to get back to this question...I have been out of country for the past 5 weeks...

I really should reopen this question and grant the points to eoing... the problem turned out to be due to the fact that we shouldn't have been using this call in the first is not a button. (DYO!!!)

I had really got this one figured out before I went away...with some help from one of the Oracle Newsgroups (go figure) is the exact solution:

  IF :system.mouse_item IS NOT NULL THEN /*Condition A*/
    END IF;

/*Condition A*/
This gets rid of (FRM-41045: Cannot find item: invalid ID) because the timer is expiring while the mouse is not on an item.

/*Condition B*/
This gets rid of (FRM-41058: No such property for Get-Item-Property) because even if your mouse is on an item while the timer expires, it may not be an item which has a LABEL. Procedure HINT.ShowButtonHelpHandler calls HINT.mouse_item_label which attempts to get this property of the :system.mouse_item.

In summary, HINT.ShowButtonHelpHandler should only be called when your mouse is on a Button.

However, I offered the points and I would be happy to let you have them...

linda101698Commented: is the exact solution:

       IF :system.mouse_item IS NOT NULL THEN /*Condition A*/
     'BUTTON' THEN /*Condition B*/
         END IF;
       END IF;

     /*Condition A*/
     This gets rid of (FRM-41045: Cannot find item: invalid ID) because the timer
     is expiring while the mouse is not on an item.

     /*Condition B*/
     This gets rid of (FRM-41058: No such property for Get-Item-Property)
     because even if your mouse is on an item while the timer expires, it may not
     be an item which has a LABEL. Procedure HINT.ShowButtonHelpHandler
     calls HINT.mouse_item_label which attempts to get this property of the

     In summary, HINT.ShowButtonHelpHandler should only be called when your
     mouse is on a Button.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I posted the solution at the request of jtrifts so it can be saved in the previously asked questions.  

Linda Gardner
Customer Service @ Experts Exchange
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.