No Script Console on Mac OS X

Bug #373514 reported by su_v
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Unassigned
Nominated for Old by electric47

Bug Description

Mac OS X 10.5.6
  XQuartz 2.3.2 (xorg-server 1.4.2-apple31)

  Inkscape 0.46+devel r21262, built Apr 30 2009
  Inkscape 0.46+devel r20809, built Mar 3 2009

  java version "1.5.0_16"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
  Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Menu item 'View > Scripts...' does not open the script console nor display any error message.

Menu item 'View > Messages...' shows the following error messages:

  JavaBinderyImpl err:
  No Java VM found. Is JAVA_HOME defined? Need to find 'libjvm.so'

  JavaBinderyImpl err:
  Could not find 'JNI_CreateJavaVM' in shared library

From a quick search through the sources (caveat - I'm not a programer), it seems that the script console is not yet ported to the Mac OS X platform:

<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/bind/javabind.cpp>

  285 #ifdef __WIN32__
<...>
  324 /**
  325 * Common places to find jvm.dll under JAVA_HOME
  326 */
<...>
  499 #else /* !__WIN32__ */
<...>
  565 /**
  566 * Look for a Java VM (libjvm.so) in several Unix places
  567 */

-> no case for Java VM library <libjvm.dylib> / J2SE from Apple.

Wouldn't it be better to either disable the menu item 'Scripts...' on OS X or else provide some kind of feedback to the user (like 'not implemented')?

Revision history for this message
su_v (suv-lp) wrote :

Inkscape 0.46-2 on OS X 10.5.8: 'View > Scripts…' opens the script console, with following message:

# This is where you could type a script.
# However, no scripting languages have been compiled
# into Inkscape, so this window has no functionality.
# When compiling Inkscape, run "configure" with
# "--with-python" and/or "--with-perl".

Inkscape 0.47pre3-2 on OS X 10.5.8: 'View > Scripts…' fails silently.

console messages:
** (inkscape-bin:44548): WARNING **: JavaBinderyImpl err:
** (inkscape-bin:44548): WARNING **: No Java VM found. Is JAVA_HOME defined? Need to find 'libjvm.so'
** (inkscape-bin:44548): WARNING **:
** (inkscape-bin:44548): WARNING **: JavaBinderyImpl err:
** (inkscape-bin:44548): WARNING **: Could not find 'JNI_CreateJavaVM' in shared library
** (inkscape-bin:44548): WARNING **:

repeating the proposal to disable the menu item 'View > Scripts…' until this issue is solved (for all platforms). See bug #346721 "Segfault after opening JVM scripts dialog" for related issues on linux.

tags: added: regression
su_v (suv-lp)
tags: added: java
Revision history for this message
su_v (suv-lp) wrote :

menu 'View > Scripts…' has been disabled for all platforms in rev. 22569

Revision history for this message
jazzynico (jazzynico) wrote :

Could we consider closing it (and Bug #346721 "Segfault after opening JVM scripts dialog") "won't fix". The java script dialog was added in 0.47 but never released. And we now have a script tab in File>Document properties, and the possibility to use d-bus.

Changed in inkscape:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
su_v (suv-lp) wrote :

> Could we consider closing it (and Bug #346721 "Segfault after
> opening JVM scripts dialog") "won't fix".

The code for the Java Bindings in the source tree has not been removed AFAIK - maybe this should be decided on a higher level whether to remove the code or fix/update it and add cross-platform support? The result of that would also affect the status of both mentioned reports.
<https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/src/bind/>

> And we now have a script tab in File>Document properties

AFAIU those linked external javascripts are unrelated to what the internal script console was intended for (but I could be wrong).

Revision history for this message
su_v (suv-lp) wrote :

> Could we consider closing it (…) "won't fix".

Revisiting & reconsidering my earlier comment - no opposition to close this report (bug #373514), maybe as 'Fix Released' without milestone (referring to trunk between the branches of 0.46 and 0.47):
- "disable dialog on OS X" had been done (for all platforms)
  <https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/8828>

The crash originally reported in bug #346721 seems to have been fixed in
<https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/7897>
even though other issues remained.

Maybe remaining issues like
- "seems that the script console is not yet ported to the Mac OS X platform"
- "WARNING **: JNI_CreateJavaVM() failed" (linux, win32)
- "The Java classes under src/bind/java are not compiled or installed when using Automake"
and the status of java bindings in general might be tracked elsewhere (in a new report ?) - whether to keep or remove the code, or to fix/update and include it in cross-platform build tools, etc. …

Revision history for this message
su_v (suv-lp) wrote :

>JazzNico wrote:
>> Could we consider closing it (and Bug #346721 "Segfault after
>> opening JVM scripts dialog") "won't fix". The java script dialog
>> was added in 0.47 but never released. And we now have a script
>> tab in File>Document properties, and the possibility to use d-bus.

There seems to have been a basic misunderstanding about which dialog this report was actually about: the menu entry 'View > Scripts…' which was present in the released version Inkscape 0.46 (screenshot on demand) and subsequently removed shortly before the release of 0.47 (while the underlying source code was left in place).

To the best of my knowledge, the 'View > Scripts…' dialog was part of an experimental feature to run external python or perl scripts from within Inkscape - available if the sources had been configured with '--with-python' and '--with-perl'. These two configure options never worked on Mac OS X (neither python nor perl libraries are detected), and thus the feature was not enabled with the official packages for Mac OS X.

In my understanding it has no relation to embedding / linking javascript code into Inkscape SVG files (Document Properties > Scripting).

~suv wrote:
> Revisiting & reconsidering my earlier comment - no opposition
> to close this report (bug #373514), maybe as 'Fix Released'
> without milestone (referring to trunk between the branches of
> 0.46 and 0.47):
> - "disable dialog on OS X" had been done (for all platforms)
> <https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/8828>

My mistake (the dialog this report is about was actually present in released versions) -> closing this report as 'Fix Released' with milestone set to 0.47 (dialog removed from menu 'View', for all platforms).

Remaining issues as listed in comment #5 ought to be filed separately in case the Java bindings are revisited and play an active role in current Inkscape versions (AFAIU the java bindings are considered obsolete).

Please revert the status change and unset the milestone if you don't agree.

Changed in inkscape:
milestone: none → 0.47
status: Triaged → Fix Released
su_v (suv-lp)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.