Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac port has segmentation fault when launching the demo apps #15

Open
sihorton opened this issue Oct 7, 2013 · 8 comments
Open

Mac port has segmentation fault when launching the demo apps #15

sihorton opened this issue Oct 7, 2013 · 8 comments

Comments

@sihorton
Copy link
Owner

sihorton commented Oct 7, 2013

I have checked out the deskshell project directly from git on a mac. Then if I run the installer it complains that Deskshell.app already exists, I then delete it and it then succeeds. Clicking on .desk files does not launch them and it gives no error. However if I type the following then the default demo application opens:-

./Deskshell.app/Contents/MacOS/node ./Deskshell.app/Contents/MacOS/deskshell.js

If I then click on Demos and then SoundDemo (for example) and click the Launch button then the demo does not run and I get the following on the console...

wrapper: line 3: 8627 Segmentation fault "$ME/php" "$ME/desk_parse"

To reproduce the error the following typed into the command line gives the same error:-

./Deskshell.app/Contents/MacOS/wrapper ./Deskshell.app/Contents/demo/content/demos/soundDemo/soundDemo.desk

wrapper: line 3: 8627 Segmentation fault "$ME/php" "$ME/desk_parse"

My guess is this is some form of pathing problem -- i.e. it is not correctly finding the path to the files, appjs had many of these problems.

The goal is to be able to send the "launchApp" command and give a relative or absolute path to another .desk file and then execute it.

@IngwiePhoenix
Copy link
Contributor

Hello!

I just looked into it, and detected what issues are there.

  1. The PHP binary you seem to have is somehow causing a segfault. That is weird. I am going to test the package on my other mac, which does not have any sort of development package on it to see how it goes there.
  2. The soundDemo.desk doe snot specify any backend, which means that the PHP script (desk_parse), which decides on the backend and stuff to use, will complain about "No backend specified". I will re-write desk_parse so it can handle .desk files that had no backend specified.
  3. For some reaosn, the soundDemo's htdocs dont seen to contain what is needed. Looks like I have to do some work there :)

Thank you for the notice by the way. As soon as I have my fixes up, I will let you know.
Am 07.10.2013 um 18:32 schrieb sihorton [email protected]:

I have checked out the deskshell project directly from git on a mac. Then if I run the installer it complains that Deskshell.app already exists, I then delete it and it then succeeds. Clicking on .desk files does not launch them and it gives no error. However if I type the following then the default demo application opens:-

./Deskshell.app/Contents/MacOS/node ./Deskshell.app/Contents/MacOS/deskshell.js

If I then click on Demos and then SoundDemo (for example) and click the Launch button then the demo does not run and I get the following on the console...

wrapper: line 3: 8627 Segmentation fault "$ME/php" "$ME/desk_parse"

To reproduce the error the following typed into the command line gives the same error:-

./Deskshell.app/Contents/MacOS/wrapper ./Deskshell.app/Contents/demo/content/demos/soundDemo/soundDemo.desk

wrapper: line 3: 8627 Segmentation fault "$ME/php" "$ME/desk_parse"

My guess is this is some form of pathing problem -- i.e. it is not correctly finding the path to the files, appjs had many of these problems.

The goal is to be able to send the "launchApp" command and give a relative or absolute path to another .desk file and then execute it.


Reply to this email directly or view it on GitHub.

@sihorton
Copy link
Owner Author

sihorton commented Oct 8, 2013

Hi Mate,

  1. Could be that the mac I am using has not had any updates applied for a couple of years, so it can have old versions of packages installed (kind of a good test case since we would ideally like deskshell to be portable).
  2. I made a change in the deskshell.js and the deskshell api so that it is possible to run without a backend. This can be used to run "html5" only apps. If there is no backend specified (or if it is "none") then no node.js or php script needs to be run, just start chromium and show the contents. For testing now though you can add the backend and see if that fixes the problem
  3. Sound demo works on windows, I removed the mp3 that plays since it took up so much disk space so it loads it from the network instead -- so needs to be online in order to work. It also uses flash so I think it is a good demo as it tests that chromium is setup with all of the required support.

Let me know when you would like me to test again and I can give it another test.

@imperator-maximus
Copy link

I tried to start a demo as well without any luck on Mavericks:

  1. the svg-clock:
    ...appjs-deskshell/bin/mac/Deskshell.app/Contents/MacOS/wrapper app.desk
    chromium exec error:Error: Command failed: [1109/223015:FATAL:chrome_main_delegate.cc(634)] Check failed: PathService::OverrideAndCreateIfNeeded( chrome::DIR_USER_DATA, user_data_dir, chrome::ProcessNeedsProfileDir(process_type)).

error starting app { error: [SyntaxError: Unexpected token u],[..]
2. html_website:
-> I am getting: "No vaild backend specified!"

my installation:
git clone https://github.com/sihorton/appjs-deskshell.git
cd installer/mac
sudo ./bootstrap.sh
then download with curl was not working first. I manually downloaded http://deskshell.org/?download=mac-dev via wget.
Then installation aborts because bin/Deskshell.app already exists I moved it and after successfully installation I am getting the error above.

The other method I tried.

  1. download http://deskshell.org/downloads/Deskshell.dmg
  2. copied the Deskshell icon via drag& drop to a folder
  3. started it and it runs
  4. none of the demo started by clicking on them
  5. tried a demo again (Deskshell.app/Contents/MacOS/wrapper) from command line and I am getting:

Warning: file_get_contents(/Users/imperator/Desktop/Deskshell.app/Contents/../../../../desk.decl-defs): failed to open stream: No such file or directory in /Users/imperator/Desktop/Deskshell.app/Contents/MacOS/desk_parse on line 33

Warning: Invalid argument supplied for foreach() in /Users/imperator/Desktop/Deskshell.app/Contents/MacOS/desk_parse on line 37

Notice: Undefined property: stdClass::$debug in /Users/imperator/Desktop/Deskshell.app/Contents/MacOS/desk_parse on line 44

@sihorton
Copy link
Owner Author

sihorton commented Nov 9, 2013

Ingwie is the main developer for the mac port. However I think 1 & 2 are being caused because the mac port does not have the latest deskshell code, this latest code allows you to run an application without any "backend" i.e. nodejs running. However we can add in a "dummy" backend to see if that fixes the problem:

I guess that the "Open Folder" or "View Source" button does not work so you will have to manually locate the folder:
sys-apps/demo-docs/content/demos/html_website. There is an app.desk file, change "backend":"none" to be "backend":"node". You should also add "main":"app.js". The final step is to also create an app.js file with the following content:

var running = deskShell.startApp({})

Hopefully this will then allow you to start up the demo applications. The app.desk file is a json format file.

@sihorton
Copy link
Owner Author

sihorton commented Nov 9, 2013

Here is the contents of the app.desk file with the changes mentioned above:

{
    "name": "html_website",
    "version": "0.3",
    "author": "sihorton",
    "description": "Simple app showing an html website inside deskshell.",
    "licence": "MIT",
    "htdocs": "htdocs",
    "frontend": "chromium-portable",
    "backend": "node",
    "width": "300",
    "height": "300",
    "defaultLocation": "index.htm",
    "main":"app.js"
}

@imperator-maximus
Copy link

ah thanks - with this changes the html-website demo works now!

@sihorton
Copy link
Owner Author

sihorton commented Nov 9, 2013

Great, sorry it did not work out of the box for you. The svg_clock and soundDemo should be able to be fixed in exactly the same way. Hopefully we will have a new mac release soon that fixes these issues.

@IngwiePhoenix
Copy link
Contributor

Yes, the bundle has slight issues. It needs urgent updates and will receive them asap. Sorry for my slowness! ^^
Am 09.11.2013 um 23:15 schrieb sihorton [email protected]:

Great, sorry it did not work out of the box for you. The svg_clock and soundDemo should be able to be fixed in exactly the same way. Hopefully we will have a new mac release soon that fixes these issues.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants