Bug 192925 - Ark: Opening an ACE archive results in blank list
Summary: Ark: Opening an ACE archive results in blank list
Status: CLOSED INTENTIONAL
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-16 20:12 UTC by Michal Ziabkowski
Modified: 2009-09-02 02:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test archive (739.53 KB, application/octet-stream)
2009-05-16 20:34 UTC, Michal Ziabkowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Ziabkowski 2009-05-16 20:12:59 UTC
Version:           2.13 (using 4.2.85 (KDE 4.2.85 (KDE 4.3 Beta1)), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.29-gentoo-r4

Steps to reproduce:
- Open an ACE archive with Ark

Result:
- No files are listed, the list is blank

Relevant information:
UNACE v2.5
Qt: 4.5.1
KDE: 4.2.85 (KDE 4.2.85 (KDE 4.3 Beta1)) + rev 965498 backport for unaceplugin
Comment 1 Raphael Kubo da Costa 2009-05-16 20:22:29 UTC
Can you please attach at least one ACE archive to this report? unace seems unable to create archives and I don't have any ace archive here.
Comment 2 Michal Ziabkowski 2009-05-16 20:34:56 UTC
Created attachment 33734 [details]
Test archive

Uploading the only ACE archive I have handy.
Comment 3 Raphael Kubo da Costa 2009-05-16 21:21:00 UTC
SVN commit 968853 by rkcosta:

Fix regular expression for the file listing output by unace.

BUG: 192925

 M  +2 -2      unaceplugin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=968853
Comment 4 Raphael Kubo da Costa 2009-05-16 21:24:55 UTC
Ark now matches the file listing regex correctly. But unace is such a horrible program that it does not list the full path of the files - it trims them to a certain character limit.

So the file you've attached won't be opened correctly because of the output of unace (Hu-Gotracer2.12a/tracer/Cheats/cheats.txt is output as /..tracer2.12a/tracer/Cheats/cheats.txt).

Actually, I'm thinking of completely disabling ace support once and for all - the format is proprietary, the only program able to decompress ace files is unace, whose unreliable output makes correctly listing or extracting ace files with ark nearly impossible most of the time.
Comment 5 Michal Ziabkowski 2009-05-16 21:52:30 UTC
Agreed, unace is a nightmare. It's mostly a dead format since 7-zip appeared, too. It wouldn't be a major loss to anyone.

Another option would be to patch unace, I guess. I took a quick look and it seems APPS_EXE_CONVERT_MakeStrShorter is responsible for clobbering the names. I'll try fiddling with it.

Regardless, thanks for your prompt response.
Comment 6 Michal Ziabkowski 2009-05-16 22:27:54 UTC
Well, this was easier than I thought. A patch for unace if you're interested:

--- unace-2.5.orig/source/apps/exe/convert/convert.c    2003-11-11 12:48:44.000000000 +0100
+++ unace-2.5/source/apps/exe/convert/convert.c 2009-05-16 22:11:27.443400477 +0200
@@ -48,7 +48,7 @@

 PCHAR   APPS_EXE_CONVERT_MakeStrShorter(PCHAR DestStr, PCHAR SourceStr, INT Width)
 {
-  if (strlen(SourceStr) > Width)
+  if (0)
   {
     memmove(DestStr, &SourceStr[strlen(SourceStr) - Width + 4], Width - 3);
     BASE_CONVERT_StrCatBefore(BASE_PATHFUNC_SEPARATORSTR "..", DestStr);

Just makes sure the shortening function doesn't shorten anything.

Some information on the licensing terms - http://bugs.gentoo.org/show_bug.cgi?id=214216
Comment 7 Raphael Kubo da Costa 2009-05-19 17:47:37 UTC
That patch may cause a buffer overflow if enough memory for DestStr wasn't allocated. Besides, relying on every distro applying the patch is impossible, which would make Ark work only half of the time.

Exporting COLUMNS to a bigger value doesn't help either, since the program seems to always use the same fixed maximum width for its output.

This makes me tend to vote for the removal of this plugin.
Comment 8 Michal Ziabkowski 2009-05-19 19:13:55 UTC
While it's a bit of a waste, the format isn't exactly popular. Finding an actual ACE archive was a chore. You might leave the code there for some die-hards, but disable it in CMakeFiles.txt. That's probably for the best.
Comment 9 Raphael Kubo da Costa 2009-05-19 19:41:24 UTC
Hm, I'd like to hear Harald's opinion on this.
Comment 10 Harald Hvaal 2009-05-20 02:42:54 UTC
Agreed, with such a little used format creating so much trouble, it's not even worth the trouble. Let's disable it for 4.3.
Comment 11 Raphael Kubo da Costa 2009-05-20 02:52:20 UTC
I'd prefer to remove the code from the tree; contrary to the bkplugin currently disabled, it won't change because the format really isn't likely to be opened, new versions of the proprietary program won't be released, Krazy will start complaining and we will have some dangling unmaintained code forever.
Comment 12 Raphael Kubo da Costa 2009-05-21 06:44:56 UTC
SVN commit 970866 by rkcosta:

Remove the unace plugin from the tree, as discussed with Harald.
* The format is proprietary and isn't likely to be opened soon.
* The only program to decompress unace files is outdated, is usually
  offered in binary-only form and is even more outdated for non-Linux
  platforms (think BSD here).
* This program is _really_ horrible and does awful things like trimming
  the file names in its listings, making it impossible to use with
  cliinterface.
* This program doesn't allow the user to create ace files.
Just disabling it in the source tree would mean having unmaintained code
forever (since things aren't likely to change regarding the format).

CCBUG: 192925

 M  +1 -1      app/ark.desktop  
 M  +1 -1      app/ark_dndextract.desktop  
 M  +1 -1      app/ark_servicemenu.desktop  
 M  +0 -1      plugins/CMakeLists.txt  
 D             plugins/unace/CMakeLists.txt  
 D             plugins/unace/kerfuffle_unace.desktop  
 D             plugins/unace/unaceplugin.cpp  
 D             plugins/unace/unaceplugin.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=970866
Comment 13 Raphael Kubo da Costa 2009-09-02 02:43:50 UTC
Changing the resolution to WONTFIX, as it is more descriptive ;)