Spider Monkey and jsdiDebuggerService Crash?

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

Spider Monkey and jsdiDebuggerService Crash?

Jiyul-2
I developed GUI script debugger which runs on eclipse. (with xul runner
and debugger service)

And my co-worker developed firefox plugin with c++.

when that plugin calls a script function through spider monkey on
debugging browser(which is based on customized xul runner), whole
eclipse crashed(JVM termination)

That plugin works okay in firefox. but it seems to crash with firebug
too. so I think debugger service and spider monkey compatibility might
be one factor of problem.

any idea?
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Spider Monkey and jsdiDebuggerService Crash?

John J Barton
Jiyul wrote:
> I developed GUI script debugger which runs on eclipse. (with xul runner
> and debugger service)
>
> And my co-worker developed firefox plugin with c++.
>
> when that plugin calls a script function through spider monkey on
> debugging browser(which is based on customized xul runner), whole
> eclipse crashed(JVM termination)

Well, I'd say "process termination". Eclipse is just a C++ program to
the OS.

>
> That plugin works okay in firefox. but it seems to crash with firebug

Which 'it'? plugin seems to crash with firebug or firefox seems to crash
with firebug? ("seems to"? Either it crashes or it does not crash.)

> too. so I think debugger service and spider monkey compatibility might
> be one factor of problem.
>
> any idea?

Gee, you have three programs with extensive experience of not crashing,
eclipse, firefox and firebug. And you have one new C++ code. I know
where I would look.

jjb
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Spider Monkey and jsdiDebuggerService Crash?

Jiyul-2
sorry for my terrible explanation.

Our product(Web RIA Solution) gives development(including debugger)
environment and it's runtime(script + plugins for each browser) to
customers. Customers can make web app which runs on browsers. Some
requirement needs super fast communication, So we supply native plugins
for each browser.

Development environment contains:
  1. GUI Script Debugger (it uses jsdIDebuggerService through javaxpcom)
  2. Browser for debugging
     (based on XUL runner which contains our c++ firefox extension)
  3. ...

Everything was fine till the native plugin calls java script while
debugging. When native plugin calls java script, just whole IDE crash.
Our c++ engineer can't receive any exception or entry point to inspect.

But that plugin works okay with just clean firefox. It crashes when some
other component uses jsdIDebuggerService like as our IDE(when it
debugging script) or firebug.

I have two suspects:

Q. If some native c++ code can invoke some script, It must be executed
UI-thread, because some XHTML DOM can be modified by script. Our c++
code seems to have not guarantee for that.  Am I right? then how to do that?
(I am an eclipse based IDE developer so I don't know much)


Q. Does calling script through Spider Monkey can be problem with using
jsdIDebuggerService?

_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Spider Monkey and jsdiDebuggerService Crash?

Gijs Kruitbosch ("Hannibal")
On 02/09/2009 06:51 AM, Jiyul wrote:

> sorry for my terrible explanation.
>
> Our product(Web RIA Solution) gives development(including debugger)
> environment and it's runtime(script + plugins for each browser) to
> customers. Customers can make web app which runs on browsers. Some
> requirement needs super fast communication, So we supply native plugins
> for each browser.
>
> Development environment contains:
> 1. GUI Script Debugger (it uses jsdIDebuggerService through javaxpcom)
> 2. Browser for debugging
> (based on XUL runner which contains our c++ firefox extension)
> 3. ...
>
> Everything was fine till the native plugin calls java script while
> debugging. When native plugin calls java script, just whole IDE crash.
> Our c++ engineer can't receive any exception or entry point to inspect.
>
> But that plugin works okay with just clean firefox. It crashes when some
> other component uses jsdIDebuggerService like as our IDE(when it
> debugging script) or firebug.
>
> I have two suspects:
>
> Q. If some native c++ code can invoke some script, It must be executed
> UI-thread, because some XHTML DOM can be modified by script. Our c++
> code seems to have not guarantee for that. Am I right? then how to do that?
> (I am an eclipse based IDE developer so I don't know much)
>
>
> Q. Does calling script through Spider Monkey can be problem with using
> jsdIDebuggerService?
>

It's possible that this is because you're not spinning up a new event loop, but
I don't know enough about the internals of JSD to be sure (and don't have time
to figure it out for you at this point, sorry). Have a look at what Venkman (and
probably Chromebug too) does. :-)

~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Spider Monkey and jsdiDebuggerService Crash?

John J Barton
In reply to this post by Jiyul-2
Jiyul wrote:
...

> But that plugin works okay with just clean firefox. It crashes when some
> other component uses jsdIDebuggerService like as our IDE(when it
> debugging script) or firebug.
>
> I have two suspects:
>
> Q. If some native c++ code can invoke some script, It must be executed
> UI-thread, because some XHTML DOM can be modified by script. Our c++
> code seems to have not guarantee for that.  Am I right? then how to do
> that?

If you question is "must jsd be called on the UI-thread" the answer is
almost certainly "yes". Nothing about the design of jsd is thread safe,
and specifically it creates data that points to js objects. So any
caller of jsd must be on the same thread as the creator of js objects as
far as I know.

> (I am an eclipse based IDE developer so I don't know much)
>
>
> Q. Does calling script through Spider Monkey can be problem with using
> jsdIDebuggerService?

I don't understand this question. jsdIDebuggerService is part of the JS
engine.

jjb
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger