"Find" crashes with blanks in directory name + wish

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

"Find" crashes with blanks in directory name + wish

Post by JosDuchIt »

1) crash
I am using a SAM440ep with OS4.1 update 3, but the problem probably is more general

While trying to write a gui for FIND i noticed crashes when blanks are present in the searched directory name

The same crash & grimreaper crashlog appear when you use the OS4 Gui for find or write the find command from shell

Find "Amiga OS4:Documentation" CONTENTS FIND

After the "kill" of the process a rmessage appears:

DOS resource tracker has detected
an unfreed resource while deallocating a DOS process
Process: "Find- Search Process"
Function "ReleaseDirContext() tracker

The problem appears right after boot, no other applications running. Here it is very reproducable
Can this be confirmed?
Is this a known bug ?

2)wish

The shell output gives the name of the files but there are no quotes around it, making it difficult or impossible to parse the output and extract the filename
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: "Find" crashes with blanks in directory name + wish

Post by xenic »

@JosDuchIt
I can confirm your crash but I don't think it has anything to do with spaces in the directory name. My system partition is labeled "OS4" with no spaces. Entering "Find OS4:Documentation CONTENTS FIND" in a shell crashes on my system. When I noticed that it's crashing while searching the "DH0:Documentation/MiniGL/demos" directory, I copied the MiniGL directory to ram: and did the same search. It crashes when the MiniGL directory is in ram: too. This problem appears to be easily reproducible so hopefully one of the devs or beta testers can confirm and add it to the bug list.
EDIT: I'm using a SAM Flex 800Mhz in case that makes any difference.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: "Find" crashes with blanks in directory name + wish

Post by xenic »

@JosDuchit
The shell output gives the name of the files but there are no quotes around it, making it difficult or impossible to parse the output and extract the filename
Using the NOSIZES & NODATES arguments seems to get path+filename only. I tried the LFORMAT option but it doesn't appear to work like the "List" LFORMAT argument. It ignores the percent sign (%) like it did when you tried it as a wildcard in your post at Amigans.net. As a system utility, "FInd" operation should be constistant with other system commands. Since you were searching for the word "FIND" in your example that crashes, I assume that you are looking for some documentation for the Find command too. I even searched the system documentation that came with OS 3.5 and OS 3.9 and found nothing. I think the FInd command needs some repair and docs for the next update or release.

EDIT: Although the %s substitution doesn't appear to work with the Find LFORMAT argument like it does in the List command, I did get the %n substitution to work. Try something like: find DH0:MUI/docs CONTENTS graphical LFORMAT "Name is %n"
AmigaOne X1000 with 2GB memory - OS4.1 FE
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: "Find" crashes with blanks in directory name + wish

Post by JosDuchIt »

@xenic
The find command is described here
http://www.titan.co.nz/amigaak/AA020844e46.htm
according to the author the LFORMAT just affects the date.

I don't know where he got his info but having tried a number of them i can confirm, that it does not seem to work according to this explanation. I mostly get a number of lines just showing one character (N when using %N)

testing more

find NAME a LFORMAT " %n %p %b %c %d %t"
gives me
%n filename
%p path
%b protection bits
%c comments
%d date
%t time

I started another thread on Find's "non-standard" pattern recognition
http://www.amigans.net/modules/xforum/v ... 6&forum=25
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1438
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: "Find" crashes with blanks in directory name + wish

Post by tonyw »

I just tried Xenic's suggested command and got no crash:

>find MUI/docs CONTENTS graphical LFORMAT "Name is %n"
Name is ChangeLog-OS4
Name is MUI.guide

... so it seems OK to me.
cheers
tony
Post Reply