Discussion:
Some more bug fixes
Schmidt Thomas
2009-01-05 21:57:18 UTC
Permalink
Hi,

Here are some more minor bug fixes:

1. mico/demo/services/relship/TestServer.cc
BaseRole and DerivedRole should be added without path component
"omg.org/".
So instead of

NamedRoleTypesHelper* nrth_TestRelationship = new
NamedRoleTypesHelper (orb);
nrth_TestRelationship->add ("IDL:omg.org/Test/BaseRole:1.0",
"BaseRole");
nrth_TestRelationship->add ("IDL:omg.org/Test/
DerivedRole1:1.0", "DerivedRole1");

you should better write

NamedRoleTypesHelper* nrth_TestRelationship = new
NamedRoleTypesHelper (orb);
nrth_TestRelationship->add ("IDL:Test/BaseRole:1.0",
"BaseRole");
nrth_TestRelationship->add ("IDL:Test/DerivedRole1:1.0",
"DerivedRole1");

2. mico/coss/relship/RandomGenerator_impl.cc
Bug fix of my previous fix. Method RandomGenerator_impl::rand()
should check for 'proxy' mode
only if check for 'generate' mode failed. Instead of:

if (mode == RandomGenerator::generate)
number = ::rand ();
if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
}
else {
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
}
}

Add an 'else':

if (mode == RandomGenerator::generate) {
number = ::rand ();
}
else if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
}
else {
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
number = 0; // Avoid compiler warnings
}
}
else {
number = 0; // Should never happen. Exception?
}

Otherwise rand() would ever return 'zero' in 'generate' mode.

3. ROADMAP
'imr' is not a directory under micos devel root. Instead it is
part of directory 'daemon'.


Thomas Schmidt

--
Thomas Schmidt
Schneiderstr. 16
D-29575 Altenmedingen
Phone: +49-5807-209976
Cellular: +49-172-3011505
Skype: ThCSchmidt
Email: ***@vodafone.de
PGP: Key-ID: 0x810B6206
Karel Gardas
2009-01-08 08:36:01 UTC
Permalink
Hi Thomas,

could you be so kind and send unified or context diff of your changes?
This way I don't need to retype all your changes here through the
keyboard when you already done this anyway.

Otherwise those three fixes below looks ok.

Thanks!
Karel
Post by Schmidt Thomas
Hi,
1. mico/demo/services/relship/TestServer.cc
BaseRole and DerivedRole should be added without path component
"omg.org/".
So instead of
NamedRoleTypesHelper* nrth_TestRelationship = new
NamedRoleTypesHelper (orb);
nrth_TestRelationship->add ("IDL:omg.org/Test/BaseRole:1.0",
"BaseRole");
nrth_TestRelationship->add ("IDL:omg.org/Test/DerivedRole1:1.0",
"DerivedRole1");
you should better write
NamedRoleTypesHelper* nrth_TestRelationship = new
NamedRoleTypesHelper (orb);
nrth_TestRelationship->add ("IDL:Test/BaseRole:1.0", "BaseRole");
nrth_TestRelationship->add ("IDL:Test/DerivedRole1:1.0",
"DerivedRole1");
2. mico/coss/relship/RandomGenerator_impl.cc
Bug fix of my previous fix. Method RandomGenerator_impl::rand()
should check for 'proxy' mode
if (mode == RandomGenerator::generate)
number = ::rand ();
if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
}
else {
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
}
}
if (mode == RandomGenerator::generate) {
number = ::rand ();
}
else if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
}
else {
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
number = 0; // Avoid compiler warnings
}
}
else {
number = 0; // Should never happen. Exception?
}
Otherwise rand() would ever return 'zero' in 'generate' mode.
3. ROADMAP
'imr' is not a directory under micos devel root. Instead it is part
of directory 'daemon'.
Thomas Schmidt
--
Thomas Schmidt
Schneiderstr. 16
D-29575 Altenmedingen
Phone: +49-5807-209976
Cellular: +49-172-3011505
Skype: ThCSchmidt
PGP: Key-ID: 0x810B6206
------------------------------------------------------------------------
_______________________________________________
Mico-devel mailing list
http://www.mico.org/mailman/listinfo/mico-devel
--
Karel Gardas ***@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
Schmidt Thomas
2009-01-08 14:16:24 UTC
Permalink
Sorry,
Post by Karel Gardas
Hi Thomas,
could you be so kind and send unified or context diff of your changes?
This way I don't need to retype all your changes here through the
keyboard when you already done this anyway.
Otherwise those three fixes below looks ok.
Thanks!
Karel
Post by Schmidt Thomas
Hi,
1. mico/demo/services/relship/TestServer.cc
BaseRole and DerivedRole should be added without path component
"omg.org/".
--- TestServer.cc 20 Feb 2008 15:23:01 -0000 1.1
+++ TestServer.cc 5 Jan 2009 21:39:16 -0000 1.2
@@ -94,9 +94,9 @@

NamedRoleTypesHelper*
nrth_TestRelationship = new NamedRoleTypesHelper (orb);
- nrth_TestRelationship->add ("IDL:omg.org/Test/BaseRole:1.0",
+ nrth_TestRelationship->add ("IDL:Test/BaseRole:1.0",
"BaseRole");
- nrth_TestRelationship->add ("IDL:omg.org/Test/DerivedRole1:1.0",
+ nrth_TestRelationship->add ("IDL:Test/DerivedRole1:1.0",
"DerivedRole1");
Post by Karel Gardas
Post by Schmidt Thomas
2. mico/coss/relship/RandomGenerator_impl.cc
Bug fix of my previous fix. Method RandomGenerator_impl::rand()
should check for 'proxy' mode only if check for 'generate' mode
failed.
--- RandomGenerator_impl.cc 20 Feb 2008 15:22:25 -0000 1.1
+++ RandomGenerator_impl.cc 5 Jan 2009 21:54:21 -0000 1.2
@@ -42,9 +42,10 @@
RandomGenerator_impl::rand ()
{
CORBA::Long number;
- if (mode == RandomGenerator::generate)
+ if (mode == RandomGenerator::generate) {
number = ::rand ();
- if (mode == RandomGenerator::proxy) {
+ }
+ else if (mode == RandomGenerator::proxy) {
if (!random_numbers.empty ()) {
number = *(random_numbers.begin ());
random_numbers.pop_front ();
@@ -53,8 +54,12 @@
//::RandomGenerator::NoSuchNumber exception;
//throw exception;
mico_throw (RandomGenerator::NoSuchNumber());
+ number = 0; // Avoid compiler warnings
}
}
+ else {
+ number = 0; // Should never happen. Exception?
+ }

return number;
}
Post by Karel Gardas
Post by Schmidt Thomas
3. ROADMAP
'imr' is not a directory under micos devel root. Instead it is part
of directory 'daemon'.
--- ROADMAP 20 Feb 2008 15:22:05 -0000 1.1
+++ ROADMAP 5 Jan 2009 21:56:10 -0000 1.2
@@ -7,10 +7,10 @@
coss -- CORBA Services, only naming service at the moment.
libmicocoss is
built in this directory.
daemon -- BOA daemon (micod).
+ imr - implementation repository and admin tool (imr).
demo -- some examples.
doc -- documentation.
idl -- idl compiler (idl).
-imr -- implementation repository and admin tool (imr).
include -- include files.
ir -- interface repository and IR server (ird).
man -- unix manual pages.
mic
--
Thomas Schmidt
Schneiderstr. 16
D-29575 Altenmedingen
Phone: +49-5807-209976
Cellular: +49-172-3011505
Skype: ThCSchmidt
Email: ***@vodafone.de
PGP: Key-ID: 0x810B6206
Kretschel Klaus
2009-01-14 14:09:16 UTC
Permalink
Hi,

until now we used Mico 2.3.11. Since gcc 4.3 complains about syntax errors in
that version I tried Mico 2.3.13 which compiled fine. However, now our code
does no longer compile: CosEventComm::PushConsumer_skel is no longer located
in <coss/CosEventComm.h>.

Any hint?

Thank you,
Klaus
Karel Gardas
2009-01-14 14:41:08 UTC
Permalink
Hi Klaus,

exactly! MICO 2.3.13 does not support BOA anymore. For your information,
your CosEventComm::PushConsumer_skel is BOA's skeleton code. My best
advice to you is to update code to use POA's skeletons. Hmm, why do you
need to use skeleton code exactly? It's used just by service
implementors, isn't it? Or are you writing your own event service? If
so, then ok...

Cheers,
Karel
Post by Kretschel Klaus
Hi,
until now we used Mico 2.3.11. Since gcc 4.3 complains about syntax errors in
that version I tried Mico 2.3.13 which compiled fine. However, now our code
does no longer compile: CosEventComm::PushConsumer_skel is no longer located
in <coss/CosEventComm.h>.
Any hint?
Thank you,
Klaus
_______________________________________________
Mico-devel mailing list
http://www.mico.org/mailman/listinfo/mico-devel
--
Karel Gardas ***@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
Kretschel Klaus
2009-01-16 12:16:39 UTC
Permalink
Hi Karel,
Post by Karel Gardas
exactly! MICO 2.3.13 does not support BOA anymore. For your information,
your CosEventComm::PushConsumer_skel is BOA's skeleton code. My best
advice to you is to update code to use POA's skeletons. Hmm, why do you
need to use skeleton code exactly? It's used just by service
implementors, isn't it? Or are you writing your own event service? If
so, then ok...
it's old code written by someone else, and I guess it is not necessary. Can
you recommend some useful documentation for POA event service? The Puder book
does not even mention the event service...

But we will not need to upgrade by now. Using the configure scripts from
2.3.13 allowed also to compile 2.3.11 with gcc 4.3. The key was
the "-fno-strict-aliasing" option.

Best regards,
Klaus
Andreas Benzler
2009-01-16 12:49:22 UTC
Permalink
Hi Klaus

I am highly interested in your approach bringing mico 2.3.11 to a gcc4.3
platform. Can you please describe a bit more detail what you did
exactly. I am not an automake expert :-(.
If you could make a patch available for 2.3.11 it would be even better...

Regards

Andreas Benzler
Post by Kretschel Klaus
Hi Karel,
Post by Karel Gardas
exactly! MICO 2.3.13 does not support BOA anymore. For your information,
your CosEventComm::PushConsumer_skel is BOA's skeleton code. My best
advice to you is to update code to use POA's skeletons. Hmm, why do you
need to use skeleton code exactly? It's used just by service
implementors, isn't it? Or are you writing your own event service? If
so, then ok...
it's old code written by someone else, and I guess it is not necessary. Can
you recommend some useful documentation for POA event service? The Puder book
does not even mention the event service...
But we will not need to upgrade by now. Using the configure scripts from
2.3.13 allowed also to compile 2.3.11 with gcc 4.3. The key was
the "-fno-strict-aliasing" option.
Best regards,
Klaus
_______________________________________________
Mico-devel mailing list
http://www.mico.org/mailman/listinfo/mico-devel
Kretschel Klaus
2009-01-16 13:10:05 UTC
Permalink
Hi Andreas,
Post by Andreas Benzler
I am highly interested in your approach bringing mico 2.3.11 to a gcc4.3
platform. Can you please describe a bit more detail what you did
exactly. I am not an automake expert :-(.
I did nothing but replace "configure" and "configure.in" from the mico 2.3.13
distribution. There is on thing more that I had fixed earlier: add "#include
<cstring>" in throw.h. Then follow the usual install procedure.

However, I was possibly a little too fast, although I am not sure if the error
I just got has really to do with MICO, but it seem to me that something is
not cleaned up correctly. I got a segmentation fault at the very end of a
test program that did not even use MICO services:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000021 in ?? ()
(gdb) up
#1 0x00007fd364e36628 in __cxa_finalize () from /lib64/libc.so.6
(gdb) up
#2 0x00007fd36866ad66 in __do_global_dtors_aux () from Current language:
auto; currently asm
(gdb) up
#3 0x000000000046fc90 in std::basic_ios<char, std::char_traits<char>
Post by Andreas Benzler
::basic_ios ()
(gdb) up
#4 0x00007fff720e1540 in ?? ()
(gdb) up
#5 0x00007fd368873de1 in _fini ()
from /home/donau101/adsm/scia/ol_level_1_to_2/tools/mico/for-x86_64/mico.2.3.11/lib/libmico2.3.11.so
(gdb) up
#6 0x000000000000001a in ?? ()
(gdb) up
#7 0x00007fd369ed4d94 in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) up
Initial frame selected; you cannot go up.
(gdb)

Regards,
Klaus
Karel Gardas
2009-01-17 11:17:13 UTC
Permalink
Guys,

you should really concentrate your energy on bringing your code up to
the MICO 2.3.13 compatibility. Please keep in mind that BOA is more than
10 years deprecated already! IIRC POA was specified in 1998...

It's not that hard at the end, and for your information we usually do
this during one or two days on-site consulting/training at the customer
office after which customer is able to port all their sources successfully.

Cheers,
Karel
Post by Kretschel Klaus
Hi Andreas,
Post by Andreas Benzler
I am highly interested in your approach bringing mico 2.3.11 to a gcc4.3
platform. Can you please describe a bit more detail what you did
exactly. I am not an automake expert :-(.
I did nothing but replace "configure" and "configure.in" from the mico 2.3.13
distribution. There is on thing more that I had fixed earlier: add "#include
<cstring>" in throw.h. Then follow the usual install procedure.
However, I was possibly a little too fast, although I am not sure if the error
I just got has really to do with MICO, but it seem to me that something is
not cleaned up correctly. I got a segmentation fault at the very end of a
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000021 in ?? ()
(gdb) up
#1 0x00007fd364e36628 in __cxa_finalize () from /lib64/libc.so.6
(gdb) up
auto; currently asm
(gdb) up
#3 0x000000000046fc90 in std::basic_ios<char, std::char_traits<char>
Post by Andreas Benzler
::basic_ios ()
(gdb) up
#4 0x00007fff720e1540 in ?? ()
(gdb) up
#5 0x00007fd368873de1 in _fini ()
from /home/donau101/adsm/scia/ol_level_1_to_2/tools/mico/for-x86_64/mico.2.3.11/lib/libmico2.3.11.so
(gdb) up
#6 0x000000000000001a in ?? ()
(gdb) up
#7 0x00007fd369ed4d94 in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) up
Initial frame selected; you cannot go up.
(gdb)
Regards,
Klaus
_______________________________________________
Mico-devel mailing list
http://www.mico.org/mailman/listinfo/mico-devel
--
Karel Gardas ***@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
Loading...