Horrendously large file cannot be deleted

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
djrikki
Posts: 138
Joined: Fri Jun 17, 2011 10:21 pm
Location: Grimsby, Lincolnshire, UK
Contact:

Horrendously large file cannot be deleted

Post by djrikki »

Hi all,

I can't remember how this came about definitively, but around 6 weeks ago I tried to delete a regular file from a JXFS partition, I believe it was just a jpg or some other image type, Workbench refused to delete it. From what I can recall Workbench was already in the process of deleting a bunch of other files because the progress window was already open and I couldn't be bothered to wait. AmigaOS can multi-task after all.

Anyway the strange thing is Workbench shows the file size as something ridiculous like for example, 435,354,454,454,454,454,454,324,246,345,983 bytes. Clearly its not taking up that much space (!), so I just thought I'd better report it and wondered if there is anyway I can delete that file - not that its particularly doing any harm. Just thought it was worth mentioning - perhaps someone else has seen similar behaviour.
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Horrendously large file cannot be deleted

Post by Slayer »

see if this will work for you?

http://aminet.net/util/batch/DelZero.lha
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
kas1e
Beta Tester
Beta Tester
Posts: 542
Joined: Sat Jun 18, 2011 7:56 am
Contact:

Re: Horrendously large file cannot be deleted

Post by kas1e »

@djrikky
For sure you know that without normal-reproducable bug report and explaining of situation how beta-tester/developers can reproduce it : its just nothing and will be not fixed ? Its all can happens because of milion reassons (one of which, is when you do some code, you can bork the system in any way and pertty much). So to make fixed bugs, you need to found reproducable case, reboot aos for test it again, and report it normally.

For now i just tryed to delete from JFS 2 big parts of files at one time (one parts - jpgs, other part - mp3s) , and all going well. If you want to fix it (if it indeed bug in os), you need to found a way how to reproduce it for all the times. In others its just shot-in-the-dark :)
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Horrendously large file cannot be deleted

Post by Slayer »

kas1e wrote: complicated jargon
kas1e, it might be just me but wasn't that just a whole heap of complicated jargon? :lol: ;)

The man simply put his foot in it, sometimes if you do something which you really shouldn't do because the resources are tied up or they are working in a similair area quite hard you tip things in the wrong direction... I would suggest there isn't actually bug here but a random chain of events you'd hardly be able to reproduce with any accuracy...

It's like resetting your amiga when its writing a file and next minute you find out the amiga won't boot up because you've corrupted the RDB

I just provided him a link hopefully capable of removing this resulting file... I dare say that'll be the end of it once he successfully nukes it :D
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
User avatar
djrikki
Posts: 138
Joined: Fri Jun 17, 2011 10:21 pm
Location: Grimsby, Lincolnshire, UK
Contact:

Re: Horrendously large file cannot be deleted

Post by djrikki »

@Slayer

Yes, it was all quite random, its not something you can easily replicate. Thanks man, just booting up now, I'll give it a go.

Edit: Okay file deleted, details of what I noticed:

Workbench showed it as a Project file, Shell showed it as a directory. I ran Delzero <filename>, unable to open file (because shell saw it as a directory) - so I thought what the hell lets type delzero <filename>.info - file size updated. As a result of this Delzero somehow converted what Workbench saw as a Project file into a directory. So then I just simply went into this directory using the Workbench right-clicked and deleted the contents.

Cheers again.

@kas1e

There wasn't a whole heap of complicated jargon. xD
kas1e
Beta Tester
Beta Tester
Posts: 542
Joined: Sat Jun 18, 2011 7:56 am
Contact:

Re: Horrendously large file cannot be deleted

Post by kas1e »

Workbench showed it as a Project file, Shell showed it as a directory. I ran Delzero <filename>, unable to open file (because shell saw it as a directory) - so I thought what the hell lets type delzero <filename>.info - file size updated. As a result of this Delzero somehow converted what Workbench saw as a Project file into a directory. So then I just simply went into this directory using the Workbench right-clicked and deleted the contents.
I think it all can be because you do experiments with programming. I have pretty offten myself some strange random behaviours, but usually its all because i do something wrong from code. Some problems sometime can even happens when you do some mess in the shell with all those redirect characters and brakets. Maybe you even plays a bit with "protect" command, or any set-attrib functions of hollywood, etc.

Anyway, will be cool of course if you can somehow to found a way to reproduce it, because if it bug in os it will be cool to fix, and if is not, will be good to know that is not :)
User avatar
djrikki
Posts: 138
Joined: Fri Jun 17, 2011 10:21 pm
Location: Grimsby, Lincolnshire, UK
Contact:

Re: Horrendously large file cannot be deleted

Post by djrikki »

@kas1e

Again, nothing to do with code, I was using Workbench.
kas1e
Beta Tester
Beta Tester
Posts: 542
Joined: Sat Jun 18, 2011 7:56 am
Contact:

Re: Horrendously large file cannot be deleted

Post by kas1e »

Again, nothing to do with code, I was using Workbench.
I mean that our os are not so protected, and you can do some experiments with code, and then (when OS already have problems in some area after "code experiments"), you will have any kind of problems (and with WB, and with shell commands, etc). Maybe you lock (or play somehow with filesystem) something by hollywood functions and forget to unlock, and then close that programm, then forget that you play with it, start to use OS, and after a while have a problems.

Of course, if it was 100% done right after reboot, and you can remember what apps you use and what you do an so on :)
User avatar
djrikki
Posts: 138
Joined: Fri Jun 17, 2011 10:21 pm
Location: Grimsby, Lincolnshire, UK
Contact:

Re: Horrendously large file cannot be deleted

Post by djrikki »

Nope. I know all that. Why do you always complicate things? lol
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Horrendously large file cannot be deleted

Post by broadblues »

HI Drikki

From your description I can see what happened.

You had a directory on your partition, and somehow created a jpeg icon with the same name as the directory .

This confused workbench as a jpeg icon id aproject icon and a directory should have a "directorty icon"

Workbench could not delete the directory when told too as it was presumably not empty. Becuase workbench was showing eroneous data about a file which was really a directory, you assumed the apparent huge size was the problem in deleteing.

You can reproduce this again in ram: as follows

Open RAM: in workbench

From the window menu select new directory and create one rename it to 'test'

Open this directory and copy some file there, a bit of random text will do

Now select the directories icon and choose information from the icon menu.

You will see information from the directory icon.

Now from the information windows type menu select "project" you will get a warning ignore it and do it anyway.

Save the icon.

Now change the Ram: window to show by name

look the directory shows as a file, with a stupid filesize. (ironically a afile with type drawer but never the less it shows in black as a file)

If you try and delete it you'll get an error. But you can't open it from the workbench as it thinks it's a file.

Is this what you saw?

The way this probably happened in real life is you tried to save an jpeg image over an existing directory so the image was never saved but the icon was created anyway.

If it was something you wrote yourself always check for a correct file /copy / creation before creating the icon if the tool waswriten by someone else, you might like to send them a bug report (about the iocn creation not the weird filesize)
Post Reply