Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   New Phex Users (https://www.gnutellaforums.com/new-phex-users/)
-   -   Phex crashing on MacOSX Mavericks (https://www.gnutellaforums.com/new-phex-users/102551-phex-crashing-macosx-mavericks.html)

sfque November 28th, 2013 10:56 AM

Phex crashing on MacOSX Mavericks
 
Hi,

I upgraded to Mavericks from Mountain Lion, and found my Phex crashing every time I start it (in Console). After downloading and installing the latest Phex (3.4.2.116), it started once, but did not get any connection. I thought it was my location. After getting home, I tried restarting the new Phex, but this time it acted just like the old one, crashes before it starts. Here is the Console log that was automatically saved by Console: Any help will be much appreciated.


Process: launchd [1776]
Path: /Applications/Phex.app/Contents/MacOS/JavaApplicationStub
Identifier: org.phex
Version: ???
Code Type: X86 (Native)
Parent Process: launchd [252]
Responsible: launchd [1776]
User ID: 502

Date/Time: 2013-11-28 23:53:16.982 +0600
OS Version: Mac OS X 10.9 (13A603)
Report Version: 11
Anonymous UUID: 41CF3872-3C40-3F47-A54E-2FF17C41F0C9

Sleep/Wake UUID: 78FFD458-EEB1-4C84-BBED-9EDC6ADB1A91

Crashed Thread: Unknown

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

Backtrace not available

Unknown thread crashed with X86 Thread State (32-bit):
eax: 0x00000000 ebx: 0x00000000 ecx: 0x00000000 edx: 0x00000000
edi: 0x00000000 esi: 0x00000000 ebp: 0x00000000 esp: 0x00000000
ss: 0x00000023 efl: 0x00010202 eip: 0x00000000 cs: 0x0000001b
ds: 0x00000023 es: 0x00000023 fs: 0x00000023 gs: 0x00000023
cr2: 0x00000000

Logical CPU: 2
Error Code: 0x00000014
Trap Number: 14


Binary images description not available


External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 11256
thread_create: 1
thread_set_state: 0

Lord of the Rings November 28th, 2013 10:50 PM

I have Mountain Lion running via Parallels. I installed Phex, opened fine but no connection. Used the connection installer & Phex connected to its first peers in less than 5 seconds. I am in process of installing Mavericks to see what happens. The Java I had installed is the Apple Java, not Oracle's Java. I did that because LimeWire refused to open with Oracle Java.
I'll let you know what happens after installation is complete. Mind you, I'm not sure my version of Parallels supports Mavericks, but Mavericks is supposed to be very very similar overall to Mountain Lion.

Lord of the Rings November 29th, 2013 12:28 AM

Same issue. Wouldn't even open for me until I installed a snapshot version and like you, it only opened & connected the one time. I've tried installing Oracle Java 7 & installing Apple Java 6 but so far no good. Safe Boot didn't help either.

sfque November 29th, 2013 01:28 AM

Thanks Lord of the Rings for the feedback. Unfortunately I don't have much time to try out different things. One small correction to my post, the first time I ran the newly downloaded Phex, it did connect to servers, but I didn't 'find' anything. I thought it was the firewall in my office. So I tried it at home later, but Phex did not even open then.

I hope someone can help. Advance thanks!

arne_bab November 29th, 2013 07:05 AM

Sadly I really cannot help MacOSX anymore ☹ (with all the side-meanings this sentence can have - I switched to GNU Linux 10 years ago, because Apple does not adhere to user-rights while it controls both hardware and software, and they have been breaking advanced usage of their OS more and more since then)

The exception says that it’s a null-pointer in the Apple-specific part of the program. Likely Apple changed some API which wrecked the Apple-part of the program.

You could try to run the jar-file directly instead of using the phex.app:

- download http://phex.sourceforge.net/snapshot..._3.4.2.163.zip
- unpack it
- go to <unpacked folder>/lib
- java -jar phex.jar

Does that work?

Lord of the Rings November 29th, 2013 11:35 AM

That works arne_bab. :)

To test it properly the important thing was to open it twice to be sure it was not a one-off open success as happened to both of us previously.
Connected to 6 peers fairly quickly.
So I guess we should refer people who are upgrading OSX or buying macs with Mavericks to use this method of using Phex instead. They should either drag & drop the phex.jar into the Dock or create an Alias & place on desktop, depending on their preferred method for opening Phex quickly.

I could create an applescript installer for this Phex which gives those options, but not sure I should? But then, if I did I would also include an updated connection file & updated settings. (My script for something similar for aliases does work in OSX 10.9 Mavericks.)

If sfque opens Phex via console as a standard approach then should direct it to that phex lib directory each time I guess. I'm not very console savvy to say the least. :o

arne_bab November 30th, 2013 08:52 AM

That sounds nice - could be a good way to get rid of all the App-framework-dependencies. How backwardscompatible is Apple Script? (means: how high is the maintenance cost?)

Lord of the Rings November 30th, 2013 04:43 PM

2 Attachment(s)
Quote:

Originally Posted by arne_bab (Post 373171)
That sounds nice - could be a good way to get rid of all the App-framework-dependencies. How backwardscompatible is Apple Script? (means: how high is the maintenance cost?)

At least OSX 10.3 compatible, however for these particular functions I'd think much earlier. Should work for all the earliest OSX's.

Functions like launch from installer depend on how it is scripted. The launch function I use after installation for the connection installers is limited to OSX 10.3. I use the application id number, example application file id "org.phex". Workaround is to use the actual program name and could be used dependent on OSX version. But the launch after installation function is not really important in my opinion, simply a way to finish off the installation process.

As for script installer size, notably small. Phex connection installer is 238 KB on disk (184,642 bytes) made up of: 49 KB Phex icon, 57 KB connection file, 45 KB 11 language translations, 57 KB applet, 4 KB CorePrefs, 8 KB scripts.
In comparison for the installer size of the 'other' Phex, it would be the size of the Phex folder 17,081,715 bytes (17.1 MB on disk) plus the above. To reduce size of the phex installer would require pre-zipping the phex folder and the installer unzipping via the OSX system which I've never done before & need to be done differently depending on OSX version. I don't think reducing the size by 1.7 MB (10%) is that important.
The actual process of Alias & Dock is purely scripted. I'd need to look at how to change the icon of the jar file however, if that should be beneficial. Otherwise the icon in the Dock uses the cup of coffee/tea icon with the word jar written below it.

Attachment 6455
A side-effect of the jar file not being an application in Mavericks is the icon in the dock is set to the right-side. No ability to shift it to the left of the divider unlike on Snow Leopard 10.6. . (I didn't like the lesser user options for Finder on either OSX 10.8/9. I hate that you cannot open folders separately. This would slow my work-flow down quite considerably.)

* Edit: Just realised that when opening Phex via the jar file in the Dock, another java icon shows in the Dock. This java icon is from the java executable from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin.
Probably not important that a separate executable java icon shows? I can phex iconize the jar file to at least show it belongs to Phex as the image shows.
Attachment 6457

arne_bab December 1st, 2013 10:11 AM

The Phex-iconized jar-file looks good. I think having a Java-process pop up is a usability problem, but not starting is a far worse usability problem, so this definitely is an improvement ☺

Lord of the Rings December 2nd, 2013 12:03 AM

I've put the installer together & all works fine except for a couple of things. However a major headache with the icons. Mountain Lion and Mavericks have restricted abilities to change default icons on non-app files unless done manually on the local computer and such changes only affect the local account/system, not transferable icons. Thus, the Dock & Desktop icons are the jar icons.

I removed the launch Phex option in the installer for the moment to keep it simple.

I still have not done the localised menus.

arne_bab December 3rd, 2013 12:26 PM

no probs - that’s still cool!

Lord of the Rings December 3rd, 2013 03:10 PM

I've returned the Launch function at end of installation.

With help of Yvan at Mac Scripters who put a script together for icon adding which works in Mavericks, I'm over half way there. It works with the user selecting source and destination files of the icon. I've reduced it down to user select source. With any luck I can get it to do it automatically. (I can achieve it if I know the location of the the source as this has worked in testing. If I can't script it to find its present position then I may install a temporary dummy file with the icon & remove it at the end. A sloppy approach I know.) If I can get it working all the way I'll try adding it to the installer script or alternatively calling the script from the main script (the call part works.)

arne_bab December 4th, 2013 12:20 PM

cool!

Lord of the Rings December 4th, 2013 10:05 PM

It's done. The icon installs correctly. Should I upload this installer any place? It's really only needed for Mavericks (or later). Example: the Phex site as an alternative OSX download?
I can host it independently myself of course.

Phex connected fine on Mavericks. A touch slow for grabbing 5 peers but eventually 7 after about 5 mins. A couple of Phexs from the connect file.

Arne it did cross my mind to iconize the java executable but that might conflict with anybody who uses Java for other things. Also, I presume Java updates would remove that icon. Not to mention there might be multiple java versions on someone's system which would give me fun trying to script to find the right one. :D

7-8 months since my last scripting so I was a touch rusty.

Again, a huge thanks to Yvan of MS for the icon scripting. :xirokrotima: :aweof:

GregorK December 6th, 2013 03:45 AM

Thanks for analyzing this and trying to find a way to make it work again.
I'm not sure what you did and I'm far from understanding how it works. But what I would really like to see is to use the "Apple recommended" way to build the installer. I would also make it easier to me to rebuild and distribute when there are changes.
https://developer.apple.com/library/...8447-TPXREF120

From what I read I would think the problem is the JavaApplicationStub distributed with Phex. I would be really happy if you could try to just replace the JavaApplicationStub with a updated one from Maverick.
This file should be located on your Maverick system here:
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/

Basically I would like to know if Phex starts with the new Maverick JavaApplicationStub on Maverick and maybe also on older Mac OS X versions. Otherwise it may be necessary to provide two OS X builds.

Would be great if you could find this our for me. Thanks.

Gregor

Lord of the Rings December 6th, 2013 04:50 AM

Even with phex_3.4.2.116, opening via accessing the jar file from the resource folder opens fine on Mavericks. And this is same process as the one I worked with in previous posts.

I did your test and works fine in Mavericks OSX 10.9 but not for Snow Leopard OSX 10.6 (nothing happens.)
I suspect this is because of the limitation Apple puts on Java versions for each OSX, and the system java for OSX 10.7 & above were designed specifically for the later OSX's.

I don't have OSX 10.7 so cannot test on it. And upgraded 10.8 to 10.9 a month ago to see if I liked it or not (I don't.) But I could always set up other guest OS's for testing if necessary.

Likewise all my connection, etc. installers are app bundles so all I need to do is replace with updated contents & rename the app's date.

Lord of the Rings December 6th, 2013 05:30 AM

It just occurred to me, you could use a Phex installer which alternates between installing one stub or another depending on OSX version of user's system. That would save from needing two separate installers. The older stub works in OSX 10.8 (for now at least) so I guess the Mavericks stub would only be needed for OSX 10.9 or later (for now at least.) Not sure any system updates on 10.8 or even 10.7 might affect the useability of the older stub.

However the Phex snapshots archive would probably need two separate versions if they are simply zipped folders.

GregorK December 6th, 2013 10:30 AM

So what should I do to make things work again? I still don't understand... ;-)

Lord of the Rings December 6th, 2013 04:03 PM

Include the new Maverick JavaApplicationStub in the installer. Have installer do a system check condition. If OSX 10.9 or later, install the Phex app package and replace the JavaAppStub with the new Maverick JavaApplicationStub within the app package on disk.

The problem is definitely the JavaApplicationStub file not being compatible with Mavericks.

Would probably also be good to include upgraded settings such as I have in the connection installers. ie: port blocks and host file size.
My connection installers insert the text into the settings file if the properties file exists. Otherwise a fresh properties file is installed.

My Linux connection installer script includes the upgraded settings which should be readable on Windows or Linux. The following link also includes the Mavericks JavaappStub https://www.mediafire.com/folder/xbqablpc3sttu/Phex
Just discovered one of my hosting sites has recently closed down (Hotfile.) In several hours later when I get time I will shift some items to Mediafire instead. (Some items were only hosted at Hotfile, such as the LW Clone connection installer.)

* Edit: After having woken up a little more. A better approach would be for installer check system, if OSX 10.7 or later, install phex app package, then replace the JavaApplicationStub with a copy-replace of the one on that person's system. Does that sound messy to you?
Alternatively just install the application package without the stub file and duplicate the specific system's stub file & copy to the app package MacOS folder. In that way there's no replacing & no system checks.
Destination of the JavaApplicationStub would be the user's chosen location for the phex app package. Phex/Phex.app/Contents/MacOS or Phex.app/Contents/MacOS

The snapshots folder is a different kettle of fish. You might need to include two separate phex's for OSX (one with Mavericks stub file.)

Lord of the Rings December 10th, 2013 02:44 AM

Quote:

Originally Posted by Lord of the Rings (Post 373215)
... Would probably also be good to include upgraded settings such as I have in the connection installers. ie: port blocks and host file size. ...
Alternatively just install the application package without the stub file and duplicate the specific system's stub file & copy to the app package MacOS folder. In that way there's no replacing & no system checks.
Destination of the JavaApplicationStub would be the user's chosen location for the phex app package. Phex/Phex.app/Contents/MacOS or Phex.app/Contents/MacOS

The snapshots folder is a different kettle of fish. You might need to include two separate phex's for OSX (one with Mavericks stub file.)

An applescript app bundle installer for Phex could do this quite easily. At least for installing into the applications folder. If user choice is given for location, then that would test my skills but could be done, you probably know how. ie: save the chosen directory for using in the stub duplication process.

What I don't know however is if this stub file is a part of the OSX system or installed after Java is installed. The later OSX versions do not have java installed by default (starting from OSX 10.7 or 8, I can't remember which.) In any case, if the stub file is not found, an error message saying please install Java first before installing Phex could be added to the installer.

If my suggestions are silly, then I apologise, since I'm not educated in developing complex apps. You are the ones in the know. :)


Off-topic: from what I've read, the security issues with Java are with the Java browser plug-in, not apps that are programmed in Java per se. Two separate things.

Lord of the Rings April 24th, 2014 09:33 PM

I just realised Phex is using Apple's Java 1.6 on Mavericks after looking at the environment tab of the About Phex window. I presume that's because Phex is using the Java 6 stub? I have Oracle's Java 7 but Phex seems to ignore it. I am wondering if those who install Java 7 instead of Java 6 would suffer same issue as this topic.
I cannot uninstall Java 6 once it was installed. AFAIK the only way for me to test this would be to start from scratch & set up another Mavericks. Unless there is a Java 7 stub?
It seems confusing: osx - How can I change Mac OS's default Java VM returned from /usr/libexec/java_home - Stack Overflow, and I only see Java 1.6, no java 1.7 in JavaVirtualMachines ... osx - Need help understanding Oracle's Java on Mac - Stack Overflow

Lord of the Rings September 22nd, 2015 01:44 AM

Oops accidentally posted to the wrong thread. But same issue for OSX Yosemite 10.10. http://www.gnutellaforums.com/help-s...tml#post376812


All times are GMT -7. The time now is 01:43 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.