Solved

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

Posted on 1998-02-04
9
2,558 Views
Last Modified: 2009-07-29
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 4.5.7.1.6) running against an Oracle7 Server 7.3.2.3.1 (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.

JTrifts
0
Comment
Question by:jtrifts
9 Comments
 
LVL 4

Author Comment

by:jtrifts
ID: 1082076
Adjusted points to 150
0
 
LVL 4

Author Comment

by:jtrifts
ID: 1082077
Edited text of question
0
 
LVL 4

Author Comment

by:jtrifts
ID: 1082078
Adjusted points to 300
0
 
LVL 4

Author Comment

by:jtrifts
ID: 1082079
Adjusted points to 350
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Expert Comment

by:eoing
ID: 1082080
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.
0
 
LVL 1

Expert Comment

by:yesnaud
ID: 1082081
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
  BEGIN
    mouse_item   := Name_In('SYSTEM.MOUSE_ITEM');
   
    -- Modification to display the item on which the mouse
    -- cursor is.
      MESSAGE (MOUSE_ITEM);
    --

    mouse_canvas := Name_In('SYSTEM.MOUSE_CANVAS');
    appInst      := TO_PLS_INTEGER(
                      Get_Application_Property(APPLICATION_INSTANCE));
    IF mouse_item IS NOT NULL THEN
      hWind        := TO_PLS_INTEGER(
                        Get_Item_Property(mouse_item,WINDOW_HANDLE));
      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;
    ELSE
      hWind := NULL;
    END IF;
  END;


  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


0
 
LVL 4

Author Comment

by:jtrifts
ID: 1082082
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 place...it 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)...here is the exact solution:

  IF :system.mouse_item IS NOT NULL THEN /*Condition A*/
    IF GET_ITEM_PROPERTY(:SYSTEM.MOUSE_ITEM,ITEM_TYPE) = 'BUTTON' THEN /*Condition B*/
      HINT.ShowButtonHelpHandler;
    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 :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...

Jonathan
0
 
LVL 7

Accepted Solution

by:
linda101698 earned 350 total points
ID: 1082083
...here is the exact solution:

       IF :system.mouse_item IS NOT NULL THEN /*Condition A*/
         IF GET_ITEM_PROPERTY(:SYSTEM.MOUSE_ITEM,ITEM_TYPE) =
     'BUTTON' THEN /*Condition B*/
           HINT.ShowButtonHelpHandler;
         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
     :system.mouse_item.

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

0
 
LVL 7

Expert Comment

by:linda101698
ID: 1082084
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
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now