Hello, Thomas and Marcin,
Thank you for helping! It still not working. At least after removing
that "null" return it is not crashing OOo.
But it still not working. It still never calling the method
doProofreading, even if I press F7. Thomas, can you please continue
helpping me to find out what is wrong?
Also, I'm not sure it is related, but I notice that the Spell checker
configurations in Options dialog freezes if I open it while Cogroo is
installed.
I tried it while debugging the cogroo extension and I could find that
the exception occurred in the method:
com.sun.star.lib.uno.helper.Factory.createInstanceWithArgumentsAndContext(Object[],
XComponentContext) line: 217
The arguments was:
arg0 = {
Any[Type[com.sun.star.beans.XPropertySet],
com.sun.star.bridges.jni_uno.jni_pr...@125d06e
[oid=67c39d8;msci[0];2ead4e1a5c314ffb9074149c10713660,
type=com.sun.star.beans.XPropertySet]]
}
arg1 = {
Any[Type[void], null]
}
Thank you!
William Colen
On Fri, Jan 9, 2009 at 2:16 PM, Marcin Miłkowski <[email protected]> wrote:
> Hi,
>
> let me say it again: never return a null.
>
> One more thing: my implementation uses a trivial mechanism to make sure that
> there is only one instance of the service (I would have to store the state
> on disk otherwise). If your implementation is stateless, you might have many
> instances, but in case you want to save the ignored rules or save memory for
> instantiated objects, it might be good idea to have a single thread only.
>
> Is your source available in CVS? I might look at it.
>
> Regards
> Marcin
>
> William Colen pisze:
>>
>> Thank you Thomas,
>>
>> I can see the call to getLocales method in our extension logs. Maybe
>> for some threads it is working, for other threads not?
>> I compared our implementation with Marcin's implementation. The only
>> diference is that he passed a empty string as the 3rd parameter, we
>> passed null.
>>
>> Maybe that would solve this issue, but I will only be able to change
>> that and recompile at night (UTC/GMT -2 hours)
>>
>>
>> Thank you!
>> William
>>
>>
>>
>> On Fri, Jan 9, 2009 at 8:53 AM, Thomas Lange - Sun Germany - ham02 -
>> Hamburg <[email protected]> wrote:
>>>
>>> Hello William and Carlos,
>>>
>>> I was able to abtain the implementation name
>>> "br.usp.pcs.lta.cogroo.ooointegration.Main" by debugging linguistic
>>> (namely LngSvcMgr::GetAvailableGrammarSvcs_Imp) the grammar checker
>>> itself can be instantiated. It is even possible to get the
>>> XSupportedLocales interface from the component but the call to
>>> getLocales() does not work properly.
>>>
>>> In the debugger I can not step properly over the line
>>> uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales());
>>> and get a result from that call in
>>> LngSvcMgr::GetAvailableGrammarSvcs_Imp.
>>> Thus I think you should start by checking that implementation.
>>>
>>> While stepping over that call I'll get the following:
>>> First-chance exception at 0x77e4bee7 in soffice.bin: Microsoft C++
>>> exception: jni_uno::BridgeRuntimeError at memory location 0x014bd974
>>>
>>> Of course there might be other problems later on, but since I could not
>>> properly get beyond that point looking into problems that are beyond
>>> that point will probably be in vain as long that call does not work.
>>>
>>>
>>> And just in case that I have not mentioned this elsewhere so far:
>>> It is absolutely necessary that the component is thread-safe since it
>>> will be called from different threads!
>>>
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>>
>>>> Hi William,
>>>>
>>>>
>>>> William Colen wrote:
>>>>
>>>>> Thomas,
>>>>> I uploaded the extension to
>>>>>
>>>>> https://sourceforge.net/project/showfiles.php?group_id=182075&package_id=305572
>>>>> The file is
>>>>> CoGrOO-AddOn-3.0.2-SNAPSHOT-bin.oxt<http://downloads.sourceforge.net/cogroo/CoGrOO-AddOn-3.0.2-SNAPSHOT-bin.oxt?use_mirror=>
>>>>> Thank you!
>>>>>
>>>>> Marcin,Thank you! The tutorial helped a lot! I could debug it.
>>>>>
>>>>> But I still not able to find the crash problem.
>>>>> Following you can see the logs generated by CoGrOO extension.
>>>>>
>>>>> My steps to cause the crash was:
>>>>> 1. Created a new document.
>>>>> 2. Changed it to pt_BR
>>>>> 3. Entered a sentence with a grammar error: Fomos levados à crer.
>>>>> 4. Waited a few seconds, no automatic grammar checking (all log entries
>>>>> I
>>>>> have was generated before I press F7)
>>>>> 5. Pressed F7 -> OOo crashed
>>>>>
>>>>> The log is clear and easy to read. Something interesting is that the
>>>>> method doProofreading was never called: no traces from that method and
>>>>> also
>>>>> I inserted a breakpoint at the method's first line, and Eclipse never
>>>>> stopped there.
>>>>
>>>> Can you also drop me the implementation name of the service?
>>>> Since already the Tools/Options/Writing-Aids dialog does not get
>>>> displayed anymore I suspect I may have to do with the registration of
>>>> the service. Thus I like to instantiate it manually via API...
>>>>
>>>> Also you need not start the checking with F7 to crash the Office it
>>>> already dies just by trying to opening the Format/Character dialog. :-(
>>>>
>>>>
>>>> Regards,
>>>> Thomas
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>