New grammar checking framework available with OOo300 m14

classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

Carlos Menezes
The following is my log. I've just typed a key and OOo have crashed. CoGrOO
core didn't let any log (probably, it was not invoked...)


08/01/2009 23:45:10 br.usp.pcs.lta.cogroo.ooointegration.Main
__writeRegistryServiceInfo
FINER: ENTRY com.sun.star.bridges.jni_uno.JNI_proxy@f30494[oid=-5438aadc;gcc3[0];f4fab581b1040c38eacbc75183937,
type=com.sun.star.registry.XRegistryKey]
08/01/2009 23:45:10 br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
FINER: ENTRY
08/01/2009 23:45:10 br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
FINER: RETURN [com.sun.star.linguistic2.Proofreader,
br.usp.pcs.lta.cogroo.ooointegration.Main]
08/01/2009 23:45:10 br.usp.pcs.lta.cogroo.ooointegration.Main
__writeRegistryServiceInfo
FINER: RETURN true
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
__writeRegistryServiceInfo
FINER: ENTRY com.sun.star.bridges.jni_uno.JNI_proxy@186d4c1[oid=-49f5ca44;gcc3[0];94ee6a39eb2540ecbe28fb2535a44f6,
type=com.sun.star.registry.XRegistryKey]
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
FINER: ENTRY
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
FINER: RETURN [com.sun.star.linguistic2.Proofreader,
br.usp.pcs.lta.cogroo.ooointegration.Main]
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
__writeRegistryServiceInfo
FINER: RETURN true
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
__writeRegistryServiceInfo
FINER: ENTRY com.sun.star.bridges.jni_uno.JNI_proxy@111a3ac[oid=-4c58c5a4;gcc3[0];94ee6a39eb2540ecbe28fb2535a44f6,
type=com.sun.star.registry.XRegistryKey]
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
FINER: ENTRY
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
FINER: RETURN [com.sun.star.linguistic2.Proofreader,
br.usp.pcs.lta.cogroo.ooointegration.Main]
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
__writeRegistryServiceInfo
FINER: RETURN true
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
__getComponentFactory
FINER: ENTRY br.usp.pcs.lta.cogroo.ooointegration.Main
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
FINER: ENTRY
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
FINER: RETURN [com.sun.star.linguistic2.Proofreader,
br.usp.pcs.lta.cogroo.ooointegration.Main]
08/01/2009 23:46:58 br.usp.pcs.lta.cogroo.ooointegration.Main
__getComponentFactory
FINER: RETURN com.sun.star.lib.uno.helper.Factory@dd20f6
08/01/2009 23:47:10 br.usp.pcs.lta.cogroo.ooointegration.Main Main
FINER: ENTRY com.sun.star.bridges.jni_uno.JNI_proxy@867e89[oid=-4b7a3634;gcc3:unsafe[0];836c3de83e1a48a1bc93297e5d29275c,
type=com.sun.star.uno.XComponentContext]
08/01/2009 23:47:10 br.usp.pcs.lta.cogroo.ooointegration.Main <init>
FINE: Called br.usp.pcs.lta.cogroo.ooointegration.Main
08/01/2009 23:47:10 br.usp.pcs.lta.cogroo.ooointegration.Main <init>
FINE: Will call Resources.init
08/01/2009 23:47:10 br.usp.pcs.lta.cogroo.ooointegration.Main Main
FINER: RETURN
08/01/2009 23:47:10 br.usp.pcs.lta.cogroo.ooointegration.Main
getImplementationName
FINER: ENTRY
08/01/2009 23:47:10 br.usp.pcs.lta.cogroo.ooointegration.Main
getImplementationName
FINER: RETURN br.usp.pcs.lta.cogroo.ooointegration.Main
08/01/2009 23:47:10 br.usp.pcs.lta.cogroo.ooointegration.Main getLocales
FINER: ENTRY
08/01/2009 23:47:10 br.usp.pcs.lta.cogroo.ooointegration.Main getLocales
FINER: RETURN pt_BR;

[]s,

Menezes

2009/1/8 William Colen <[hidden email]>

> 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.
>
> Please help!
>
> Thank you,
> William
>
> The log:
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> __getComponentFactory
> FINER: ENTRY br.usp.pcs.lta.cogroo.ooointegration.Main
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getServiceNames
> FINER: ENTRY
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getServiceNames
> FINER: RETURN [com.sun.star.linguistic2.Proofreader,
> br.usp.pcs.lta.cogroo.ooointegration.Main]
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> __getComponentFactory
> FINER: RETURN com.sun.star.lib.uno.helper.Factory@dd20f6
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main Main
> FINER: ENTRY com.sun.star.bridges.jni_uno.JNI_proxy@e7b241
> [oid=29a296c;msci:unsafe[0];ea3c9e0959d4549984f4eb7f26c9c9f,
> type=com.sun.star.uno.XComponentContext]
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main <init>
> FINE: Called br.usp.pcs.lta.cogroo.ooointegration.Main
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main <init>
> FINE: Will call Resources.init
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main Main
> FINER: RETURN
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getImplementationName
> FINER: ENTRY
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getImplementationName
> FINER: RETURN br.usp.pcs.lta.cogroo.ooointegration.Main
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getLocales
> FINER: ENTRY
> Jan 8, 2009 11:04:37 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getLocales
> FINER: RETURN pt_BR;
> Jan 8, 2009 11:04:55 PM br.usp.pcs.lta.cogroo.ooointegration.Main Main
> FINER: ENTRY com.sun.star.bridges.jni_uno.JNI_proxy@e7b241
> [oid=29a296c;msci:unsafe[0];ea3c9e0959d4549984f4eb7f26c9c9f,
> type=com.sun.star.uno.XComponentContext]
> Jan 8, 2009 11:04:55 PM br.usp.pcs.lta.cogroo.ooointegration.Main <init>
> FINE: Called br.usp.pcs.lta.cogroo.ooointegration.Main
> Jan 8, 2009 11:04:55 PM br.usp.pcs.lta.cogroo.ooointegration.Main <init>
> FINE: Will call Resources.init
> Jan 8, 2009 11:04:55 PM br.usp.pcs.lta.cogroo.ooointegration.Main Main
> FINER: RETURN
> Jan 8, 2009 11:04:55 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getImplementationName
> FINER: ENTRY
> Jan 8, 2009 11:04:55 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getImplementationName
> FINER: RETURN br.usp.pcs.lta.cogroo.ooointegration.Main
> Jan 8, 2009 11:04:55 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getLocales
> FINER: ENTRY
> Jan 8, 2009 11:04:55 PM br.usp.pcs.lta.cogroo.ooointegration.Main
> getLocales
> FINER: RETURN pt_BR;
>
> Thank you!William
>
>
> On Thu, Jan 8, 2009 at 3:43 PM, Marcin Miłkowski <[hidden email]> wrote:
>
> > CARLOS EDUARDO DANTAS DE MENEZES pisze:
> >
> >  Thomas,
> >>
> >> We are trying to debug new version of CoGrOO (3.0.2) but it sounds a
> >> bit difficult.
> >>
> >> menezes@possante:~$ /opt/broffice.org3/program/soffice -writer
> >> terminate called after throwing an instance of
> >> 'com::sun::star::uno::RuntimeException'
> >> sh: crash_report: not found
> >>
> >> Do you have any tip to easy this task?
> >>
> >
> > Did you try debugging the Java code by attaching the debugger as
> described
> > here? (I believe CoGrOO was using a small Java interface to call the
> > standalone CoGrOO installation).
> >
> > See here:
> >
> > http://cedric.bosdonnat.free.fr/wordpress/?p=57
> >
> > This is really a very useful technique - if a grammar checker gets
> > registered and called (on opening a text document), you will be able to
> set
> > breakpoints and get into the code to see what happens. From my
> experience, I
> > can tell you that most problems come from not setting the return values -
> > they are not for fun, they cannot be null, they can be at most empty.
> >
> > Regards
> > Marcin
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

thomas.lange
In reply to this post by thomas.lange

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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

William Colen
Thomas,

The implementation name is the one from Linguistic.xcu? If yes, it is
br.usp.pcs.lta.cogroo.ooointegration.Main

<node oor:name="GrammarCheckers">
    <node oor:name="br.usp.pcs.lta.cogroo.ooointegration.Main" oor:op="fuse">
        <prop oor:name="Locales" oor:type="oor:string-list">
             <value>pt-BR</value>
        </prop>
      </node>
 </node>

Also:
getImplementationName
    returns: br.usp.pcs.lta.cogroo.ooointegration.Main
getServiceNames
    returns: com.sun.star.linguistic2.Proofreader,
br.usp.pcs.lta.cogroo.ooointegration.Main
Before getServceNames was returning
br.usp.pcs.lta.cogroo.ooointegration.Main only. But I checked Marcin
implementation on LT and he did this way. I changed my, since LT is
working and Cogroo not.

Thank you!
William

On Fri, Jan 9, 2009 at 6:38 AM, Thomas Lange - Sun Germany - ham02 -
Hamburg <[hidden email]> wrote:

>
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

thomas.lange
In reply to this post by thomas.lange


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: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

William Colen
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 <[hidden email]> 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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

Marcin Miłkowski
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 <[hidden email]> 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: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

Carlos Menezes
Marcin,

I believe the problem is this (null return). Code is available in:

https://cogroo.svn.sourceforge.net/svnroot/cogroo/cogroo3/trunk/

To be more specific:

https://cogroo.svn.sourceforge.net/svnroot/cogroo/cogroo3/trunk/ooointegration/src/main/java/br/usp/pcs/lta/cogroo/ooointegration/

[]s,

Menezes

2009/1/9 Marcin Miłkowski <[hidden email]>

> 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 <[hidden email]> 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: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>  ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

William Colen
In reply to this post by Marcin Miłkowski
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_proxy@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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: New grammar checking framework available with OOo300 m14

William Colen
Thomas,

I'm sorry. I forgot to mention that I uploaded another build to that
same location: http://downloads.sourceforge.net/cogroo/CoGrOO-AddOn-3.0.2-SNAPSHOT-bin.oxt?use_mirror=


Thank you!
William



On Thu, Jan 15, 2009 at 9:39 PM, William Colen <[hidden email]> wrote:

> 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_proxy@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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
12