[1.10.12] Cannot find an archive factory to deal with archive of type Zip

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

[1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

I'm in the process of trying to upgrade my project from an older version of 1.10 to the new 1.10.12 release.

Have run into the following problem. It won't read zip archives anymore. I get the error

Code: Select all

ItemIdentityException: Cannot find an archive factory to deal with archive of type Zip in ArchiveManager::load at C:\Ogre\ogre_1_10_12\OgreMain\src\OgreArchiveManager.cpp (line 65)
Can anyone tell me what this means and how I can fix it? I have a lot of stuff in zip files.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

Looking in the 1.10.12 source code, I find
#define OGRE_NO_ZIP_ARCHIVE 1
Why is it disabling zip?

Edit: Tried compiling with it set to 0 and got a million zip related unresolved external errors. What is going on? My old 1.10 had no problem with zips.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

Started another attempt, ran CMake. It says I don't have zip, even though I do, I can see it right there in my dependencies folder. Possibly it doesn't like my old version.

Code: Select all

Could NOT find ZLIB (missing:  ZLIB_LIBRARY) (found version "1.2.8")
So I went looking on the download page for new dependencies but there's nothing there I can see.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

Yeah, I saw that page, but what it said would happen wasn't happening.

Looks like the issue was that I have dependencies folder set, and that already had the dependencies in it, so cmake wasn't rebuilding them. But then after not rebuilding them, it then decided zlib was out of date.

I deleted the dependencies and tried again, seems to have found zlib okay this time.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

So I recompiled everything and it ran fine in release mode, but in debug mode it crashes the second it tries to read from a zip file.

As soon as it tries, I get an assertion.

Image

I'm finding the new dependencies weird and difficult. There was no OIS in them, no CG, and there's no debug files, only release.
Before I didn't need the zlib.dll in my app folder, now I do.

This is not working.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by paroj »

I can see how you find the new dependecies difficult. The focus is to be able to bootstrap Ogre on all platforms instead of providing the best experience on e.g MSVC.
Consequently the Dependencies pick up the build settings you have when you run cmake the first time (hence release for you).
OIS is no longer used by Ogre. Cg is only available on Desktop while the dependencies also should work on e.g. Emscripten.
To investigate your assertion I would need a full stack trace.

For zlib I will look into why it is linked in dynamically instead of statically.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

I should mention, my project is 32 bit, since its development started a long time ago. If it was 64 bit I'd just download the compiled SDK and grab the dependencies from there.

With Cmake using your setting for the dependencies, I'm not sure I see how that's supposed to work. I frequently use debug mode, and I'm used to having debug versions of most the dependencies. My old version of 1.10 was automatically set up to use different dependency libs depending on that.

So how does work now? It sounds like I'm either going to get a project set up to use debug dependencies or release dependencies, but not have the options to switch between the two. That becomes a problem in the situation above, where it looks like the assertion being caused by something zlib is doing, but I only have the release version of zlib.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

I noticed the dependencies had zlib.dll as well as the lib. I deleted that and it did a static link instead. I'm not sure if that zlib.dll was generated or maybe I put it there during an experiment.

I tried replacing the new zlib.lib with my old one in the deps, and rebuilding both the ogre engine and my own engine. I got the same assertion crash.

It's very weird, since if I revert back to my old 1.10 version and deps, I can run in debug fine. Like I said, happens as soon as it attempts to read zips, in this case during resource setup. The zip in question is just OgreCore.zip.

Poking around in the debugger, I see the zip is triggering
case Exception::ERR_INTERNAL_ERROR: throw InternalErrorException(number, desc, src, file, line);

number=7
desc = "media/packs/OgreCore.zip - error whilst opening archive: Unable to read zip file."
src = "ZipArchive::checkZzipError"
line = 338

It isn't a resources path issue, since the other version finds it fine, and this version runs fine in release.

[Edit: It's possible this is nothing to do with standard Ogre, I do have a couple of small modifications applied to it, so I guess it depends on whether other people run into problems. Maybe my modifications clash with how ogre has changed since my 1.10 version.]
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

Thought I'd do a last note on this.

I tried lots of experiments, with 1.10.12 and 1.10.11, using vanilla ogre code, and trying different versions of zlib, etc, but it always ended in the same debug problems.

I realized my version of 1.10 is very old, it's from May 2016, pre stable release. Looking at the versions from 1.10.0 onwards, I see various changes have been made to zip archive error checking, I guess this is what's messing things up.

I really wanted my DX11 renderer to have more updated code though, because I was getting problems with alt-tabbing fullscreen DX11 windows. So in the end I downloaded 1.10.0 and swapped my old DX11 rendersystem files for the new ones. After some very minor alterations it worked fine, and I don't get problems in release or debug. And it's fixed my alt-tab issues.

Doesn't look like there have been particularly important changes to the DX11 rendersystem after that, so this will do fine.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by paroj »

thanks for investigating the root cause. most likely you see the effects of this change:
https://github.com/OGRECave/ogre/commit ... ccafab917d

are you sure that media/packs/OgreCore.zip exists? It was dropped from the Ogre Media archive a while ago.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

Yeah, it definitely exists, plus I checked against some other resources I have in zip files too.

It's a weird issue, and I don't understand why the zips raise an error in debug yet everything works fine in release since it's reading the same zip files that have the game maps and stuff. Does that error return a pointer to the zip even if it thinks there's an error?

I'm almost finished my game so don't have time to investigate any further, and the workaround I have is adequate.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
chiwadan
Gnoblar
Posts: 1
Joined: Sun Oct 27, 2019 2:52 pm

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by chiwadan »

hello, I meet the same problem as you. So I want to ask that how did you solve this ? I delete the Dependencies and use the cmake again, but it was not worked.Thanks!
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by mkultra333 »

It was a while ago, but if I remember correctly, I never worked out the specific problem. I ended up just using my old version but with some of the newer DX11 code from later releases. My version of Ogre is a bit of a mix of a couple of the 1.10 versions since I was using it before its stable final release.

Sorry I can't remember exactly.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: [1.10.12] Cannot find an archive factory to deal with archive of type Zip

Post by paroj »

different behaviors between release/ debug might be due to:
https://github.com/OGRECave/ogre/issues/1303
Post Reply