Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: JNI SDK10.4/10.5 problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JNI SDK10.4/10.5 problem



Really, nobody?
Well, maybe it's an AppleScript bug and I just have to file a bug report and hope...


-hendrik

On Mar 24, 2009, at 21:33 , Hendrik Schreiber wrote:

Hi,

I have a little bit of an odd JNI problem that's been giving me quite a few headaches. Hopefully one of you guys can make sense of it.

I have a JNI library that calls some AppleScripts via NSAppleScript. Most of the time it works pretty well, but I managed to create a testcase that crashes it reliably. The crash occurs somewhere in [NSAppleScript executeAndReturnError] (for the curious, some of the crashlog is below).

When I compile the thing as 32/64 universal with Base SDK 10.5 and Deployment Target 10.5 and run it with Java 1.6 or Java 1.5-64bit on 10.5, it does not crash, but seems fairly slow.
The same binary (or more precisely the 32bit part) crashes with Java 1.5-32bit on 10.5 reliably.


Also, when I run the native code as a 32bit standalone (i.e. not as JNI lib) it never crashes with the Base SDK set to 10.5 and the Deployment Target set to 10.4.
But it crashes just like the JNI lib (i.e. the crash logs look very similar), when I set the Base SDK to 10.4.


Now, my understanding is, that I must set the Base SDK to 10.5 and the Deployment Target to 10.4, when I want the thing to run on both 10.5 and 10.4.

So I know, that I should expect the standalone with Base SDK 10.4 to crash on 10.5.
But why does my JNI lib crash when run under Java 1.5-32bit?


Is there anything in 32 bit Java 1.5 that forces usage of SDK 10.4 libs as that seems to make my standalone version crash?

Any pointer is much appreciated!

Thanks,

-hendrik

Process: java [26096]
Path: /System/Library/Frameworks/JavaVM.framework/ Versions/1.5/Home/bin/java
Identifier: java
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: idea [21789]


Date/Time:       2009-03-24 17:00:17.824 -0400
OS Version:      Mac OS X 10.5.6 (9G55)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000007712dfc
Crashed Thread:  0

Thread 0 Crashed:
0 com.apple.applescript 0x0740c01a TUASScript::IsValue() const + 20
1 com.apple.applescript 0x0740cef5 ASCoerceToDesc(unsigned long, unsigned long, long, AEDesc*) + 75
2 ...ple.CoreServices.CarbonCore 0x922f9d3d CallComponentFunctionCommon + 537
3 ...ple.CoreServices.CarbonCore 0x9233f2b4 CallComponentFunction + 122
4 com.apple.applescript 0x07408a9e AppleScriptComponent + 1744
5 com.apple.applescript 0x074248e3 AGenericManager::HandleOSACall(ComponentParameters*) + 63
6 ...ple.CoreServices.CarbonCore 0x922f9a05 CallComponentDispatch + 29
7 com.apple.openscripting 0x90d5a7c5 OSACoerceToDesc + 61
8 com.apple.Foundation 0x91ff15be - [NSAppleScript(NSPrivate) _executeWithMode:andReturnError:] + 158
9 com.apple.Foundation 0x91ff1461 -[NSAppleScript executeAndReturnError:] + 49
10 libjaplscript.jnilib 0x072e2bd7 -[AppleScriptExecutor execute:] + 118
11 com.apple.Foundation 0x91f0939c __NSThreadPerformPerform + 476
12 com.apple.CoreFoundation 0x969665f5 CFRunLoopRunSpecific + 3141
13 com.apple.CoreFoundation 0x96966cd8 CFRunLoopRunInMode + 88
14 java 0x00005169 0x1000 + 16745
15 java 0x000021fa 0x1000 + 4602


[...]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >JNI SDK10.4/10.5 problem (From: Hendrik Schreiber <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.