[FIXED] OSX / Java 7

Started by normen, August 14, 2012, 17:07:59

Previous topic - Next topic

thebattlebard

Good work EmuMog! :)

I've gotten machines ready with 10.6, 10.7 and 10.8 ready to test with whenever everything is added to the nightlies.

abcdef

Hi

Any updates on when the fixes will be in the nightly builds?

Thanks

ShaRose

Quote from: abcdef on September 13, 2012, 19:32:48
Hi

Any updates on when the fixes will be in the nightly builds?

Thanks

Just asked him on IRC a second ago.

[Sunday 09:26:41 pm]	<UltraMoogleMan>	<+ShaRose> actually, curious UltraMoogleMan, I saw someone asking about the osx lwjgl update in the lwjgl channel a while ago since you hadn't given any updates on the thread since... the 2nd
[Sunday 09:27:03 pm]	<UltraMoogleMan>	I spent the past week working on the renderer re-write, but I'm currently trying to solve two issues before I commit
[Sunday 09:27:17 pm]	<UltraMoogleMan>	One is that when you go fullscreen, then un-fullscreen, resizing stops working
[Sunday 09:27:26 pm]	<UltraMoogleMan>	The other is that trying to go fullscreen will crash 10-20% of the time


So there you go.

princec

I'm on the edge of my seat :) Seriously! I got my first "Waaaahh! Doesn't work on OSX 10.8" support email the other day, the first of many :S

Cas :)

abcdef

LWJGL does work on 10.8, you just need to use the Java 6 JRE (The one apple provides) which you can download from the apple website. Would be good though to have a java 7 compatible one too

princec

Aye - I'd really like to move to JDK7 for Mac so I can embed it (and thus not rely on any further downloading). Not to mention a few spiffy new Java 7 features I rather enjoy using!

Cas :)

princec


Matzon

yeah ... poke and stuff ... would like to get this in the next release, preferably before the cert expires ...

normen

This gets important now. Latest OSX update disabled all apple java for the browser. This means when people encounter a java applet they will have to use Java7, they will even be automatically redirected.

When you have the JDK7 installed the only "obvious" way to revert to Java6 as default is to remove the JDK7 folder as the "Java Settings" app is gone as well :/ I have all my java apps incl. NetBeans, the jMonkeyEngine SDK etc. start on Java7 now t.t

bjorn

Quote from: normen on October 17, 2012, 00:26:15
When you have the JDK7 installed the only "obvious" way to revert to Java6 as default is to remove the JDK7 folder as the "Java Settings" app is gone as well :/ I have all my java apps incl. NetBeans, the jMonkeyEngine SDK etc. start on Java7 now t.t

I installed the Lion security update (Java for OS X 2012-006) and discovered that the applet plugin disabled AND removed! The only way to get lwjgl applets to work again is to revert to 1.6.0.35 or lower. Not an easy task, but I downloaded

Java for OS X Lion Update 1 - http://support.apple.com/kb/DL1421

which is 1.6.0_29, and extracted the JavaAppletPlugin.plugin to /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin using Pacifist. Now works again, for me.

EmuMog

Criminy, sorry to disappear like that, life's been incredibly hectic lately.

Okay, so, the only two remaining issues (that I know of based on my limited testing) are:
1) In Minecraft at least, when you start the game, then go fullscreen, then go back to windowed mode, resizing no longer appears to work.
2) In Minecraft, when you go fullscreen, the menu bar and dock do not disappear.

I've been having a heck of a time trying to fix those two issues, and would love any insight any other OS X folks can provide into:
- The above two issues
- Bug reports when running other games / applications, preferably games that I too can obtain for the purposes of fixing said bug reports.
- General code review, specifically ignoring dead code / the large amount of printfs still present in the code, as I'm planning on doing a final beautification pass once issues #1 and #2 are ironed out. More interested in hearing if there are better ways of doing things, etc.

And here are the downloads:
LWJGL JARs: https://dl.dropbox.com/u/28008537/jars.zip
LWJGL natives for OS X: https://dl.dropbox.com/u/28008537/natives.zip
LWJGL source archive, includes both modified and unmodified files: https://dl.dropbox.com/u/28008537/src.zip

Thanks in advance!

normen

Thanks, when using this for jMonkeyEngine3, I get a native crash with no traceable stack:

Thread 27 Crashed:: Java: LWJGL Renderer Thread
0   liblwjgl.jnilib                  0x000000011482f7bb Java_org_lwjgl_opengl_MacOSXContextImplementation_nCreate + 235
1   ???                              0x0000000106fa3eee 0 + 4412030702
2   ???                              0x0000000106f989b3 0 + 4411984307
3   ???                              0x0000000106f98e8d 0 + 4411985549
4   ???                              0x0000000106f9885a 0 + 4411983962
5   ???                              0x0000000106f9885a 0 + 4411983962
6   ???                              0x0000000106f9885a 0 + 4411983962
7   ???                              0x0000000106f98d34 0 + 4411985204
8   ???                              0x0000000106f93438 0 + 4411962424
9   libclient64.dylib                0x000000010657afa2 0x1064e4000 + 618402
10  libclient64.dylib                0x000000010658702c 0x1064e4000 + 667692
11  libclient64.dylib                0x0000000106586f22 0x1064e4000 + 667426
12  libclient64.dylib                0x0000000106586ec2 0x1064e4000 + 667330
13  libclient64.dylib                0x0000000106586d64 0x1064e4000 + 666980
14  libclient64.dylib                0x0000000106586b79 0x1064e4000 + 666489
15  libclient64.dylib                0x00000001064f75ea 0x1064e4000 + 79338
16  libsystem_c.dylib                0x00007fff8f867742 _pthread_start + 327
17  libsystem_c.dylib                0x00007fff8f854181 thread_start + 13

Thread 25 crashed with X86 Thread State (64-bit):
 rax: 0x0000000000000000  rbx: 0x00007fabd22206d0  rcx: 0x00007fabd22206d0  rdx: 0x00007fabd403a200
 rdi: 0x0000000000000103  rsi: 0x0000010000000100  rbp: 0x000000010e126750  rsp: 0x000000010e126720
  r8: 0x0000000000012068   r9: 0x000000010e126680  r10: 0x00000000000010bc  r11: 0x0000000000000000
 r12: 0x00007fabd1423bb0  r13: 0x00007fabd210aa40  r14: 0x00007fabd4907648  r15: 0x00007fabd60251d0
 rip: 0x000000010e13c7bb  rfl: 0x0000000000010202  cr2: 0x0000000000000028
Logical CPU: 3

:(

System:
OSX 10.8.2 (latest) / MacBook Pro Mid 2010 Core i7 / NVidia GeForce 330M

Java:
Oracle JDK 7u6

ajr_1

Hi EmuMog, thanks for the update.  I've tried it out with Mountain Lion, Java 7 Update 9 and get a similar crash with nothing in the Java console:

Thread 23 Crashed:: Java: AWT-EventQueue-2
0   libsystem_kernel.dylib           0x00007fff8c15f212 __pthread_kill + 10
1   libsystem_c.dylib                0x00007fff8c095af4 pthread_kill + 90
2   libsystem_c.dylib                0x00007fff8c0d9dce abort + 143
3   libjvm.dylib                     0x00000001074f4073 os::abort(bool) + 25
4   libjvm.dylib                     0x00000001075e282e VMError::report_and_die() + 2306
5   libjvm.dylib                     0x00000001074f5767 JVM_handle_bsd_signal + 1073
6   libsystem_c.dylib                0x00007fff8c0828ea _sigtramp + 26
7   liblwjgl.jnilib                  0x00000001569d07bb Java_org_lwjgl_opengl_MacOSXContextImplementation_nCreate + 235
8   ???                              0x0000000107dcdf90 0 + 4426882960
9   ???                              0x0000000107dc2333 0 + 4426834739
10  ???                              0x0000000107dc29e1 0 + 4426836449
11  ???                              0x0000000107dc2158 0 + 4426834264
12  ???                              0x0000000107dc2158 0 + 4426834264
13  ???                              0x0000000107dc2158 0 + 4426834264
14  ???                              0x0000000107dc2158 0 + 4426834264
15  ???                              0x0000000107dc2158 0 + 4426834264
16  ???                              0x0000000107dc2158 0 + 4426834264
17  ???                              0x0000000107dc2806 0 + 4426835974
18  ???                              0x0000000107dc2158 0 + 4426834264
19  ???                              0x0000000107dc2158 0 + 4426834264
20  ???                              0x0000000107dc2158 0 + 4426834264
21  ???                              0x0000000107dc2158 0 + 4426834264
22  ???                              0x0000000107dc2333 0 + 4426834739
23  ???                              0x0000000107dbc4f7 0 + 4426810615
24  libjvm.dylib                     0x00000001073c793f JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 557
25  libjvm.dylib                     0x00000001073c770c JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) + 40
26  libjvm.dylib                     0x00000001074027c3 JVM_DoPrivileged + 560
27  ???                              0x0000000107dcdf90 0 + 4426882960
28  ???                              0x0000000107dc2333 0 + 4426834739
29  ???                              0x0000000107dc2333 0 + 4426834739
30  ???                              0x0000000107dc29e1 0 + 4426836449
31  ???                              0x0000000107dc2333 0 + 4426834739
32  ???                              0x0000000107dbc4f7 0 + 4426810615
33  libjvm.dylib                     0x00000001073c793f JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 557
34  libjvm.dylib                     0x00000001073c770c JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) + 40
35  libjvm.dylib                     0x00000001074027c3 JVM_DoPrivileged + 560
36  ???                              0x0000000107dcdf90 0 + 4426882960
37  ???                              0x0000000107dc2333 0 + 4426834739
38  ???                              0x0000000107dc29e1 0 + 4426836449
39  ???                              0x0000000107dc2158 0 + 4426834264
40  ???                              0x0000000107dc2158 0 + 4426834264
41  ???                              0x0000000107dc2158 0 + 4426834264
42  ???                              0x0000000107dc2158 0 + 4426834264
43  ???                              0x0000000107dc2158 0 + 4426834264
44  ???                              0x0000000107dc2158 0 + 4426834264
45  ???                              0x0000000107dbc4f7 0 + 4426810615
46  libjvm.dylib                     0x00000001073c793f JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 557
47  libjvm.dylib                     0x00000001073c7e1c JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*) + 256
48  libjvm.dylib                     0x00000001073c7f56 JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*) + 74
49  libjvm.dylib                     0x00000001073fe8d0 thread_entry(JavaThread*, Thread*) + 169
50  libjvm.dylib                     0x00000001075b7694 JavaThread::thread_main_inner() + 134
51  libjvm.dylib                     0x00000001075b8b7a JavaThread::run() + 440
52  libjvm.dylib                     0x00000001074f4595 java_start(Thread*) + 173
53  libsystem_c.dylib                0x00007fff8c094742 _pthread_start + 327
54  libsystem_c.dylib                0x00007fff8c081181 thread_start + 13

kappa

@EmuMog and @norman might be useful to also post the Arch (32bit, 64bit), OS X version and Java version you are using to try narrow down if the above crashes happen only on certain configurations of mac.

void256

Running the org.lwjgl.test.WindowCreationTest on my MacPro4,1 with OS X 10.8.2 (12C60) using an ATI Radeon HD 5870 1024 MB graphics card crashes when pressing Shift-F. It crashes with 1.6 and 1.7.

With Java 1.6:

java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-12A269)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)


I get this after pressing Shift-F:

java -cp lwjgl_test.jar:lwjgl.jar:lwjgl_util.jar -Djava.library.path=../native/macosx/ org.lwjgl.test.WindowCreationTest
The following keys are available:
ESCAPE:		Exit test
ARROW Keys:	Move window when in non-fullscreen mode
L:		List selectable display modes
0-8:		Selection of display modes
F:		Toggle fullscreen
SHIFT-F:	Toggle fullscreen with Display.destroy()/create() cycle
Found 64 display modes
Problem retrieving mode with 640x480x24@-1
Problem retrieving mode with 800x600x24@-1
Problem retrieving mode with 1024x768x24@-1
Window handle is null
Resizeable
nCreate
setView
nMakeCurrent
Performing Display.destroy()/create() cycle
nReleaseCurrentContexta
clearDrawable
clearDrawable
nDestroy
Setting options
Setting options
Setting context
Non-default
2012-10-23 19:43:58.706 java[1639:2517] -[__NSCFType view]: unrecognized selector sent to instance 0x7f8c114280a0
2012-10-23 19:43:58.707 java[1639:2517] unlockFocus called too many times. Called on <NSNextStepFrame: 0x7f8c12518ca0>.
2012-10-23 19:43:58.707 java[1639:2517] -[__NSCFType view]: unrecognized selector sent to instance 0x7f8c114280a0
nCreate
setView
nMakeCurrent
2012-10-23 19:43:58.711 java[1639:2517] (
	0   CoreFoundation                      0x00007fff969640a6 __exceptionPreprocess + 198
	1   libobjc.A.dylib                     0x00007fff904f83f0 objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff969fa6ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
	3   CoreFoundation                      0x00007fff969525ce ___forwarding___ + 414
	4   CoreFoundation                      0x00007fff969523b8 _CF_forwarding_prep_0 + 232
	5   liblwjgl.jnilib                     0x0000000114e0dbd1 -[MacOSXOpenGLView lockFocus] + 81
	6   AppKit                              0x00007fff8dc844ec -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 963
	7   AppKit                              0x00007fff8dc84bb9 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2704
	8   AppKit                              0x00007fff8dc827d2 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 817
	9   AppKit                              0x00007fff8ddd208b -[NSNextStepFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 286
	10  AppKit                              0x00007fff8dc7de4d -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 4675
	11  AppKit                              0x00007fff8dc47d73 -[NSView displayIfNeeded] + 1830
	12  AppKit                              0x00007fff8ddd1f44 -[NSNextStepFrame displayIfNeeded] + 84
	13  AppKit                              0x00007fff8dc472ac _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints + 738
	14  AppKit                              0x00007fff8e212971 __83-[NSWindow _postWindowNeedsDisplayOrLayoutOrUpdateConstraintsUnlessPostingDisabled]_block_invoke_01208 + 46
	15  CoreFoundation                      0x00007fff9692a9b7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
	16  CoreFoundation                      0x00007fff9692a921 __CFRunLoopDoObservers + 369
	17  CoreFoundation                      0x00007fff96905d88 __CFRunLoopRun + 728
	18  CoreFoundation                      0x00007fff969056b2 CFRunLoopRunSpecific + 290
	19  HIToolbox                           0x00007fff941730a4 RunCurrentEventLoopInMode + 209
	20  HIToolbox                           0x00007fff94172e42 ReceiveNextEventCommon + 356
	21  HIToolbox                           0x00007fff94172cd3 BlockUntilNextEventMatchingListInMode + 62
	22  AppKit                              0x00007fff8dc44613 _DPSNextEvent + 685
	23  AppKit                              0x00007fff8dc43ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
	24  libawt.jnilib                       0x00000001135d4235 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
	25  AppKit                              0x00007fff8dc3b283 -[NSApplication run] + 517
	26  libawt.jnilib                       0x00000001135805f8 +[AWTStarter startAWT:] + 1495
	27  libawt.jnilib                       0x000000011357ff72 -[CPerformer perform] + 93
	28  Foundation                          0x00007fff91790677 __NSThreadPerformPerform + 225
	29  CoreFoundation                      0x00007fff968e3101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	30  CoreFoundation                      0x00007fff968e2a25 __CFRunLoopDoSources0 + 245
	31  CoreFoundation                      0x00007fff96905dc5 __CFRunLoopRun + 789
	32  CoreFoundation                      0x00007fff969056b2 CFRunLoopRunSpecific + 290
	33  java                                0x00000001093ca843 java + 18499
	34  java                                0x00000001093ca29a java + 17050
	35  java                                0x00000001093c7a98 java + 6808
	36  ???                                 0x0000000000000005 0x0 + 5
)


With Java 1.7:

java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)


Again pressing Shift-F - I get a VM crash:

java -cp lwjgl_test.jar:lwjgl.jar:lwjgl_util.jar -Djava.library.path=../native/macosx/ org.lwjgl.test.WindowCreationTest
The following keys are available:
ESCAPE:		Exit test
ARROW Keys:	Move window when in non-fullscreen mode
L:		List selectable display modes
0-8:		Selection of display modes
F:		Toggle fullscreen
SHIFT-F:	Toggle fullscreen with Display.destroy()/create() cycle
Found 1 display modes
Problem retrieving mode with 640x480x16@-1
Problem retrieving mode with 640x480x24@-1
Problem retrieving mode with 640x480x32@-1
Problem retrieving mode with 800x600x16@-1
Problem retrieving mode with 800x600x24@-1
Problem retrieving mode with 800x600x32@-1
Problem retrieving mode with 1024x768x16@-1
Problem retrieving mode with 1024x768x24@-1
Problem retrieving mode with 1024x768x32@-1
Window handle is null
Resizeable
nCreate
setView
nMakeCurrent
Performing Display.destroy()/create() cycle
nReleaseCurrentContexta
clearDrawable
clearDrawable
nDestroy
Setting options
Setting options
Setting context
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fff904ed39f, pid=1659, tid=140735265481088
#
# JRE version: 7.0_05-b05
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.1-b03 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libobjc.A.dylib+0x639f]  objc_msgSend_fixup+0x5f
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/void/Documents/Java/lwjgl/lwjgl-mac-osx-beta/jar/hs_err_pid1659.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abort trap: 6


Here is the "hs_err_pid1659.log" for the last crash: http://pastebin.com/LdVYsinR