From: Arno P. <ar...@pu...> - 2011-03-20 17:25:14
|
the vtable patch is the way to go, although we can't commit it yet. It doesn't make sense to invest time and effort to fix the HEAD. One problem with the vtable patch is that it causes many compiler warnings (this will be fixed). Unfortunately Xcode doesn't behave well with many warnings which is probably what you meant with beachballing (get a rebate on those $4! ;) ). In the Xcode project settings, select "Inhibit all warnings" and try to compile again. Arno On 3/20/11 3:18 AM, Markus Heberling wrote: > Hi, > > unfortunaltly XCode now beachballs everytime if I have the vtable patch applied, so can't give you the errors I got... > > But I started xmlvm (without the vtable patch) with debug output and got this for the affected class: > > [java] [03/20/11 11:02:47.869] DEBUG: Size of vtable for class com.sun.media.sound.ModelInstrumentComparator: 13 > [java] [03/20/11 11:02:47.869] DEBUG: Implemented interfaces: > [java] [03/20/11 11:02:47.869] DEBUG: java.util.Comparator > [java] [03/20/11 11:02:47.869] DEBUG: compare: 11 = 12 > [java] [03/20/11 11:02:47.869] DEBUG: equals: 1 = 1 > ... > [java] [03/20/11 11:02:52.066] DEBUG: Vtable index for com.sun.media.sound.ModelInstrumentComparator.compare: 11 > > The funny thing is, that it is working for other classes that implement interfaces, like LinkedList etc... > > Any hint where in the code I could poke around to get this fixed? > > Markus > > Am 18.03.2011 um 20:21 schrieb Arno Puder: > >> >> what errors do you get? >> >> On 3/18/11 12:20 PM, Markus Heberling wrote: >>> Hi, >>> >>> Yes, I did ant clean in xmlvm and in my project several times. >>> >>> Markus >>> >>> Am 18.03.2011 um 20:14 schrieb Arno Puder: >>> >>>> >>>> did you do an "ant clean"? You probably have an old cache on your system. >>>> >>>> Arno >>>> >>>> >>>> On 3/18/11 12:09 PM, Markus Heberling wrote: >>>>> Hi, >>>>> >>>>> I applied the patch, but unfortunately I can't compile the XCode project >>>>> afterwards. I get different errors every time or XCode beachballs and >>>>> doesn't compile at all... >>>>> >>>>> >>>>> Greetings, >>>>> Markus >>>>> >>>>> Am 17.03.2011 um 22:02 schrieb Arno Puder: >>>>> >>>>>> >>>>>> Oh! I'm sorry. I thought you were another Markus! >>>>>> >>>>>> Can you please check the review system. There is a patch by another >>>>>> Markus that will probably fix your problem. We hope to commit that >>>>>> patch soon. >>>>>> >>>>>> Arno >>>>>> >>>>>> On Mar 17, 2011, at 1:43 PM, Markus Heberling<ma...@ti... >>>>>> <mailto:ma...@ti...>> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I'm trying to convert a class that implements the Comparator >>>>>>> interface with the c-backend. Unfortunately using that class as a >>>>>>> comparator (e.g. in Arrays.sort) gives a EXC_BAD_ACCESS. In the >>>>>>> included source snippet, you can see, that the >>>>>>> com_sun_media_sound_ModelInstrumentComparator_compare___javax_sound_midi_Instrument_javax_sound_midi_Instrumentfunction >>>>>>> is bound to >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.vtable[11]. But a >>>>>>> little bit later in the interface vtable >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.vtable[12]is >>>>>>> used, which is unset and leads to the error. I have manually changed >>>>>>> the 12 to 11 in that line and the code works fine after that. >>>>>>> >>>>>>> void __INIT_IMPL_com_sun_media_sound_ModelInstrumentComparator() >>>>>>> { >>>>>>> if(!__TIB_com_sun_media_sound_ModelInstrumentComparator.classInitializationBegan) >>>>>>> { >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.classInitializationBegan= >>>>>>> 1; >>>>>>> >>>>>>> // Initialize base class if necessary >>>>>>> if(!__TIB_java_lang_Object.classInitialized) >>>>>>> __INIT_IMPL_java_lang_Object(); >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.newInstanceFunc= >>>>>>> __NEW_INSTANCE_com_sun_media_sound_ModelInstrumentComparator; >>>>>>> // Copy vtable from base class >>>>>>> XMLVM_MEMCPY(__TIB_com_sun_media_sound_ModelInstrumentComparator.vtable, >>>>>>> __TIB_java_lang_Object.vtable, sizeof(__TIB_java_lang_Object.vtable)); >>>>>>> // Initialize vtable for this class >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.vtable[11] = >>>>>>> (VTABLE_PTR) >>>>>>> &com_sun_media_sound_ModelInstrumentComparator_compare___javax_sound_midi_Instrument_javax_sound_midi_Instrument; >>>>>>> // Initialize vtable for implementing interfaces >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.numImplementedInterfaces= >>>>>>> 1; >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.implementedInterfaces= >>>>>>> (__TIB_DEFINITION_TEMPLATE* (*)[1]) >>>>>>> XMLVM_MALLOC(sizeof(__TIB_DEFINITION_TEMPLATE*) * 1); >>>>>>> __INIT_IMPL_FOR_CLASS_java_util_Comparator(&__TIB_com_sun_media_sound_ModelInstrumentComparator.implementedInterfaces[0][0]); >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.implementedInterfaces[0][0]->vtable[11] >>>>>>> = __TIB_com_sun_media_sound_ModelInstrumentComparator.vtable[12]; >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.implementedInterfaces[0][0]->vtable[1] >>>>>>> = __TIB_com_sun_media_sound_ModelInstrumentComparator.vtable[1]; >>>>>>> >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.declaredFields= >>>>>>> &__field_reflection_data[0]; >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.numDeclaredFields= sizeof(__field_reflection_data) >>>>>>> / sizeof(XMLVM_FIELD_REFLECTION_DATA); >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.constructorDispatcherFunc= >>>>>>> constructor_dispatcher; >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.declaredConstructors= >>>>>>> &__constructor_reflection_data[0]; >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.numDeclaredConstructors= >>>>>>> sizeof(__constructor_reflection_data) / >>>>>>> sizeof(XMLVM_CONSTRUCTOR_REFLECTION_DATA); >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.methodDispatcherFunc= >>>>>>> method_dispatcher; >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.declaredMethods= >>>>>>> &__method_reflection_data[0]; >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.numDeclaredMethods= >>>>>>> sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA); >>>>>>> __CLASS_com_sun_media_sound_ModelInstrumentComparator= >>>>>>> XMLVM_CREATE_CLASS_OBJECT(&__TIB_com_sun_media_sound_ModelInstrumentComparator); >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.clazz= >>>>>>> __CLASS_com_sun_media_sound_ModelInstrumentComparator; >>>>>>> __CLASS_com_sun_media_sound_ModelInstrumentComparator_ARRAYTYPE= >>>>>>> XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_com_sun_media_sound_ModelInstrumentComparator, >>>>>>> 1); >>>>>>> >>>>>>> __TIB_com_sun_media_sound_ModelInstrumentComparator.classInitialized= 1; >>>>>>> } >>>>>>> } >>>>>>> >>>>>>> I don't have enough knowledge of the c backend, so I can't find the >>>>>>> place where to correct this in the source myself... >>>>>>> >>>>>>> (And yes, you see correctly, that I'm trying to do MIDI in there :D) >>>>>>> >>>>>>> Regards, >>>>>>> Markus >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Colocation vs. Managed Hosting >>>>>>> A question and answer guide to determining the best fit >>>>>>> for your organization - today and in the future. >>>>>>> http://p.sf.net/sfu/internap-sfd2d >>>>>>> _______________________________________________ >>>>>>> Xmlvm-developers mailing list >>>>>>> Xml...@li... >>>>>>> <mailto:Xml...@li...> >>>>>>> https://lists.sourceforge.net/lists/listinfo/xmlvm-developers >>>>> >>> > |