Bugzilla – Bug 1204
Can't Parse Time +100000000.0ns
Last modified: 2011-11-11 17:42:07 UTC
It's an error which happens when using the config store, but I guess it might be due to the parsing of time values which belongs to core. The bug is reproduced running the attached program twice, as follows: nicola@pcnbaldo:~/locale/ns-3-dev$ ./waf --command-template="%s --ns3::ConfigStore::Filename=values.xml --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::FileFormat=Xml" --run scratch/config-store-default-bug [snip] [file is saved and program exits ok] nicola@pcnbaldo:~/locale/ns-3-dev$ ./waf --command-template="%s --ns3::ConfigStore::Filename=values.xml --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=Xml" --run scratch/config-store-default-bug [snip] aborted. msg="Can't Parse Time +100000000.0ns", file=../src/core/model/time.cc, line=74 Command ['/home/nicola/locale/ns-3-dev/build/debug/scratch/config-store-default-bug', '--ns3::ConfigStore::Filename=values.xml', '--ns3::ConfigStore::Mode=Load', '--ns3::ConfigStore::FileFormat=Xml'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>"). Note that by removing all Time values from values.xml then the ConfigStore can successfully load it.
Created attachment 1179 [details] program that allows to reproduce the bug
(In reply to comment #1) > Created attachment 1179 [details] > program that allows to reproduce the bug did not try to run it. looked at the code. probably because Time::Time searches the unit identifier by searching the string from the start until it finds a non-numeric character. Should be fixable either by expanding the set of characters you are looking for (i.e., add '.' and '+') or by searching on the first non-letter from the end. I know you are busy but maybe you could cook a patch and add a test to time-test- suite.cc ? (it would be nice to test negative times too).
*** Bug 1279 has been marked as a duplicate of this bug. ***
Bug closed. Changeset: 91a0ff9ee4eb