OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000232OMNeT++simulation kernelpublic2010-12-23 12:312010-12-23 15:18
Reporterandras 
Assigned Toandras 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.1 
Target VersionFixed in Version4.2 
Summary0000232: Configuration: runnumber-width option causes seed-set to be interpreted as an octal number
DescriptionWhen setting runnumber-width > 1 in the configuration, runs 0..7 work fine, but run 8 and 9 stop with the following error:

<!> Error: Error getting option seed-set= from the configuration: `008' is not a valid integer.

To reproduce:
1. edit the omnetpp.ini file in aloha, and add "runnumber-width = 3" into the [Config PureAlohaExperiment] section.
2. run the simulation with: ./aloha -c PureAlohaExperiment -r 8 -u Cmdenv
3. you'll get the above error
TagsNo tags attached.
Attached Files? file icon commit-3c4ed78 [^] (3,730 bytes) 2010-12-23 15:18 [Show Content]

- Relationships

-  Notes
(0000363)
andras (administrator)
2010-12-23 12:40

Quick fix (with side effects):

--- stringutil.cc 2010-06-11 20:37:02 +0200
+++ stringutil.cc-fix 2010-12-23 11:35:07 +0100
@@ -440,7 +440,7 @@

 long opp_strtol(const char *s, char **endptr) {
- long d = strtol(s, endptr, 0);
+ long d = strtol(s, endptr, 10);
     if ((d==LONG_MAX || d==LONG_MIN) && errno==ERANGE)
         throw opp_runtime_error("overflow converting `%s' to long", s);
     return d;

However, this will cause OMNeT++ not to recognize hex and octal constants in NED and ini files.
(0000364)
andras (administrator)
2010-12-23 15:18

See attached fix.

- Issue History
Date Modified Username Field Change
2010-12-23 12:31 andras New Issue
2010-12-23 12:40 andras Note Added: 0000363
2010-12-23 15:18 andras File Added: commit-3c4ed78
2010-12-23 15:18 andras Note Added: 0000364
2010-12-23 15:18 andras Status new => resolved
2010-12-23 15:18 andras Fixed in Version => 4.2
2010-12-23 15:18 andras Resolution open => fixed
2010-12-23 15:18 andras Assigned To => andras


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker