You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openoffice.apache.org by Kandarpa Malipeddi <ka...@persistent.co.in> on 2012/02/27 14:58:44 UTC

Getting SIGSEGV while using createInstanceWithContext()

Hi All,

We have compiled Apache OpenOffice3.4 source code and generated RPMs for core, URE and SDK. We have installed these RPMs.

While using the Apache OpenOffice 3.4 ure and sdk we observed following:
In one of our test cases we call "createInstanceWithContext()" function and this function lead to segmentation fault.
We ran this test case with VALGRIND tool and following are our observations:
                There is an invalid read in JavaLoader.
 Please find the Trace given below:
========================================================================================================================================================
                                ==5575== Invalid write of size 4
==5575==    at 0xD70EFC1: ???
==5575==    by 0xD7003EA: ???
==5575==    by 0xCC3112C: JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCE1E148: os::os_exception_wrapper(void (*)(JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCC30F64: JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCC02774: instanceKlass::call_class_initializer_impl(instanceKlassHandle, Thread*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCC00E2B: instanceKlass::initialize_impl(instanceKlassHandle, Thread*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCC00099: instanceKlass::initialize(Thread*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCC01123: instanceKlass::initialize_impl(instanceKlassHandle, Thread*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCC00099: instanceKlass::initialize(Thread*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCF08330: Threads::create_vm(JavaVMInitArgs*, bool*) (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xCC66F2F: JNI_CreateJavaVM (in $JAVA_JDK_JRE_PATH/lib/amd64/server/libjvm.so)
==5575==    by 0xB24C4EF: jfw_plugin_startJavaVirtualMachine (sunjavaplugin.cxx:583)
==5575==    by 0xB024E71: jfw_startVM (framework.cxx:402)
==5575==    by 0xAE0422D: stoc_javavm::JavaVirtualMachine::getJavaVM(com::sun::star::uno::Sequence<signed char> const&) (javavm.cxx:793)
==5575==    by 0xA9DF6F6: stoc_javaloader::JavaComponentLoader::getJavaLoader() (javaloader.cxx:199)
==5575==    by 0xA9E0805: stoc_javaloader::JavaComponentLoader::activate(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::registry::XRegistryKey> const&) (javaloader.cxx:398)
==5575==    by 0x54D6557: cppu::ORegistryFactoryHelper::createModuleFactory() (factory.cxx:900)
==5575==    by 0x54D675A: cppu::ORegistryFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (factory.cxx:750)
==5575==    by 0x54D4B44: cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (factory.cxx:215)
==5575==    by 0x54D51A2: cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (factory.cxx:499)
==5575==    by 0x93998B8: stoc_smgr::OServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (servicemanager.cxx:1250)
.....................
.....................
.....................
========================================================================================================================================================
Please let us know any points on this and also let us know workaround on this issue.

Note: We are checking the correctness of "context" (using context.is() != NULL) before calling the function "createInstanceWithContext()".

Thanks in advance
Kandarpa Malipeddi

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.