#1553 Error in fwt example (demo.fan)

bpdp Wed 8 Jun 2011

Dear all,

I tried to run an example from fwt (demo.fan) and did not succeed. When I executed "./demo.fan", the error was:

sys::Err: org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]

So, I thought this was an error because of unmatched version between SWT with XULRunner just as Eclipse usually complains about. I downloaded XULRunner runtime with version 1.9.2.17 (since Eclipse do not support version 2.0) and have MOZILLA_FIVE_HOME setup to the directory where I unpack XULRunner. Still I got an error. I use /usr/lib/firefox-4 and still got an error. I tried to get fullblown mozilla suite (seamonkey) and have MOZILLA_FIVE_HOME setup to that location, but still got an error. The latest error with XULRunner, firefox-4, and SeaMonkey was:

[bpdp@bpdp-arch fwt]$ ./demo.fan 
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x8b35ab9a, pid=3304, tid=3063135088
#
# JRE version: 6.0_25-b06
# Java VM: Java HotSpot(TM) Server VM (20.0-b11 mixed mode linux-x86 )
# Problematic frame:
# C  [libxul.so+0xc6cb9a]  NS_UTF16ToCString_P+0x195c7
#
# An error report file with more information is saved as:
# /home/bpdp/software/fantom-1.0.59/examples/fwt/hs_err_pid3304.log 
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/home/bpdp/software/fantom/bin/fanlaunch: line 72:  3304 Aborted "$FAN_JAVA" $osFlags $JAVA_OPTIONS $libPath -cp "$FAN_CP":"$CLASSPATH" -Dfan.home="$FAN_HOME" "$FAN_MAIN" "$@"
[bpdp@bpdp-arch fwt]$ 

I use fantom 1.0.59 in Linux.

Is there any clue on this? Thank you :)

andy Wed 8 Jun 2011

Maybe someone else on Linux might be more help - but sounds like an issue with the WebBrowser SWT component (which I assume they are using Mozilla for). Has anyone else had success running FWT on Linux that can comment?

If the issue is due to instantiating that component - you can try commenting out that code in the example script: https://gist.github.com/1014472

The WebBrowser is pretty flaky on both Windows and OS X that I have tried - so doesn't surprise me there are issues - but we should handle this more gracefully in Fantom (if possible) if there is a known issue with Linux.

bpdp Wed 8 Jun 2011

Hi Andy,

Commenting does make demo.fan run. So, probably we can conclude that the problems lies in WebBrowser SWT component. It's a kind of weird since I also has the same problem with Helios with XULRunner 2.0 and can make it work smoothly only by using XULRunner 1.9.2.17.

Thanks!

peter Wed 8 Jun 2011

The example, with webbrowser, runs fine for me - Debian Linux, xulrunner-1.9.2, fantom-1.0.59.

bpdp Thu 9 Jun 2011

I finally can solved this problem. I just need to register XULRunner with the system. So, a complete story should be:

  • Download XULRunner version 1.9.2.17
  • Have it extracted at whatever directory you prefer.
  • cd into the directory
  • ./xulrunner --register-user
  • run demo.fan

It all should works now. :)

Hope this help somebody experience the same thing. :)

andy Thu 9 Jun 2011

Great - thanks for the info bpdp!

Login or Signup to reply.