Standalone RPi app stopping on XML
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Standalone RPi app stopping on XML
I have an app that loads XML from a webservice and then parses the data for use in the app. Runs fine in development mode on the RPI but does not work when standalone app is created for the RPI.
When running the standalone app, it does not error out and fail it just stops when it hits the revCreateXMLtree() function. I have tried creating multiple versions of the standalone app by selecting the "Search for required inclusions" and the "Select inclusions" and manually selecting the XML options on general settings. Neither yields a working standalone app for ARM. Any ideas why?
When running the standalone app, it does not error out and fail it just stops when it hits the revCreateXMLtree() function. I have tried creating multiple versions of the standalone app by selecting the "Search for required inclusions" and the "Select inclusions" and manually selecting the XML options on general settings. Neither yields a working standalone app for ARM. Any ideas why?
Re: Standalone RPi app stopping on XML
Attached is a simple example function that takes XML, displays it, then loads and displays the tree value. This code works in development mode for me but not when standalone is created - it never gets to the answer "Tree Value is" statement. However, it does not fail, it just ignores the function call. I'm guessing that maybe the XML library is not part of the RPi build or maybe just a skeleton function is linked in. But the fact that it does not fail or ever get to the second answer statement is perplexing.
Appreciate any help here, even a test of the simple function code in development and standalone app modes to see if my problem can be reproduced.
Appreciate any help here, even a test of the simple function code in development and standalone app modes to see if my problem can be reproduced.
Code: Select all
function getXML
put "<?xml version=1.0 encoding=UTF-8?><row><heading>This is a test</heading><detail>of the emergency broadcast system</detail></row>" into testXML
answer "XML Returned is " && testXML
put revCreateXMLTree(testXML, false, true, false) into tTree
answer "Tree Value is " && tTree
end getXML
Re: Standalone RPi app stopping on XML
function changed name to revXMLCreateTree.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Standalone RPi app stopping on XML
Both revCreateXMLTree and revXMLCreateTree work in the example provided when running in development mode in the IDE, but neither work when a standalone RPi app is created. Any other ideas?
Re: Standalone RPi app stopping on XML
Could the xmlExternal be missing from your build?
Re: Standalone RPi app stopping on XML
I am building from the Livecode IDE on the RPi so, If by XMLExternal you are referring to selecting XML and XMLRPC in the Script Libraries under the Select Inclusion options on the Standalone App Settings menu, then yes I have tried to do that and the issue remains. If having XMLExternal in my build refers to something else, please let me know.
I have taken the same steps to create a Windows app from my PC and the standalone as written works. Maybe an issue with the RPi build process(?). Is there a make or log file from the build that I can check to see what is happening/included?
Any other ideas or has anyone been able to duplicate?
I have taken the same steps to create a Windows app from my PC and the standalone as written works. Maybe an issue with the RPi build process(?). Is there a make or log file from the build that I can check to see what is happening/included?
Any other ideas or has anyone been able to duplicate?
Re: Standalone RPi app stopping on XML
How does the resulting file structure after building look like? (What is in the folder after doing the build)
All the best,
Malte
All the best,
Malte
Re: Standalone RPi app stopping on XML
App file structure on the RPi is as follows:
First Level ---> App Folder
Contents:Linux armv6-hf Folder
Second Level ---> Linux armv6-hf Folder
Contents: App Executable File and Externals Folder
Third Level ---> Externals Folder
Contents: revxml.so file
Thanks,
Joe
First Level ---> App Folder
Contents:Linux armv6-hf Folder
Second Level ---> Linux armv6-hf Folder
Contents: App Executable File and Externals Folder
Third Level ---> Externals Folder
Contents: revxml.so file
Thanks,
Joe
Re: Standalone RPi app stopping on XML
Too bad that I do not have a Pi to test this...
In your mainStack put a button that has this script:
In your mainStack put a button that has this script:
Code: Select all
on mouseUp
if there is a stack "revExternalLibrary" then
answer the externalCommands of stack "revExternalLibrary" -- should list the XML commands
else
answer "no externals"
end if
end mouseUp
Re: Standalone RPi app stopping on XML
Ran example code on RPi in both IDE and standalone app. Same results in both - "no externals".
I do appreciate your willingness to help.
I do appreciate your willingness to help.
Re: Standalone RPi app stopping on XML
You would only see this library stack in the standalone (at least on Mac / Win / Linux) I believe on mobile it is the same... in the IDE the externalCommands belong to stack "home"
So my assumption is that the standalone builder for the pi does have a quirk. Maybe Fraser can jump in to help here?
Best,
Malte
Code: Select all
answer the externalCommands of stack "home"
Best,
Malte
Re: Standalone RPi app stopping on XML
I validated, to advance my understanding, that the command list code does in fact list the commands with a Windows standalone app. My initial thought was that there was a build issue given the fact that the app worked in RPi IDE and not as a standalone, but given limited LC experience it is very important to reach out for help from knowledgeable folks. Thank you.
I have submitted a LC bug report with a simple recipe around this issue. The RPi is a great learning platform that has serious commercial potential and I'm very interested to see if LC can be used as a mainstream technology on it. I know there are folks interested in advancing LC as a baseline package in the Raspian distribution, so hopefully these kinds of issues can be resolved swiftly. Particularly with major functions like XML. And some info from Fraser would be great.
I develop on most of the single board credit-card sized computers and the RPi is really turning into the de facto standard. The latest release of the RPi B 2 is, I believe, the clincher and makes the platform very usable performance-wise for technologies like LC. Hopefully the folks at LC will see this as an opportunity and continue efforts to address issues quickly to advance LC's exposure to new users.
I have submitted a LC bug report with a simple recipe around this issue. The RPi is a great learning platform that has serious commercial potential and I'm very interested to see if LC can be used as a mainstream technology on it. I know there are folks interested in advancing LC as a baseline package in the Raspian distribution, so hopefully these kinds of issues can be resolved swiftly. Particularly with major functions like XML. And some info from Fraser would be great.
I develop on most of the single board credit-card sized computers and the RPi is really turning into the de facto standard. The latest release of the RPi B 2 is, I believe, the clincher and makes the platform very usable performance-wise for technologies like LC. Hopefully the folks at LC will see this as an opportunity and continue efforts to address issues quickly to advance LC's exposure to new users.
Re: Standalone RPi app stopping on XML
I also find the rPI to be a very interesting device. Time constraints still keep me from playing with it though
Would you mind to post the bugnumber in here? then I could maybe jump in to give some additional information.
To explain a little on the inner workings for XML in LC:
The XML commands and functions are not part of the core engine. They are implemented as a so called "external" (in case of the PI this is the revXML.so file you are seeing). Normally the standalone builder does some magic to make sure that this external is loaded on startup of your app. This does not appear to happen in case of the PI build. I guess there could be a workaround to load it by script, however if it always fails I considder this a bug in the PI build.
All the best,
Malte
Would you mind to post the bugnumber in here? then I could maybe jump in to give some additional information.
To explain a little on the inner workings for XML in LC:
The XML commands and functions are not part of the core engine. They are implemented as a so called "external" (in case of the PI this is the revXML.so file you are seeing). Normally the standalone builder does some magic to make sure that this external is loaded on startup of your app. This does not appear to happen in case of the PI build. I guess there could be a workaround to load it by script, however if it always fails I considder this a bug in the PI build.
All the best,
Malte
Re: Standalone RPi app stopping on XML
Thank you for the background Malte. The magic you mentioned is often what makes technologies like LC exciting and approachable for the masses. Once things move away from the magic and into scripting and other types of technical workarounds folks that that are learning or evaluating for usage can loose interest quickly. So hopefully, it is considered a bug and addressed.
Bug ID #15277 or http://quality.runrev.com/show_bug.cgi?id=15277
Bug ID #15277 or http://quality.runrev.com/show_bug.cgi?id=15277