Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Share:
Notifications
Clear all

Access violation

9 Posts
2 Users
0 Likes
589 Views
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

When attempting to restore an img, I'm getting an access violation. I don't know why.

I'm still using the version you created for me, that works under El Crapitan.


   
ReplyQuote
Topic Tags
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

The problem occurs when the img file isn't readable by the current user. Running `chmod 777` fixed it.

But it shouldn't be throwing an access violation. That's just....wrong.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2315
 

Hi Sodalmighty,

Ehm ... my apologies ... I do not recall what version that is. 😞 
I'm really sorry for not remembering. I get so many request.

In APB, go to the about info and click the copy to clipboard icon;

Paste it in a reply here.

A file not being readable by the current user is weird. No program would be able to open that.
I do admit: "Access Violation" is a pretty useless message here. It's not a message I have programmed into APB. (the messages comes from APB though)

Who is the owner of the file? And what are the RW attributes?


   
ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

ApplePi-Baker version: 2.3.0 (Build 2)
(Helper Tool version 1.9.2)

Operating System version:
macOS
Version 10.11.6 (Build 15G31)
x86-64 (64 bit application)

The file has the following attributes and owner, as reported by `ls -l`:

--w----r-- 1 infinity wheel 5.6G 15 Aug 17:11 pkcmd-pi-build_2022-08-15.img

The file was created by using BetterZip to unpack a 7zip file created by ApplePiBaker. Why the resulting file has such weird permissions.....who knows?


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2315
 

I guess the first question is what application set these odd attributes.
Did you try another extraction program, for example TheUnarchiver (free), Archiver (not free) or Express ZIP (seems free).

I just did a test myself by creating an IMG and have ApplePi-Baker compress it with 7Zip.

-rw-r--r--@ 1 root  staff  58397496 Aug 17 11:21 TestImage.7z

 

I decompressed it "Archive Utility":

--w--wx-wT  1 hans  staff  138412032 Aug 17 11:23 disk.img

 Decompressed with "The Unarchiver":

-rw---x--T@ 1 hans  staff  138412032 Aug 17 11:25 disk.img

Decompressed with "Entropy" (I suspect this application is no longer being developed)

--w---x---  1 hans  staff  138412032 Aug 17 11:26 disk.img

With "Forklift" (very nice and affordable File manager)

-rw---x--T  1 hans  staff  138412032 Aug 17 11:28 disk.img

With "Path Finder"(powerful but expensive File manager)

--w--wx-wT  1 hans  staff  138412032 Aug 17 11:29 disk.img

 

As you can see: the attributes are set all over the place. Weird.
Looks like 7Zip (like RAR and some other formats) may not be storing file premissions. But the used permission are just weird/idiotic indeed. They make no sense.
Note that APB should work just fine accessing the original 7zip file.

Very interesting find though ... 🤔

It would be an interesting test to compress the IMG again to 7Zip, and see what APB makes of it ..?

Also note: I have found that 7Zip is not the best format to compress images (especially when it comes down to backup and restore speed).


   
ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

Uh.....I did say I used BetterZip to extract the 7z. I don't know why it gave the extracted file those stupid permissions.

When I changed the permissions with chmod, APB worked correctly.

So it's simply a case of making the error message more meaningful ;)


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2315
 
Posted by: @sodalmighty

did say I used BetterZip to extract the 7z

I know! That's why I was looking to see if this was a APB problem or a problem with the 7Zip extraction tool you're using.
If APB was to blame for weird attributes (in the compressed archive), then I should try to fix this, right?

The error message is generated by the runtime exception handler of the dev tools I've used (Lazarus Pascal) - not by APB itself.
I hope that makes sense haha.

The "Access Violation" message is flat-out useless indeed. (added to my To-Do list 👍 )
I'll try to see if I can reproduce the error and catch it if possible.


   
ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

Oh, I see! Yes, that makes sense.

I've not had these weird permissions when extracting other 7z files with BetterZip. So maybe it is something APB is doing...


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2315
 

I most certainly am not excluding APB (or the used compression library) being the one causing this.
That is a reason why it is on the To-Do list as well.
My experience with 7Zip has been not very positive these past few years.

On that note: it could be that nopt a single attribute is stored in the archive and that the decompression tool just picks whatever.
Even so: why would anyone have a "write only" file? Haha, it just doesn't make any sense ...


   
ReplyQuote
Share: