Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    View showing errors in OES and CPS - Error loading 'View' - See logfile for details

    View showing errors in OES and CPS - Error loading 'View' - See logfile for details

    PKlein
    Established Member

    Hello ,

    Figure 1 shows a view with the entries <LineShape/> on the left side. As soon as this entry is used in a view, an "Error Loading" error message appears in OES4.11 and CPS5.3&5.4. (see figure 2) The interesting thing here is that when you start the HMI, the image is displayed correctly (see figure 3). That means it's just a display bug at OES4.11 and CPS5.3&5.4. If you remove the <LineShape/> entries from the view, it works again (see figure 1, right side)! Question: What does the entry <LineShape/> mean? Bug: Please enable the display in OES4.11 and CPS5.3&5.4 with the entries <LineShape/>! This problem only arises when you implement a view over an object.

    To solve this with using <LineShape/> you have to add the namespace VisiWinNET.Forms.GraphicLayer. After that is

    namespace="VisiWinNET.Forms.GraphicLayer"? 

     

    But I have some other questions:

    - Where can I find the error log file?

    - Why can't I find an error entry in the error log file? (Assuming I found the log file!)

     

    4 REPLIES 4

    PKlein
    Established Member

    Figure 1

    PKlein_0-1649315074367.png

     

    PKlein
    Established Member

    Figure 2:

    PKlein_0-1649315100970.png

     

    PKlein
    Established Member

    Figure 3

    PKlein_0-1649315129955.png

     

    nexidator
    Community Moderator
    Community Moderator

    Let's state some facts first:

    • The view file containing the LineShapes is incorrect. It contains components (the LineShapes) whose namespace is missing in the file.
    • When adding Controls of Components using the designer, it will always automatically add the necessary namespaces. I.e., the file has been manually edited, which is usually done by object developers only.

    How do the view designer and the HMI handle such errors?

    The designer as well as the component loading view (sfc) files in the HMI are 3rd-party software, that's why I cannot give exact reasons for the behavior, I can only describe what happens:

    • When loading a view with missing namespaces into the designer, it will skip all Controls and Components whose type cannot be resolved, i.e. whose namespace is missing. When saving the view, these components will be removed. In your case, where the LineShapes were probably added by mistake, it seems like everything is working fine. But usually, you would be missing some UI elements that should be there.
    • Loading a view with missing namespaces at runtime will usually fail completely. The 3rd-party component loading sfc files will throw an exception that is caught and written to the HMI logfile. The information is very general though and will not tell you what's the reason why the view cannot be loaded.
    • There is an exception to this rule, though: If the same Component or Control type has been loaded successfully, before, i.e. in the context of an sfc file where the namespace is not missing, the type will be resolved in other (incorrect) views as well.
    • The Mod_SmartControlHost behaves the same way at design-time and runtime. It uses the same SfcLoader component. If the component does not return anything, the Mod_SmartControlHost displays the error message "See logfile for details". Actually this hint is only correct at runtime in the HMI. While running in the designer in Control plus Studio, there is no such logfile.

    Concerning your project and questions:

    • Fig. 2 is not a display bug in OES. The view is corrupt, so OES shows an error message. This is intended behavior.
    • Fig. 3 means that some other HMI view containing a LineShape and the correct namespace must have been loaded before. Otherwise you would get the same error message as in Fig. 2 at runtime as well.
    • Like all the Shape components from the category Drawing of the Smart Toolbox, the LineShape is an element that is painted on the background of the view. The Shapes are technically no controls but something like drawing instructions for runtime. That's why they are transparent themselves but they will be covered by any overlapping child controls. In order to directly answer your question: The entry <LineShape... /> in your sfc file means that someone dragged a LineShape component from the toolbox to the view. Later, the necessary namespace was removed from the file.
    • When running the HMI, the logfile path is C:\OpconApp\HMI\Log\OpCon.HMI.Modulo_log.txt. As mentioned above, it will not help much in this case, though. At design time, there is no logfile.
    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist