gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.52k stars 375 forks source link

GWT crash (Safari 4.0.4) #4220

Closed dankurka closed 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 4220

Found in GWT Release: 1.7.1

Encountered on OS / Browser: OS X 10.6.2, Safari 4.0.4

Detailed description:
When I try to run GWT in hosted mode, then GWT crash. In problem report window I see:
Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000010
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Application Specific Information:

Java information:
 Exception type: Bus Error (0xa) at pc=0x93e9577b

 Java VM: Java HotSpot(TM) Client VM (14.1-b02-90 mixed mode macosx-x86)

Current thread (0x028c3400):  JavaThread "Thread-0" daemon [_thread_in_native, id=-
1609489152, stack(0xbf800000,0xc0000000)]
Stack: [0xbf800000,0xc0000000]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.google.gwt.dev.shell.mac.LowLevelSaf.gcUnprotect(II)V+0
j  com.google.gwt.dev.shell.mac.JsValueSaf$JsCleanupSaf.doCleanup()V+7
j  com.google.gwt.dev.shell.JsValue.mainThreadCleanup()V+58
j  
com.google.gwt.dev.shell.ModuleSpace.invokeNative(Ljava/lang/String;Ljava/lang/Object;[Ljava/l
ang/Class;[Ljava/lang/Object;)Lcom/google/gwt/dev/shell/JsValue;+0
j  
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(Ljava/lang/String;Ljava/lang/Object;[
Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(Ljava/lang/String;Ljava/lang/Object
;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;+7

Reported by bartosz.malkowski on 2009-11-12 08:23:56

dankurka commented 9 years ago
Same crash here with Leopard after installing that Safari update.

Date/Time:       2009-11-12 00:54:17.220 -0800
OS Version:      Mac OS X 10.5.8 (9L30)

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000010
Crashed Thread:  0

Application Specific Information:

Java information:
 Version: Java HotSpot(TM) Client VM (1.5.0_20-141 mixed mode, sharing)
 Virtual Machine version: Java HotSpot(TM) Client VM (1.5.0_20-141) for macosx-x86,
built on Aug 13 2009 10:28:19 by root with gcc 4.0.1 (Apple Inc. build 5465)
 Exception type: Bus Error (0xa) at pc=0x97432148

Current thread (0x0100ccf0):  JavaThread "Thread-0" daemon [_thread_in_native, id=-1606232288]
Stack: [0xbf800000,0xc0000000)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.google.gwt.dev.shell.mac.LowLevelSaf.gcUnprotect(II)V+0
j  com.google.gwt.dev.shell.mac.JsValueSaf$JsCleanupSaf.doCleanup()V+7
j  com.google.gwt.dev.shell.JsValue.mainThreadCleanup()V+58
j  com.google.gwt.dev.shell.ModuleSpace.invokeNative(Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/lang/Object;)Lcom/google/gwt/dev/shell/JsValue;+0
j  com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;+7
j  com.google.gwt.http.client.XMLHTTPRequest.getBrowserSpecificFailure(Lcom/google/gwt/core/client/JavaScriptObject;)Ljava/lang/String;+20
j  com.google.gwt.http.client.Request.fireOnResponseReceivedImpl(Lcom/google/gwt/http/client/RequestCallback;)V+23
j  com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch(Lcom/google/gwt/core/client/GWT$UncaughtExceptionHandler;Lcom/google/gwt/http/client/RequestCallback;)V+2
j  com.google.gwt.http.client.Request.fireOnResponseReceived(Lcom/google/gwt/http/client/RequestCallback;)V+11
v  ~StubRoutines::call_stub
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
j  com.google.gwt.dev.shell.MethodAdaptor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+13
j  com.google.gwt.dev.shell.mac.MethodDispatch.invoke(II[I[I)I+202
v  ~StubRoutines::call_stub
j  org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(I[IDZ[I)I+0
j  org.eclipse.swt.widgets.Display.sleep()Z+172
j  com.google.gwt.dev.SwtHostedModeBase.sleep()V+4
j  com.google.gwt.dev.SwtHostedModeBase.processEvents()V+11
j  com.google.gwt.dev.HostedModeBase.pumpEventLoop()V+13
j  com.google.gwt.dev.HostedModeBase.run()V+19
j  com.google.gwt.dev.HostedMode.main([Ljava/lang/String;)V+27

Reported by jimdouglas.basis on 2009-11-12 09:01:32

dankurka commented 9 years ago
Same error in Snow Leopard 1.6.2 after Safari 4.0.4 update installed

Reported by diginho on 2009-11-12 11:25:09

dankurka commented 9 years ago
heres a temporary workaround: http://gwtgeek.blogspot.com/2009/11/hosted-mode-crashes-after-os-
update.html

Reported by kurka.daniel on 2009-11-12 11:44:41

dankurka commented 9 years ago
Same issue here.... 10.6.2 - Updated Safari to 4.0.4.

Reported by terciofilho on 2009-11-12 15:14:20

dankurka commented 9 years ago
also here the same problem....10.6.2, today update to safari 4.0.4...working on an university
project and cant 
continue...whos fault is it, apple or google?

Reported by tiemerding-online@web.de on 2009-11-12 18:23:51

dankurka commented 9 years ago
also here the same problem....10.6.2, today update to safari 4.0.4...working on an university
project and cant 
continue...whos fault is it, apple or google?

Reported by tiemerding-online@web.de on 2009-11-12 18:24:13

dankurka commented 9 years ago
Anyone know how to go back to the old version of Safari?

Reported by ryandobson on 2009-11-12 18:25:45

dankurka commented 9 years ago
It seems the only solution at the moment is not to update to safari 4.0.4,
or use the temporary change described by kurka.daniel http://bit.ly/15GsRE
I switched back to safari 4.0.3 with restoring my hole system backup from time machine.

Reported by christian.hemker on 2009-11-12 19:49:30

dankurka commented 9 years ago
I have the exact same problem after the safari update.

Exception type: Bus Error (0xa)

Reported by ivaldez on 2009-11-12 21:46:39

dankurka commented 9 years ago
finally after some strange issues, reinstalling eclipse and using the workaround by
kurka i got back to work. 
thank you daniel u saved my weekend and my university-project....but i still hope there
will be an official fix! go 
go go guys @ google

Reported by tiemerding-online@web.de on 2009-11-12 23:03:03

dankurka commented 9 years ago
Hey All,

If you are having this issue and want to downgrade back to 4.0.3 I have added the files
here, 
http://populationjim.com/2009/11/13/downgrade-safari-from-404-to-get-gwt-working/

Cheers,

Jim

Reported by james.t.tyrrell on 2009-11-12 23:06:25

dankurka commented 9 years ago
Same issue after upgrading to Safari 4.0.4

Reported by jvence on 2009-11-13 01:32:11

dankurka commented 9 years ago
Same problem here: 10.5.8 - update Safari to 4.0.4. I'm using a workaround from
Daniel(Thank you Daniel!) and it works ok. 
Now planning to set up the Time Machine for further cases... 

Reported by Samochadina on 2009-11-13 10:40:24

dankurka commented 9 years ago
This is a bug in Safari 4.0.4's JavaScriptCore lib. I'm filing a bug there and I'll
see if I can 
find a work around.

Reported by knorton+personal@google.com on 2009-11-13 20:01:16

dankurka commented 9 years ago
I reported the bug and it has been fixed:
http://trac.webkit.org/changeset/50964

That fix will be in Safari 4.0.5 ... but there is actually no solid work around that
I can think of. Daniel's hack will buy you some 
more runtime but it will still be prone to crashes. (They just aren't going to happen
in gcUnprotect ... they'll happen in one of the 
other native functions)

The underlying problem is that JSValueProtect was accidently changed to a no-op, so
there is no way of protecting a JavaScript 
object that we return to the JVM. Even aliasing the value onto the global object won't
work because the APi wrapper gets divorced 
from the actual JSValue.

It is, however, possible to use JavaScriptCore from a WebKit nightly build. I'll put
together some instructions on how to do this.

Reported by knorton+personal@google.com on 2009-11-13 21:28:11

dankurka commented 9 years ago
I was able to downgrade back to 4.0.3, see
http://digitalbreed.com/2009/gwt-17x-safari-404-crash - but be aware that this may
have unknown side-effects and may cause a loss of data. Backup your stuff first.

Reported by digitalbreed on 2009-11-13 21:35:47

dankurka commented 9 years ago
Thanks knorton!

Reported by james.t.tyrrell on 2009-11-14 03:26:14

dankurka commented 9 years ago
be soon? thanks a lot

Reported by flashcloud163 on 2009-11-15 12:03:30

dankurka commented 9 years ago
I am having the same problem after latest  Safari upgrade. Hope it get's fixed soon.

Reported by ciudilo on 2009-11-15 13:29:44

dankurka commented 9 years ago
With much gratitude to Matt Mastracci, I'm back up and running with GWT hosted mode
in Eclipse 3.5.1 on 
Mac OS X 10.5.8 Leopard.  The basic steps are here:

http://grack.com/blog/2009/11/16/fix-for-gwt-hosted-mode-crash-with-safari-4-0-4/

I did this:

(1) From http://nightly.webkit.org/, download the current Mac OS X build:
WebKit r51062 was built on 17 November 2009 and is a 35.7 MB download.

(2) Open up the .dmg, then drag it (WebKit) to /Applications/.

(3) In Eclipse, select Run->Run Configurations... from the menu.

(4) On the left side, select your GWT Web Application.

(5) Click the Environment tab.

(6) Add variable:
      Name: DYLD_FRAMEWORK_PATH 
      Value: /Applications/WebKit.app/Contents/Frameworks/10.5

(7) Save that [Append environment to native environment should already be selected].

You should be good to go; this worked for me the first time.  (Kelly, please jump in
if you see any problems 
with this!)

Reported by jimdouglas.basis on 2009-11-17 16:40:34

dankurka commented 9 years ago
Thanks jdouglas, the directions that Matt gives on his blog are exactly the ones that
I 
was going to suggest. Thanks to Matt for typing it up.

Reported by knorton+personal@google.com on 2009-11-17 16:46:06

dankurka commented 9 years ago
I followed the instructions listed in #17 and my computer became unbootable. Had to
reformat and reinstall OS X. Wish I had seen #22 

Reported by kyle.hayes%disney.com@gtempaccount.com on 2009-11-17 18:35:06

dankurka commented 9 years ago
kyle, very sorry to hear that. It worked like a charm for me, so I thought I could
share the trick. I'll add a warning to that entry.

Reported by digitalbreed on 2009-11-17 19:58:58

dankurka commented 9 years ago
Great!
#22 helped me a lot.

Thanks

Reported by thomas.ricard on 2009-11-17 22:21:24

dankurka commented 9 years ago
#22 solved my problem too.

Reported by terciofilho on 2009-11-17 22:25:55

dankurka commented 9 years ago
Aha..,thanks  jdouglas , waite some days,it`s running...

Reported by flashcloud163 on 2009-11-18 12:51:14

dankurka commented 9 years ago
Great solution, I almost deleted all my code as I thought it's broken :-)

Reported by joerg.ahrens on 2009-11-18 13:23:37

dankurka commented 9 years ago
thanks for the succinct summary there jdouglas! :) - worth noting that Snow Leopard
users should set the value 
of DYLD_FRAMEWORK_PATH to /Applications/WebKit.app/Contents/Frameworks/10.6 (not 10.5)

Reported by funky.groovemonkey on 2009-11-18 17:36:19

dankurka commented 9 years ago
Doug and all: many thanks for your input/suggestions, solved the problem in minutes.
Much appreciated.

Reported by pascal.heus on 2009-11-19 03:12:15

dankurka commented 9 years ago
This also helped me, though I'm using Snow Leopard so I used 
Value: /Applications/WebKit.app/Contents/Frameworks/10.6 
and this solved my crashing as well, thank you!

Reported by tebriel on 2009-11-21 16:21:19

dankurka commented 9 years ago
Thanks.  This saved me.  I was a bit surprised that a safari upgrade would bust my
GWT application.  

I also used jdouglas's steps in comment 22.  I have snow leopard so used the
additional tip mentioned by funky.groovemonkey in comment 22.   

So other people can find this error via google I am entering a little of the gwt text
that helped me find this posting via another link...

****
Error in GWT due to Safari update on mac.

Issue Report Summary: GWT Project In Eclipse run error

GWT 1.7.1

Encountered on OS / Browser (e.g. WinXP, IE6-7 | Fedora 10, FF3):

MacOSX SNOW Leopard Safari 4.0.4, hosted mode 

run sample and exit , then report error: using libgwt-ll.jnilib plugin, GWT
Unexpectedly quit.

eclipse/plugins/com.google.gwt.eclipse.sdkbundle.macosx_1.7.1.v200909230239/gwt-mac-1.7.1/libgwt-ll.jnilib

Reported by jamonapi on 2009-11-21 20:58:22

dankurka commented 9 years ago
Thanks #22 saved me.
I correct my ant startup by only one line: (see dump)
VitalyMAC-2:~ vitaly$ more /usr/share/ant/bin/ant
...........
...........
export 
DYLD_FRAMEWORK_PATH=/Applications/WebKit.app/Contents/Frameworks/10.6
.........
.........
Thank you jdouglas ! 

Reported by mayatnikov on 2009-11-22 19:56:38

dankurka commented 9 years ago
Hi,

Is there a way to set the environment variable without using Eclipse?

I am having issues with 90% of everyday applications crashing, full details here:
http://forums.macrumors.com/showthread.php?p=8859972

Thanks in advance

Reported by LiWen.Yip on 2009-11-23 12:37:20

dankurka commented 9 years ago
Hi all, 
I don't know how to add environment variable in a gwt application launcher (due to
maven). I don't have the environment tab...

how can I achieve it (because I can't configure a web application launcher) ?

thanks

Reported by jerome.cance on 2009-11-23 14:16:44

dankurka commented 9 years ago
Instructions for setting environment variables for Leopard (10.5): 

1) edit /etc/launchd.conf to add the line:

setenv DYLD_FRAMEWORK_PATH /Applications/WebKit.app/Contents/Frameworks/10.5

- If the /etc/launch.conf file does not exist. You can create it using the Terminal
application.

a) Open up a Terminal prompt

b) sudo vi /etc/launchd.conf

c) Add the contents to the /etc/launchd.conf file:

setenv DYLD_FRAMEWORK_PATH /Applications/WebKit.app/Contents/Frameworks/10.5

2) Save your changes in Vi (command to save and quit :wq )

3) Reboot your Mac

4) Prove that your variables are working by opening a Terminal window and typing
export and you should see your new variables. These will also be available in
IntelliJ and other GUI apps you launch via Spotlight and Finder.

* If you are using Snow Leopard (10.6) you will need to use this line instead: setenv
DYLD_FRAMEWORK_PATH /Applications/WebKit.app/Contents/Frameworks/10.

Reported by nmutnick on 2009-11-23 14:35:45

dankurka commented 9 years ago
thanks for your response, I can't achieve it like this. Under snow leopard, I've
solved the problem by doing a .bashrc file in my home and add this command into:

export DYLD_FRAMEWORK_PATH=/Applications/WebKit.app/Contents/Frameworks/10.6

Reported by jerome.cance on 2009-11-23 15:10:01

dankurka commented 9 years ago
Great!
#22 helped me a lot.

Thanks

Reported by tricot.christophe on 2009-11-27 07:27:28

dankurka commented 9 years ago
Thanks much for the fix jdoug... et. al.
#22 works great
10.5.8

Reported by string01 on 2009-11-28 19:04:13

dankurka commented 9 years ago
Thanks! #22 works like magic!!!

Reported by ananth.padfoot on 2009-11-28 22:18:29

dankurka commented 9 years ago
Great, Great, Great!
#22 helped me a lot and it is working now perfectly.

Thanks

Reported by suanter on 2009-11-29 10:55:52

dankurka commented 9 years ago
Help.  I did this and now when I try to run the app I get a 404 loading the main .html
file??!!

Reported by marksea on 2009-12-01 03:48:29

dankurka commented 9 years ago
What exactly did you do, Mark?  And what is your system configuration?

There seems to be a general consensus that the steps described in http://code.google.com/p/google-web-
toolkit/issues/detail?id=4220&sort=-id#c22 are working pretty reliably to get GWT hosted
mode working again 
in Eclipse on Mac OS X.

Reported by jimdouglas.basis on 2009-12-01 04:18:04

dankurka commented 9 years ago
Setting the DYLD_FRAMEWORK_PATH may cause iPhone developers to experience serious crashes
with 
InterfaceBuilder and iPhoneSimulator. I had to remove both DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH

from my environment table to get things working again.

Reported by jvence on 2009-12-01 09:41:06

dankurka commented 9 years ago
@jvence, you can just set this on Run Configuration on Eclipse, so you don't change

your environment.

Reported by terciofilho on 2009-12-01 11:43:25

dankurka commented 9 years ago
thanks, 22 (with /Applications/WebKit.app/Contents/Frameworks/10.6) works great

Reported by codediggers.nl on 2009-12-01 16:24:59

dankurka commented 9 years ago
Getting very frustrated. Am I the only one that can't make this work!!!!!

There's no "Environment variables tab" in Eclipse on Mac. I've tried to follow the
instructions from Comment #22, but I can't find the Environment variables section.

1. I've tried run->run configurations. edit variable under my GWT app. That didn't
work
2. tried creating and editing ~/.bashrc with
export DYLD_FRAMEWORK_PATH=/Applications/WebKit.app/Contents/Frameworks/10.6
that did't work
3. tried same in /etc/.profile -didn't work
4. tried same in /etc.launchd.conf - didn't work!

Some kind soul please help.

Environment: Mac OSX, Snow leopard, Java 1.5

Thanks

Reported by iwegbue on 2009-12-01 18:55:46

dankurka commented 9 years ago
<<<<
Getting very frustrated. Am I the only one that can't make this work!!!!!

There's no "Environment variables tab" in Eclipse on Mac.
>>

I use mac snow leopard and eclipse (Version: 3.4.1
Build id: M20080911-1700) and was able to get the solution to work. What version of
gwt are you using?  There was recently another problem with the BootStrapPlatform
class when I upgraded to Snow Leopard.  I think it was due to Apple changing the
default jdk.  

I right clicked on my project (gwttest17 in this example), and selected properies.
 I
attached the screen that pops up as attachment gwt_safari_fix1.tiff.  Next I select
"Run/Debug Settings" from this screen, and get the attachment gwt_safari_fix2.tiff.

I then added the property that you see.

Reported by jamonapi on 2009-12-01 19:12:33


dankurka commented 9 years ago
<<
Getting very frustrated. Am I the only one that can't make this work!!!!!

There's no "Environment variables tab" in Eclipse on Mac.
>>

Here is the link that tells you how to get gwt to work with snow leopard operating
system upgrade on the mac.  Hosted mode only works with the 32 bit jdk, and snow
leopard defaults to 64 bit jdk 1.6.  I tried this fix and it worked for me.  I don't
know if this is your problem, but am throwing it out there just in case the safari
upgrade isn't your problem.

http://development.lombardi.com/?p=1012

Reported by jamonapi on 2009-12-01 19:18:31

dankurka commented 9 years ago
Comment #49 was helpful, but I'm still having the issue. I'm getting this message on
my console:
Invalid memory access of location 00000010 eip=97e1b77b

Reported by iwegbue on 2009-12-01 21:47:41

dankurka commented 9 years ago
<<Comment #49 was helpful, but I'm still having the issue. I'm getting this message
on
my console:
Invalid memory access of location 00000010 eip=97e1b77b>>
Have you successfully run your gwt app since you upgraded to Snow Leopard?  If not,
did you look at my other posting.  You might have 2 different problems going on here.

Reported by jamonapi on 2009-12-01 21:52:03