Am Fr, den 30.07.2004 um 23:47 Uhr +0100 schrieb Matt Kay: > I did a bit of Googling and found a temporary fix to the bug in Nautilus > where it crashes on startup, That one is really annoying. I did some googling, too, and found bugreports to orbit and orbit2 causing that bug. I downloaded two patches and they work. Unfortunately I forgot where I got them (since I closed my session to check if the problem is solved), but I attach both. One patch is against orbit, the other one against orbit2. Looking at the dependencies it might be the orbit2-patch is enough. I'm not a coder, so dont's ask me. :-) I read about some type-problems expecting a return value being 32 Bit, which is not true on all !32bit platforms. Hope it helps. Bye, Ratti -- -o) fontlinge | Fontmanagement for Linux | Schriftenverwaltung in Linux /\\ http://freshmeat.net/projects/fontlinge/ _\_V http://www.gesindel.de https://sourceforge.net/projects/fontlinge/
--- ORBit-0.5.17/src/orb/allocators.c.alignment 2003-04-01 18:51:46.000000000 -0500
+++ ORBit-0.5.17/src/orb/allocators.c 2003-04-02 05:28:36.000000000 -0500
@@ -185,9 +185,11 @@
case CORBA_tk_except:
case CORBA_tk_struct:
mem = ALIGN_ADDRESS (mem, ORBit_find_alignment (tc));
- for (i = 0; i < tc->sub_parts; i++)
+ for (i = 0; i < tc->sub_parts; i++) {
+ mem = ALIGN_ADDRESS (mem, ORBit_find_alignment (tc->subtypes[i]));
mem = ORBit_free_via_TypeCode (
mem, &tc->subtypes[i], CORBA_TRUE);
+ }
retval = mem;
break;
case CORBA_tk_union: {
--- ORBit-0.5.17/src/orb/corba_any.c.alignment 2002-06-06 07:07:39.000000000 -0400
+++ ORBit-0.5.17/src/orb/corba_any.c 2003-04-02 06:35:53.000000000 -0500
@@ -169,6 +169,7 @@
case CORBA_tk_struct:
*val = ALIGN_ADDRESS(*val, ORBit_find_alignment(tc));
for(i = 0; i < tc->sub_parts; i++) {
+ *val = ALIGN_ADDRESS(*val, ORBit_find_alignment(tc->subtypes[i]));
ORBit_marshal_value(buf, val, tc->subtypes[i], mi);
}
break;
@@ -197,9 +198,10 @@
}
break;
case CORBA_tk_wstring:
+ *val = ALIGN_ADDRESS(*val, ALIGNOF_CORBA_POINTER);
+
ulval = strlen(*(char **)*val) + 1;
- *val = ALIGN_ADDRESS(*val, ALIGNOF_CORBA_POINTER);
giop_send_buffer_append_mem_indirect_a(buf,
&ulval,
sizeof(CORBA_unsigned_long));
@@ -208,10 +210,10 @@
*val = ((guchar *)*val) + sizeof(char *);
break;
case CORBA_tk_string:
- ulval = strlen(*(char **)*val) + 1;
-
*val = ALIGN_ADDRESS(*val, ALIGNOF_CORBA_POINTER);
+ ulval = strlen(*(char **)*val) + 1;
+
giop_send_buffer_append_mem_indirect_a(buf,
&ulval,
sizeof(CORBA_unsigned_long));
@@ -595,6 +597,7 @@
case CORBA_tk_struct:
*val = ALIGN_ADDRESS(*val, ORBit_find_alignment(tc));
for(i = 0; i < tc->sub_parts; i++) {
+ *val = ALIGN_ADDRESS(*val, ORBit_find_alignment(tc->subtypes[i]));
ORBit_demarshal_value(buf, val, tc->subtypes[i], dup_strings, orb);
}
break;
@@ -820,6 +823,8 @@
*val = ALIGN_ADDRESS(*val, ORBit_find_alignment(tc));
*newval = ALIGN_ADDRESS(*newval, ORBit_find_alignment(tc));
for(i = 0; i < tc->sub_parts; i++) {
+ *val = ALIGN_ADDRESS(*val, ORBit_find_alignment(tc->subtypes[i]));
+ *newval = ALIGN_ADDRESS(*newval, ORBit_find_alignment(tc->subtypes[i]));
_ORBit_copy_value(val, newval, tc->subtypes[i]);
}
break;
--- ORBit-0.5.17/src/orb/orbit.c.alignment 2003-04-01 19:02:40.000000000 -0500
+++ ORBit-0.5.17/src/orb/orbit.c 2003-04-02 06:33:28.000000000 -0500
@@ -230,9 +230,12 @@
*a = ALIGN_ADDRESS (*a, ORBit_find_alignment (tc));
*b = ALIGN_ADDRESS (*b, ORBit_find_alignment (tc));
- for (i = 0; i < tc->sub_parts; i++)
+ for (i = 0; i < tc->sub_parts; i++) {
+ *a = ALIGN_ADDRESS (*a, ORBit_find_alignment (tc->subtypes[i]));
+ *b = ALIGN_ADDRESS (*b, ORBit_find_alignment (tc->subtypes[i]));
if (!ORBit_value_equivalent (a, b, tc->subtypes [i], ev))
return FALSE;
+ }
return TRUE;
}
diff -Naur --exclude=CVS ORBit2/src/orb/orb-core/allocators.c ORBit2.patched/src/orb/orb-core/allocators.c
--- ORBit2/src/orb/orb-core/allocators.c 2003-07-07 09:11:31.000000000 -0400
+++ ORBit2.patched/src/orb/orb-core/allocators.c 2004-06-17 13:13:07.563883105 -0400
@@ -59,6 +59,7 @@
}
case CORBA_tk_except:
case CORBA_tk_struct:
+ mem = ALIGN_ADDRESS (mem, tc->c_align);
for (i = 0; i < tc->sub_parts; i++) {
subtc = tc->subtypes [i];
mem = ALIGN_ADDRESS (mem, subtc->c_align);
diff -Naur --exclude=CVS ORBit2/src/orb/orb-core/corba-any.c ORBit2.patched/src/orb/orb-core/corba-any.c
--- ORBit2/src/orb/orb-core/corba-any.c 2004-01-16 08:56:12.000000000 -0500
+++ ORBit2.patched/src/orb/orb-core/corba-any.c 2004-06-17 13:13:07.565882999 -0400
@@ -102,6 +102,7 @@
CORBA_TypeCode tc)
{
CORBA_unsigned_long i, ulval;
+ CORBA_TypeCode subtc;
gconstpointer subval;
SKIP_ALIAS (tc);
@@ -168,12 +169,14 @@
case CORBA_tk_except:
case CORBA_tk_struct:
*val = ALIGN_ADDRESS (*val, tc->c_align);
- for (i = 0; i < tc->sub_parts; i++)
- ORBit_marshal_value (buf, val, tc->subtypes[i]);
+ for (i = 0; i < tc->sub_parts; i++) {
+ subtc = tc->subtypes[i];
+ *val = ALIGN_ADDRESS (*val, subtc->c_align);
+ ORBit_marshal_value (buf, val, subtc);
+ }
break;
case CORBA_tk_union: {
gconstpointer discrim, body;
- CORBA_TypeCode subtc;
int sz = 0;
discrim = *val = ALIGN_ADDRESS (*val, MAX (tc->discriminator->c_align, tc->c_align));
@@ -388,6 +391,7 @@
CORBA_ORB orb)
{
CORBA_long i;
+ CORBA_TypeCode subtc;
SKIP_ALIAS (tc);
@@ -551,12 +555,13 @@
case CORBA_tk_struct:
*val = ALIGN_ADDRESS (*val, tc->c_align);
for (i = 0; i < tc->sub_parts; i++) {
- if (ORBit_demarshal_value (tc->subtypes[i], val, buf, orb))
+ subtc = tc->subtypes[i];
+ *val = ALIGN_ADDRESS (*val, subtc->c_align);
+ if (ORBit_demarshal_value (subtc, val, buf, orb))
return TRUE;
}
break;
case CORBA_tk_union: {
- CORBA_TypeCode subtc;
gpointer discrim;
gpointer body;
int sz = 0;
@@ -832,12 +837,19 @@
*newval = ((guchar *)*newval) + sizeof (CORBA_Object);
break;
case CORBA_tk_struct:
- case CORBA_tk_except:
+ case CORBA_tk_except: {
+ CORBA_TypeCode subtc;
+
*val = ALIGN_ADDRESS (*val, tc->c_align);
*newval = ALIGN_ADDRESS (*newval, tc->c_align);
- for (i = 0; i < tc->sub_parts; i++)
- ORBit_copy_value_core (val, newval, tc->subtypes[i]);
+ for (i = 0; i < tc->sub_parts; i++) {
+ subtc = tc->subtypes[i];
+ *val = ALIGN_ADDRESS (*val, subtc->c_align);
+ *newval = ALIGN_ADDRESS (*newval, subtc->c_align);
+ ORBit_copy_value_core (val, newval, subtc);
+ }
break;
+ }
case CORBA_tk_union: {
CORBA_TypeCode utc;
gint union_align = tc->c_align;
@@ -1021,14 +1033,18 @@
case CORBA_tk_struct:
case CORBA_tk_except: {
int i;
+ CORBA_TypeCode subtc;
*a = ALIGN_ADDRESS (*a, tc->c_align);
*b = ALIGN_ADDRESS (*b, tc->c_align);
- for (i = 0; i < tc->sub_parts; i++)
- if (!ORBit_value_equivalent (a, b, tc->subtypes [i], ev))
+ for (i = 0; i < tc->sub_parts; i++) {
+ subtc = tc->subtypes[i];
+ *a = ALIGN_ADDRESS (*a, subtc->c_align);
+ *b = ALIGN_ADDRESS (*b, subtc->c_align);
+ if (!ORBit_value_equivalent (a, b, subtc, ev))
return FALSE;
-
+ }
return TRUE;
}
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil