Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on zipfiles created by some unix utilities #221

Closed
pjf opened this issue Oct 31, 2014 · 9 comments · Fixed by #222
Closed

Failure on zipfiles created by some unix utilities #221

pjf opened this issue Oct 31, 2014 · 9 comments · Fixed by #222
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN

Comments

@pjf
Copy link
Member

pjf commented Oct 31, 2014

We seem to have this bug which is different from this other bug which is already fixed in the SharpZipLib version we're using.

Reported by @malahx in KSP-CKAN/CKAN-Meta#33.

I don't suppose C# supports monkey-patching, does it? Because we could monkey-patch this away easily enough. :)

@pjf pjf added Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN labels Oct 31, 2014
@pjf
Copy link
Member Author

pjf commented Oct 31, 2014

@malahx, I don't suppose you can tell me which utility you're using to create your zip-files, could you? That will help me in writing a test case for this.

@pjf
Copy link
Member Author

pjf commented Oct 31, 2014

And of course it looks like there's already a fix that just hasn't been applied to the upstream repo.

@malahx
Copy link

malahx commented Oct 31, 2014

For zip, I use:
[malah@arch-desktop Kerbal Space Program]$ pacman -Q zip file-roller
zip 3.0-4
file-roller 3.14.1-1

@pjf
Copy link
Member Author

pjf commented Oct 31, 2014

Awesome. I can reproduce this with file-roller and have a test case. I'm still trying to figure out how we can get around this.

(file-roller is fine, the zip library we're using has a bug)

pjf added a commit to pjf/CKAN that referenced this issue Oct 31, 2014
@pjf
Copy link
Member Author

pjf commented Oct 31, 2014

I'm building my own patched SharpZipLib. In case anyone ever needs to repeat this:

  • Get this branch.
  • cd SharpZipLib/src
  • xbuild /p:Configuration=Release ICSharpCode.SharpZLib.csproj
  • Copy the build artefacts in ../bin.

pjf added a commit to pjf/CKAN that referenced this issue Oct 31, 2014
Uses the patch from icsharpcode/SharpZipLib#53 .
Thank you, @Novn, for writing this.

Uses the build fixes from https://github.com/Arakis/SharpZipLib for
Mono. Thank you, @arakis, for providing these.

The branch I built from is at
https://github.com/pjf/SharpZipLib/tree/ckan_gh221

Attentioning @bastianeicher who is maintaining a totally awesome
SharpZipLib patches branch. @Novn's patch above fixes the bug
described at http://community.sharpdevelop.net/forums/t/21758.aspx .
There's a test file at
https://github.com/pjf/CKAN/blob/221_ziplib/t/data/gh221.zip which shows
the presence of the bug when combined with the test at
https://github.com/pjf/CKAN/blob/221_ziplib/CKAN/Tests/ZipLib.cs .

Closes KSP-CKAN#221.
Closes KSP-CKAN/CKAN-meta#33

@malahx: I'll be releasing an updated CKAN client shortly with these
fixes.
pjf added a commit to pjf/CKAN that referenced this issue Oct 31, 2014
pjf added a commit to pjf/CKAN that referenced this issue Oct 31, 2014
Uses the patch from icsharpcode/SharpZipLib#53 .
Thank you, @Novn, for writing this.

Uses the build fixes from https://github.com/Arakis/SharpZipLib for
Mono. Thank you, @arakis, for providing these.

The branch I built from is at
https://github.com/pjf/SharpZipLib/tree/ckan_gh221

Attentioning @bastianeicher who is maintaining a totally awesome
SharpZipLib patches branch. @Novn's patch above fixes the bug
described at http://community.sharpdevelop.net/forums/t/21758.aspx .
There's a test file at
https://github.com/pjf/CKAN/blob/221_ziplib/t/data/gh221.zip which shows
the presence of the bug when combined with the test at
https://github.com/pjf/CKAN/blob/221_ziplib/CKAN/Tests/ZipLib.cs .

Closes KSP-CKAN#221.
Closes KSP-CKAN/CKAN-meta#33

@malahx: I'll be releasing an updated CKAN client shortly with these
fixes.
@pjf pjf closed this as completed in #222 Oct 31, 2014
@pjf pjf removed the pull request label Oct 31, 2014
@pjf
Copy link
Member Author

pjf commented Oct 31, 2014

@malahx : This is now released in v0.18.1 : https://github.com/KSP-CKAN/CKAN/releases

It may take a few minutes for our build system to attach the executables, but it should mean that files compressed with file-roller will be readable.

Thanks again for the cool bug report. :)

@malahx
Copy link

malahx commented Oct 31, 2014

Thank you, but I'm a bug magnet, sorry.
The cli work as a charm, I can install all what I want, but I have tried the gui and when I try to install one of my mods, the gui shutdown and I can see this continues to write many lines on the console (but if i try an other mod, for example: DeadlyRentry the install work).

[malah@arch-desktop Kerbal Space Program]$ mono ckan.exe version
v0.18.1-0-gb9249ff

[malah@arch-desktop Kerbal Space Program]$ mono ckan.exe gui --debug > log.txt
... many lines (don't know if that the bug but I post it)
143599 [1] DEBUG CKAN.Module (null) - Testing if USITools 0.2.3 is compatible with KSP 0.25.0
System.ArgumentOutOfRangeException: Index is less than 0 or more than or equal to the list count.
Parameter name: index
1
at System.Collections.ArrayList.ThrowNewArgumentOutOfRangeException (System.String name, System.Object actual, System.String message) [0x00000] in :0
at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] in :0
at System.Windows.Forms.DataGridViewRowCollection.SharedRow (Int32 rowIndex) [0x00000] in :0
at System.Windows.Forms.DataGridView.GetRowInternal (Int32 rowIndex) [0x00000] in :0
at System.Windows.Forms.DataGridView.OnPaint (System.Windows.Forms.PaintEventArgs e) [0x00000] in :0
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.DataGridView.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in :0
143627 [1] DEBUG CKAN.RegistryManager (null) - Using suppied CKAN registry at /home/malah/.local/share/Steam/SteamApps/common/Kerbal Space Program/CKAN
... many lines

If you search the full log: https://www.dropbox.com/s/05m4520grvrw8b2/log-2014-10-31-1734.txt?dl=0
(on that log, I installed DREC and after SRL, but with QuickRevert this is the same issue).

Again thank you, for all this work :)

@pjf
Copy link
Member Author

pjf commented Oct 31, 2014

@malahx : Thank you! Tracking the new issue at #224 .

@malahx
Copy link

malahx commented Oct 31, 2014

The next time, I will learn to use it ;) Thanks

RichardLake pushed a commit to RichardLake/CKAN that referenced this issue May 30, 2015
Uses the patch from icsharpcode/SharpZipLib#53 .
Thank you, @Novn, for writing this.

Uses the build fixes from https://github.com/Arakis/SharpZipLib for
Mono. Thank you, @arakis, for providing these.

The branch I built from is at
https://github.com/pjf/SharpZipLib/tree/ckan_gh221

Attentioning @bastianeicher who is maintaining a totally awesome
SharpZipLib patches branch. @Novn's patch above fixes the bug
described at http://community.sharpdevelop.net/forums/t/21758.aspx .
There's a test file at
https://github.com/pjf/CKAN/blob/221_ziplib/t/data/gh221.zip which shows
the presence of the bug when combined with the test at
https://github.com/pjf/CKAN/blob/221_ziplib/CKAN/Tests/ZipLib.cs .

Closes KSP-CKAN#221.
Closes KSP-CKAN/CKAN-meta#33

@malahx: I'll be releasing an updated CKAN client shortly with these
fixes.
RichardLake pushed a commit to RichardLake/CKAN that referenced this issue May 30, 2015
Uses the patch from icsharpcode/SharpZipLib#53 .
Thank you, @Novn, for writing this.

Uses the build fixes from https://github.com/Arakis/SharpZipLib for
Mono. Thank you, @arakis, for providing these.

The branch I built from is at
https://github.com/pjf/SharpZipLib/tree/ckan_gh221

Attentioning @bastianeicher who is maintaining a totally awesome
SharpZipLib patches branch. @Novn's patch above fixes the bug
described at http://community.sharpdevelop.net/forums/t/21758.aspx .
There's a test file at
https://github.com/pjf/CKAN/blob/221_ziplib/t/data/gh221.zip which shows
the presence of the bug when combined with the test at
https://github.com/pjf/CKAN/blob/221_ziplib/CKAN/Tests/ZipLib.cs .

Closes KSP-CKAN#221.
Closes KSP-CKAN/CKAN-meta#33

@malahx: I'll be releasing an updated CKAN client shortly with these
fixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants