[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns2] strange problems when compiling ns-2 as a package





Hi everybody,

I had to modify ns-2 so that it runs as a loadable tcl-package (.so)
because my graphical front-end "tkined" also comes as a ready-to-run
application and I can't use of both otherwise.

It was just one minor change in tclAppInit.cc and a minor modification
in Makefile.in and everything worked great. Was really cute.

However, I get really strange effects whenever there is a bug in my
scripts. The application will then stop running. There is no crash,
but it is like if being trapped in a forever-loop. However, it also happens
that sometimes error messages are generated as usual. 

For example, under "some" circumstances, the following thing causes the
application to hang:

        proc "Generate Topology" { list } {
            set abc [expr ($transm_rate/8.0)]
            puts "passed..."
        }

Of course, as transm_rate is not declared, it should generate an
error. But the interpreter just hangs. With a minor change (i.e. leave
out the /8.0) there comes the error message as expected.


I have _NO_ idea if there is a connection between the ns-2 being
compiled as a tcl-package and those strange behavior in case of
errors. Could also be a bug in tcl/tk or OTcl. The "Generate
Topology"-function was NOT compiled with (uppercase) Tcl in my case.

Unfortunately, my script depends on tkined would have to be installed
first and I couldn't reproduce the behaviour in a tiny script yet,
as would be needed for locating the bug, I know. It makes thus little
sense to attach it to this mail.

I just want to know if anybody has ever experienced those problems
(maybe in a different situation).

    -Chris.