Finding errors in a standalone

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Finding errors in a standalone

Rick Harrison via use-livecode

After all these years, I'm finally trying to build a non-trivial
standalone (pretty much everything I've done up till now has been either
used from the IDE or from 'stackrunner' or similar).

The app runs fine in the IDE, but when I run as a standalone, it gives
me a dialog box

  - title is "Execution Error"

  - content is completely empty

  - 'close'  button

What am I doing wrong ?  How do I get actual useful info when something
goes wrong ?


I suspect it's failing when I call tsNetInit - but it does that whether
I "search for inclusions" or specify them myself (and include Internet,
SSL, etc). Is there any way to check what has been included ?

Or any other clues / suggestions ?

Thanks

Alex.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
On Thu, Jul 13, 2017 at 5:19 PM, Alex Tweedly via use-livecode <
[hidden email]> wrote:

>
>
> I suspect it's failing when I call tsNetInit - but it does that whether I
> "search for inclusions" or specify them myself (and include Internet, SSL,
> etc). Is there any way to check what has been included ?
>

I have a stack with a huge scrolling field, and a "ck stuff" handler.

on ck stuff

put stuff

put stuff after field msgs of cd 1 of stack watchStack

end ck



So at a troublesome point, you could

answer "checking it"

ck someVariable & cr & cr the executionContexts

answer "checked it"

in the IDE, I often put a red dot or a breakpoint after the first put of ck

(and, yes, this is how I used to debug fortran, and even my painful
ventures into C and C++)
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode


On 14/07/2017 01:38, Dr. Hawkins wrote:

>
>
> On Thu, Jul 13, 2017 at 5:19 PM, Alex Tweedly via use-livecode
> <[hidden email] <mailto:[hidden email]>>
> wrote:
>
>
>
>     I suspect it's failing when I call tsNetInit - but it does that
>     whether I "search for inclusions" or specify them myself (and
>     include Internet, SSL, etc). Is there any way to check what has
>     been included ?
>
>
> I have a stack with a huge scrolling field, and a "ck stuff" handler.
>
Yeah - it's the equivalent of that (but writing to a log file) that
makes me think it's tsNetInit that's the problem. But I don't know what
to do next - Internet is included (manually, and hopefully also by
search for inclusions), I'm using Business edition, so why would
tsNetInit fail ?

Thanks
Alex

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
On 7/13/17 7:59 PM, Alex Tweedly via use-livecode wrote:

>
>
> On 14/07/2017 01:38, Dr. Hawkins wrote:
>>
>>
>> On Thu, Jul 13, 2017 at 5:19 PM, Alex Tweedly via use-livecode
>> <[hidden email] <mailto:[hidden email]>>
>> wrote:
>>
>>
>>
>>     I suspect it's failing when I call tsNetInit - but it does that
>>     whether I "search for inclusions" or specify them myself (and
>>     include Internet, SSL, etc). Is there any way to check what has
>>     been included ?
>>
>>
>> I have a stack with a huge scrolling field, and a "ck stuff" handler.
>>
> Yeah - it's the equivalent of that (but writing to a log file) that
> makes me think it's tsNetInit that's the problem. But I don't know what
> to do next - Internet is included (manually, and hopefully also by
> search for inclusions), I'm using Business edition, so why would
> tsNetInit fail ?

Being ignorant of almost everything about internet connection details,
I've never called tsNetInit. I just include the internet library in my
standalone and it works. I'm gussing it initializes itself when the
library loads. What happens if you remove that command?

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
In reply to this post by Rick Harrison via use-livecode
On 07/13/2017 05:19 PM, Alex Tweedly via use-livecode wrote:

> What am I doing wrong ?  How do I get actual useful info when something
> goes wrong ?

Well, you already have a license for PowerDebug, which will enable to to
debug running standalone apps in the same subnet (include the library
when you build, launch the IDE, then launch the app: breakpoints,
errors, etc will be caught). But it's dependent on having a working
network connection, so if tsNet is getting in the way of that I don't
think it'll help.

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
In reply to this post by Rick Harrison via use-livecode
On 14/07/2017 1:40 PM, J. Landman Gay via use-livecode wrote:

> On 7/13/17 7:59 PM, Alex Tweedly via use-livecode wrote:
>>
>> Yeah - it's the equivalent of that (but writing to a log file) that
>> makes me think it's tsNetInit that's the problem. But I don't know
>> what to do next - Internet is included (manually, and hopefully also
>> by search for inclusions), I'm using Business edition, so why would
>> tsNetInit fail ?
>
> Being ignorant of almost everything about internet connection details,
> I've never called tsNetInit. I just include the internet library in my
> standalone and it works. I'm gussing it initializes itself when the
> library loads. What happens if you remove that command?
>
Is there any chance that the tsNet library was unloaded (by calling:
dispatch "revUnloadLibrary" to stack "tsNetLibURL") prior to creating
the standalone?

If it has been unloaded, then you would need to specifically include the
tsNet inclusion to be able to use tsNet commands directly.

If the tsNet is actually loaded, then including the Internet library
will automatically include tsNet as well (as tsNetInit will
automatically be called on startup of revLibURL).

Cheers,

Charles

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
In reply to this post by Rick Harrison via use-livecode


On 14/07/2017 04:40, J. Landman Gay via use-livecode wrote:
>
> Being ignorant of almost everything about internet connection details,
> I've never called tsNetInit. I just include the internet library in my
> standalone and it works. I'm gussing it initializes itself when the
> library loads. What happens if you remove that command?
>
I don't have a good reason for calling tsNetInit (I wanted to use tsNet
features, looked in the dictionary, saw that it had an "initialization"
handler - so I used it :-)

Removing that call means I get further - but I still get this
"anonymous" 'Execution error' dialog box with no info in it  - I think
very time I call "tsNetPost".

I guess the *real* question is not about tsNet - it is what info
*should* I get when some failure happens.
What have I done wrong to make this error dialog be empty of any useful
content ?
And then maybe what diagnostic info can I get about included libraries,
or these failures ?


-- Alex.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
In reply to this post by Rick Harrison via use-livecode
On 14/07/2017 04:48, Mark Wieder via use-livecode wrote:
>
> Well, you already have a license for PowerDebug, which will enable to
> to debug running standalone apps in the same subnet (include the
> library when you build, launch the IDE, then launch the app:
> breakpoints, errors, etc will be caught). But it's dependent on having
> a working network connection, so if tsNet is getting in the way of
> that I don't think it'll help.
>
Mark - I had forgotten about Powerdebug, and that it could debug
standalones; I guess I've been doing server-side things for too long :-)

You said "...(include the library when you build, ..."
How do I do that ?
Is there a document hiding somewhere on how to use Powerdebug ?

Clicking on the "?" icon just gives me an error message
   "There was an error executing a script in stack About Powerdebug. No
more information is available because the stack is password protected."

Thanks
Alex.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
On 07/14/2017 07:34 AM, Alex Tweedly via use-livecode wrote:

> Clicking on the "?" icon just gives me an error message
>    "There was an error executing a script in stack About Powerdebug. No
> more information is available because the stack is password protected."

That's bizarre - it's definitely not protected. And yes, there's a doc
and library in the zip file. I'll email you off list.

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
In reply to this post by Rick Harrison via use-livecode
On 7/14/17 9:31 AM, Alex Tweedly via use-livecode wrote:
> I guess the *real* question is not about tsNet - it is what info
> *should* I get when some failure happens.

The result contains any LC errors, and apparently there were none. The
"it" variable contains whatever is returned by the server. The script
should check both.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Finding errors in a standalone

Rick Harrison via use-livecode
I guess I asked that question rather badly.

I didn't mean "what info should I get from tsNetInit ?"

I meant "what info should I get when a standalone app crashes" ?

All I'm getting now is this empty dialog box that says "execution error"
and has no further info.


Well, it turns out I finally tracked it down : it was a missing
inclusion for mergJSON.

The app has a splash stack, then the real stack, and lots of behaviour
stacks - so it wasn't doing very well on "search for inclusions", so I
was doing manual inclusions. The problem always occurred when I tried to
do some network activity (hence me being suspicious that I was was
misusing tsNet). In fact, the app always does asynch POSTs, and includes
some info which comes from an array, as JSON data, via calls to
arrayToJSON().

I thought I was OK because I had ticked both

JSON Library

and

mergJSON-x86_64

not realizing there is also an entry for "mergJSON".

Fixed that - and all seems to be happy for now.
Thanks again to everyone who helped.
Alex.

On 14/07/2017 21:21, J. Landman Gay via use-livecode wrote:
> On 7/14/17 9:31 AM, Alex Tweedly via use-livecode wrote:
>> I guess the *real* question is not about tsNet - it is what info
>> *should* I get when some failure happens.
>
> The result contains any LC errors, and apparently there were none. The
> "it" variable contains whatever is returned by the server. The script
> should check both.
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode