Si2oaD/Problem Resolution

From oacwiki

Jump to: navigation, search

Contents

1 regex/sort popup opens in a new tab (instead of window)

Problem: The regex/sort popup opens in a new tab (instead of a new window) complicating the task of keeping visual context on the names to be filtered (which are now obscured in the previous tab) while trying to invent a regular expression or sort selection (which is not in a new tab on top).

Solution: The browser should have an option setting that controls this. The popular “tabbed-browsing” style, useful to control popups, really gets in the way of this browser activity. Each different browser has its own way of controlling this behavior. For example,

  • In Firefox 2.0.0.14 , check Edit/Preferences/Tabs/”New pages should be opened in a:”/”NEW WINDOW”. Note that after this change it may be necessary to close all instances of Firefox and reopen in order to see the effect.
  • In Mozilla, the similar setting is in Tools/Options/Tabs


2 Browser cannot find string in folded entries

Problem: You want to find an Object handle you see in the gdb in the oad display, but the Edit/Find in in the browser cannot find it because most entries are folded.

Solution: Use the browser's View/source menu action to see the complete HTML and search for the handle in there. Then use the nesting context there to figure out which object in the display you need to unfold. Note, in order for this to work, the maxcollentries and maxownerlevels options must both be set to 0. If the data has been truncated by non-zero setting of either of these options, many handles and object information will actually be absent from the HTML (were never sent to the browser by the nanoserver).


3 Call to oad() SEGVs

Problem: Call to oad() SEGVs:

(gdb) call oad()
Program received signal SIGSEGV, Segmentation fault.
0x00d8f76c in OpenAccess_4::oaObjectV::get(OpenAccess_4::oaObject const*) (object=0xb75d0012) at oaObjectPvt.inl:42

Solution: Do not call oad() on an OA object of some kind until the an oa*Init() initialization function – like oaDesignInit() – has been executed by the application being debugged. This SEGV typically occurs when such a call is made immediately on load of the application by gdb, instead of after execution has continued to the first breakpoint. Calling oad() to set its own internal options is possible at any time; however, any attempt to get information on OA data must wait until the OA implementation has been initialized.


4 gdb error mapping shared library, then call to oad() SEGVs

Problem: gdb reports error mapping shared library and subsequent call to oad() SEGVs:

make gdb
...
Breakpoint 1 at 0x804ad7a: file si2dis.cpp, line 89.
Error while mapping shared library sections:
libsi2oadebug.so: Success.
...

Solution: Add to the .gdbinit file a "set environment" statement for LD_LIBRARY_PATH, even though it may already be set in the environment:

set environment LD_LIBRARY_PATH .:$OAROOT/lib/linux_rhel21_32/dbg


5 Exception: Library Lib not found

Problem: Soon after starting a testcase, an uncaught exception terminates execution.

Breakpoint 1, main (argc=1, argv=0xbfff9ea4) at testcase.cpp:38
38          if ( argc > 1 ) {
(gdb) b 109
Breakpoint 2 at 0x804cf58: file testcase.cpp, line 109.
(gdb) c
Continuing.
***Exception: Library Lib not found.

Solution: The testcases (and many programs) depend on a lib.defs file having been set up to map logical Lib to physical path names. If working with a testcase in the distribution simply run the following make target then restart the testcase from the beginning:

make llf


6 Browser displays raw XML without active (clickable) HTML

Problem: Browser displays raw XML with all of the container tags expanded and, except for the collapse(–)/expand(+) icons, does not have active content. The display appears like that in Figure 1, with the a statement at the top like, "This XML file does not appear to have any style information associated with it..."

Figure 1: XSLT Failure

Solution: If the xsltype (XSLT transformation type) option setting is

  • none – change it to browser or processor In this case, if verbose was set > 0 then there also will be a message on the console after the call to oad() like
 ...No XSLT transformation. Using raw XML.
  • browser and the browser
    • does not have its own XSLT capability, use a different browser or switch xsltype to the processor setting. In this case, if verbose was set > 0 then there also will be a message on the console after the call to oad() like
 ...Using browser's XSLT function.
    • does have its own XLST capability, verify the si2oad.xsl file got copied to the directory specified by the docroot (document root path for the oaD nanoserver) option setting. In this case, fix the makefiles or manually copy the file into the docroot/.
  • processor but either of following options do not reference the correct paths:
    • xslexe (path to the XSLT processor executable) – with an error message on the console like,
    sh: PATH_SET_FOR_xslexe: No such file or directory
    [si2oad] ***Command failed: LD_PRELOAD=...
    • xslib (colon-separated paths to libs needed by XSLT) – with an error message on the console like the one above, plus a prior error when loading the libs was attempted, such as,
    PATH_SET_FOR_xslexe: error while loading shared libraries: libxalan-c.so.19: cannot open shared object file: No such file or directory
    [si2oad]   ***Command failed: LD_PRELOAD=...


7 OS library link failure

Problem: Link failure of an operating system library, such as:

Breakpoint 1 at 0x405fa3: file testcase.cpp, line 39.
/bin/sh: error while loading shared libraries: /lib/libdl.so.2: cannot
open shared object file: No such file or directory.

Solution: Default system library paths should include /lib and /usr/lib unless the linker has been configured in a special way. Verify exactly which library resolution the shared object is expecting:

Examine the runtime linking:

$ ldd $Si2oaD_INSTALL/lib/si2oadebug.so`
libstdc++.so.5 => /usr/lib64/libstdc++.so.5
libm.so.6 => /lib64/tls/libm.so.6
libgcc_s.so.1 => /lib64/libgcc_s.so.1
/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
    ...

If system libraries are being resolved to paths other than the linker's defaults, they can be added explicitly to the LD_LIBRARY_PATH lists by editing the $Si2oaD_INSTALL/makefile.defs for the targets being used. For example, add /lib64 to to the oad: target.

oad: RUNoad
RUNoad: $(PROG)
        $(MAKE) gdbinit 
        $(SH_LIB_ENV_NAME)=.:$(DIR_LIB_OAD):$(DIR_LIB_OA):/lib64 \
          PATH=$$PATH:$(DIR_BIN_OA) \
          $(GDB) $(PROG)


8 Unable to lock database file

Problem: ***Exception: Unable to lock database file for LibDetPara/FullAdder/routed

Solution: If it is possible that another application is accessing the same Design, then the solution is to wait until the other application is finished. If no other applications are (or should be) accessing that Design, then a crash or some other event may have caused the design Data Manager (DM) to leave a remnant lock for the Design. The exact solution depends on the DM PlugIn used to create the Lib for the Design. For example,

  • DMFileSys creates a "stake file" in the directory named in the Exception message with the name of the primary DMFile representing the Design with suffix, .cdslck". This file can be manually deleted to release the lock.
  • DMTurbo may leave a remnant server process active that needs to be killed and/or a stake file that must be deleted.
    • First try deleting the stake file.
    (gdb)shell rm $(LIBLOC)/LibDir/LibName/server.xml
    • If that is not sufficient, then locate the TurboServer process and kill that. If all else fails, recreate the Lib data.
    (gdb)shell ps -ae | grep DMTurboServer
    8019 ? 00:00:00 oaDMTurboServer
    (gdb) shell kill -9 8019


9 WIN: No browser appears after call to oad()

Problem: When running under WIN, calling oad() does not start a browser instance.

Solution: Auto-start of the browser (the way it is done with a system() call under UNIX) is not implemented on the WIN platform. After calling oad(), manually start a browser to the page, http://localhost:PORTNUM/si2oad.html, where PORTNUM is that shown on the message printed to the console after that call: "...wwwserver socket bound to port PORTNUM". You can also set the .si2oadoptions port option to a particular port number that can be reused in that browser call, without having to look at that message each time to see what free PORTNUM the OS selected.


10 No prompt in debug console after browser RETURN button pressed

Problem: Debug shell process hangs without returning to a prompt even though the RETURN button was pressed (or “quit” URL accessed) to terminate the browser communications session.

Solution:

  • If the browser is still open, try clicking the RETURN button again.
  • If the browser was closed already, open one to the same PORTNUM as before (should be available in a message displayed earlier on the debug console output): http://localhost:PORTM/quit.html
  • In some environments, if an instance of Firefox was not running when oad() was called, the process is waiting on its children to terminate. Next time, start a Firefox first before running OAD.

11 SEGV in oaConstraintParamDef

Problem: SEGV in oaConstraintParamDef.cpp as follows:

 Program received signal SIGSEGV, Segmentation fault.
 0x403aece9 in OpenAccess_4::oaConstraintParamDefDBTbl::findDefIndex (
     this=0x0, sessionIndex=9) at oaConstraintParamDef.cpp:963
 963      for (oaUInt4 i = 0; i < numUsed; i++) {

This is a bug in OA code (that will be fixed post p037) that happens

  • when an incremental Tech graph is created for a Tech
  • there are no ConstraintParams (not sure if only for the local Tech or anywhere in the graph)
  • oad() is called for the second time

Solution: The only workaround is to get all information desired on the first call to oad(). Note that all of the following result in an implicit "second call" that also triggers this SEGV:

  • clicking on a link in the oad() GUI display that requires opening a new window

Consequently,

  • call oad() with the top-most container you will need to see (or with no arguments)
  • set .si2oadoptions maxownerlevels and maxcollentries to 0 to avoid the implicit call (though this might not be practical on large designs, as it will produce a huge amount of HTML that could slow down or kill an average browser)


12 HELP button in output=gui does not work

Problem: When clicking on the HELP button at the top of the browser, the debug console displays,

 ...open() of '../si2dis//si2oadUserGuide.pdf' failed: No such file or directory

This is due to the fact that the UserGuide used to be in OpenOffice .odt format, which was converted regularly to PDF format and included in the distribution in the docroot. However, the master source for the UserGuide was converted to this wiki in 2008 and there is not yet an automated PDF conversion for it to add to the releases.

Solution: Generate a PDF from the wiki UserGuide and contribute your method for doing it to the project.


13 Containers have no guts

Problem: Calling oad() yields one or more containers that look like this

  • with output=console
    <constraintDefs o= count='104'>
   <XF/>  </constraintDefs>
  • with output=gui,

Solution: For the cases,

  • output=console – Nothing can be done at this point.
  • output=gui – Clicking on the ... sentinel under the last Collection entry will cause a dynamic request to the oad nanoserver for the next maxcollentries in that Collection to be displayed.

In both cases, setting the maxcollentries option in the .si2oadoptions file to a large value, or 0 (meaning all), will eliminate the need to incrementally expand Collections.


14 unused variable

Problem: Building oad (or OA code) produces unused variable warnings, including,

 warning: unused variable ‘sccs_id’

Solution: Live with it. This has been a feature of many OA releases. You could add to the make command,

 CXXFLAGS="-Wno-unused-variable"

This will get rid of the warning; however, it will now hide any real variable declarations in your own code, which is probably not a good idea.

Note this technique is used in the si2distest/ Makefile for the testcases because they have many declarations for variables assigned to handles of Objects created to test out the oad code. While the Objects created are important, many of the handles to them are not currently being used in the test, but are convenient for passing to oad() while stepping through the code to enable display of these individual Objects (so you don't have to wade through the whole RTM to find them.


15 <Y ...> tag in console output

Problem: Console output for some Collections is not complete and ends with a tag like,

 <Y class=SomeClassName>...</Y> 

Solution: Increase the value for option maxownerlevels (set to 0 for "all").

For example, with output=console, and maxownerlevels=4 the set of <occNets o=' ' count='10'> would show a maximum of 4 OccNets, ending with,

 <Y class='occNets'>...</Y> 

If output were changed to gui, this last tag would be converted by the XSL into an active ... sentinel (stand-in) that could be clicked to generate an XMLHttpRequest back to the oad nanoserver for another load of up to 4 more OccNets. However, on the console, "clicking" is impossible; hence, only the sentinel tag shows.


16 unused variable ‘sccs_id’

With oaUtil.h included [starting release 1.7], the following warning prints:

 /home/dm4p034/include/oa/oaUtilApp.inl: In member function ‘void oaUtil::App<O>::initOA()   
     [with O = Si2oadOptions]’:
 /home/dm4p034/include/oa/oaUtilApp.inl:84:   instantiated from ‘void oaUtil::App<O>::init()  
     [with O = Si2oadOptions]’
 si2disutil.h:300:   instantiated from here
 /home/dm4p034/include/oa/oaUtilApp.inl:108: warning: unused variable ‘sccs_id’

This is a feature of the oaUtilApp.inl, not oad.

This warning can be ignored, or -Wno-unused-variable can be added to the gcc command line; for example,

 make install CXXFLAGS=-Wno-unused-variable


17 WIN: First-chance Exception

Running the WIN version (using the Debug configuration), Visual Studio's "Output" panel shows several messages like the following:

 First-chance exception at 0x7c812a5b (kernel32.dll) in dff_vc9.exe: Microsoft C++ exception: OpenAccess_4::oaTechError at memory location 0x0012f2b8..
 ...
 First-chance exception at 0x7c812a5b (kernel32.dll) in dff_vc9.exe: Microsoft C++ exception: OpenAccess_4::oaDesignError at memory location 0x0012e658..
 ...

Our consensus is that they are merely the VS debugger's logging of Exceptions that are occurring, and being handled properly, within the inner workings of the OA implementation. These do not affect any of the console or Reporter outputs and can be ignored.


18 Unable to start server

 [si2LibDefObserver] onLoadWarning[6] Received exception from oaDMTurbo plug-in when accessing library design:
                     #8004: Unable to start server using port NNNNN, host HHHHHH.DOMAIN.EXT

Make sure the user running OAD has write permission into the Lib directory. The DMTurbo server writes a server.xml file into the Lib directory when it is running.


19 GLib, Gdk CRITICAL

Firefox (3.0.1) on SuSE 10.3 Linux reports failures when running OAD in emacs shell window. x

(firefox:8254): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
(firefox:8254): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(firefox:8254): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(firefox:8254): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(firefox:8254): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
(firefox:8254): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(firefox:8254): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
(firefox:8254): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(firefox:8254): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
(firefox:8254): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(firefox:8254): GLib-GObject-WARNING **: gsignal.c:2180: invalid unclassed object pointer for value type `GdkScreen'
(firefox:8254): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
(firefox:8254): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed
(firefox:8254): GLib-GObject-WARNING **: gsignal.c:2180: invalid unclassed object pointer for value type `GdkScreen'
(firefox:8254): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

Similar errors for Seamonkey (2.0.9 and earlier), except that the error prefix is:

(seamonkey-bin:8296): ...

This will happen when spawning firefox or seamonkey on the inside an emacs shell window line without any OAD involvement. It appears to be due to the browser's recognition that its parent display [unexpectedly] was not a "normal" screen type.

Ignore the messages.

20 Missing Pcell Evaluator

If the IPCell evaluator for a Pcell master is missing,

  • The proper evaluator name, which is stored with the Inst
  • NULL for the IPcell (in the supermaster Design's section)

If the evaluator is missing, then traversal to an Inst's subMaster cannot happen (i.e., it will remain unbound). Even if the subMaster was supposed to have been cached via PcellFile (doc/oa/html/PcellCPP/classPcellFile.html), some kind of evaluator matching the name saved with the Inst must be loaded into the app (maybe via PlugIn) that knows

  • that the subMaster data is cached in a file
  • where that file is

Whatever the reason the evaluator is missing, recovery may be possible if the problem is simply that the DLL for the evaluator cannot be found. One way to do this is dynamically on the gdb command line In the following example, I moved the cached-Pcell DLL evaluator (.so) from the /home/labs/bin... path to /tmp/HIDE. In my oad session, I saw that the IPCell was null when I tried to get the master for an Inst of the Pcell. First I terminated the oad session (necessary), Then I reset the LD_LIBRARY_PATH (note that path still must include the locations of both the OAD libs and the OA libs):

(gdb) set env LD_LIBRARY_PATH /home/labs/lib/linux_rhel40_gcc44x_64/dbg:/home/oa/p004/lib/linux_rhel40_gcc44x_64/dbg:/tmp/HIDE

When invoking oad() again, the evaluator can now be found.

Personal tools