Forum Announcement
23/02/2018 - The Online Chat isn't working via the normal link.
You can connect via IRC, or using another web client - https://kiwiirc.com/client/chat.qlforum.co.uk/#qlforum

TURBO'd app that hangs the QL on termination...

Anything QL Software or Programming Related.
stevepoole
Trump Card
Posts: 153
Joined: Mon Nov 24, 2014 2:03 pm

Re: TURBO'd app that hangs the QL on termination...

Postby stevepoole » Fri Nov 03, 2017 9:12 pm

Hi Martyn,

Do you close your windows in the reverse order to which you opened them in your FOR loop ?

Have you tried EXECUTE_A name_task ? ( ALT-SPACE to abort ?)

Steve.


martyn_hill
Gold Card
Posts: 339
Joined: Sat Oct 25, 2014 9:53 am

Re: TURBO'd app that hangs the QL on termination...

Postby martyn_hill » Sat Nov 04, 2017 9:14 pm

Hi Rich

Return stack and/or Maths stack - yeah - I wouldn't be surprised if one of my one customised extensions is causing trouble...

What's the best way to track-down stack issues? Will SYSMON cut it, or do I need a debugger/monitor?

Steve - I'll try closing down the CON channels and any other resources that allocate space in reverse order and see if that helps.

Thanks for the ideas!


User avatar
pjw
Gold Card
Posts: 296
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway

Re: TURBO'd app that hangs the QL on termination...

Postby pjw » Sat Nov 04, 2017 10:50 pm

martyn_hill wrote:What's the best way to track-down stack issues? Will SYSMON cut it, or do I need a debugger/monitor?


As a start you might try running your toolkit in a loop to see if it eats memory. Particularly any functions you might have written. Eg

m = free_mem
for i = 0 to 9999
x$ = MY_FUNCTION
if m <> free_mem: print "bang!": exit i
endfor i
print m - free_mem

The above is very general and basic, of course, but you get the idea.

Other tests may also reveal stack errors, such as:

print MY_FUNCTION & "x"
print "x" & MY_FUNCTION

If it passes those tests, it may be time to reach for a debugger!


Per
Assumptions should only be a first resort when the cost of being wrong is less than the trouble of finding out the facts! - pjw, 2016
User avatar
dilwyn
Mr QL
Posts: 1246
Joined: Wed Dec 01, 2010 10:39 pm
Location: Wales
Contact:

Re: TURBO'd app that hangs the QL on termination...

Postby dilwyn » Sun Nov 05, 2017 11:16 am

I'm following this thread with interest - I'll be fascinated when this is tracked down.

I don't have any further ideas to suggest other than what people like Per have already suggested. Always amazed at how ready people on here are to try to help others, I'm sure that's what this forum is all about.

In the past when I've got bogged down with issues such as this I've ended up having to split the program into test components and build test programs to replicate suspect parts of a program. This sometimes throws up completely unexpected results in that the problem turns out to be something completely unrelated to where I thought the problem might lie. A classic was two identically named functions in different toolkits which worked sufficiently closely that the problem wasn't immediately apparent, but subtle differences in the way they worked caused havoc and it took me ages to resolve that one.

Per's comments about functions and stack issues are a great example of such a program and issues such as "stack crawl" whereby the odd byte or word errors make all sorts of chaos.

Good luck with this Martyn and do please let us know what the problem was - it does sound as though it needs documenting!


Dilwyn
All things QL: see www.dilwyn.me.uk
User avatar
NormanDunbar
Gold Card
Posts: 365
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: TURBO'd app that hangs the QL on termination...

Postby NormanDunbar » Sun Nov 05, 2017 5:28 pm

Evening All,

I discovered some undocumented information re the Maths Stack some years ago when writing, no - debugging, DJToolkit. I documented it in my assembly language articles in QL Today . You can download my book from http://qdosmsq.dunbar-it.co.uk/download ... sembly.pdf and checkout pages 118 to 120 - sections 7.9 through 7.9 which might be of some help. Maybe.

It certainly helped when I was debugging to know what the value in A1 meant on entry to a function or procedure.


Cheers,
Norm.


Why do they put lightning conductors on churches?
How come Tarzan never grew a beard?
martyn_hill
Gold Card
Posts: 339
Joined: Sat Oct 25, 2014 9:53 am

Re: TURBO'd app that hangs the QL on termination...

Postby martyn_hill » Sun Nov 05, 2017 7:30 pm

Thanks for the ideas, everyone!

I'll dive back-in to this issue after devoting some renewed effort on another of my projects (the QLUB Adapter.)

M.


martyn_hill
Gold Card
Posts: 339
Joined: Sat Oct 25, 2014 9:53 am

Re: TURBO'd app that hangs the QL on termination...

Postby martyn_hill » Sun Jan 28, 2018 4:35 pm

Hello again!

An update to this old issue I was facing, and never quite got to the bottom-of...

I have just deployed Wolfgang's SDC/Win driver to my Minerva-based QL and, whilst it still remains unclear the cause of the original hanging of my TURBO'd app, the issue has curiously gone away - with no further changes to the app nor the various toolkit extensions in the meantime.

I choose to remain open as to why the app would hang as it did - there was still some work to do to eliminate my extensions and their Maths stack usage from the equation, but for now at least, it would appear that the app behaves better with Wolfgang's WIN driver than it did with the (excellent!) QubIDE driver on SDC.

Thanks to everyone who gave this some thought!

M.



Return to “Software & Programming”

Who is online

Users browsing this forum: No registered users and 4 guests