English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 27 December 2017, 00:00   #1
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,692
any good tool to find run-time errors?

I'm developping JST, and sometimes it freezes when performing disk operations (doslib Read for instance)

it's random. Most of the time it works, and sometimes it stops the program (but the console is still active and the machine doesn't crash)

Running the program in another console often works.

My program is coded in assembly, I'm running WinUAE. Would enforcer work? maybe I'm misusing some OS call. Is there some OS call inspector which is able to detect wrong calls?
jotd is offline  
Old 27 December 2017, 00:53   #2
Galahad/FLT
Going nowhere

Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 45
Posts: 7,070
I would put in a delay in opening/closing/writing when doing filereads using Amigados. Wait of 2 seconds should be enough everytime you open and when you close which should be enough for all systems, maybe pass a parameter for user to set the delay value so its waiting less on systems that dont need to wait 2 seconds

Its fixed a few games that ordinarily wouldnt work on cd33 because of different delay when drive hardware wakes up and closes down again.
Galahad/FLT is offline  
Old 27 December 2017, 04:49   #3
Minuous
Coder/webmaster/gamer
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 1,836
>Is there some OS call inspector which is able to detect wrong calls?

http://aminet.net/package/dev/debug/PatchWork
Minuous is offline  
Old 27 December 2017, 09:46   #4
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,692
thanks, but the last version crashes my system. The previous version (I had installed) runs but finds nothing.

No enforcer hits either.

About the delay: Galahad note that I'm not talking about CD access. This is for a HD usage.

The bug has been there for 20 years I guess. Sigh.

Last edited by jotd; 27 December 2017 at 09:57.
jotd is offline  
Old 27 December 2017, 12:02   #5
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 3,339
If you want to know where your program stops, you have two easy ways of finding it :
1. Output something in some console, for every OS call you make (might be too much of a flood, though).
2. Write something in memory, like at $100, indicating where you are in your program.

Then, once frozen, just have a look to check where you were when this happened.
You can also write the function parameters in the console output or the memory area, to see if they look correct.
In addition, any register or variable value can be output to see if they're in expected range.

If this is dos.library/Read that fails, i would first check the file handle.
meynaf is online now  
Old 27 December 2017, 18:06   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,120
You can use winuae debugger Tt to list tasks and if task is waiting, listed PC value will point to Wait() call that caused it to hang, it may help to find out which dos call hung. (Note that you must use KS 3.1 without any exec patches that can change exec stack frames)

It probably is caused by invalid handle if system keeps running normally.
Toni Wilen is online now  
Old 27 December 2017, 22:13   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,966
Have you checked how much stack space is available when you call DOS functions? You need at least a couple of KB.
mark_k is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Good benchmarking tool? Ian support.Apps 0 16 March 2015 18:28
Need a good ADF-Tool for writing back onto disk Alf support.Apps 7 01 July 2007 18:18
Tool to set spindown time of 2 1/2 inch hds? Jerry request.Apps 19 25 May 2006 01:21
Devious Tools - how to run this packs (errors)? amigarulez support.Apps 1 27 March 2005 01:10
What's a good tool for rebooting into PAL mode? Computolio request.Apps 3 01 May 2004 23:20

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.96088 seconds with 15 queries