[SOLVED] No sprites or maps

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
User avatar
Amarynthus
Novice
Novice
Posts: 51
Joined: 26 Mar 2014, 19:29
Location: Hurnscald

[SOLVED] No sprites or maps

Post by Amarynthus »

I've been unable to play TMW for the past 12 or so hours. When I log in and get to the window to select the character, all of my characters are shown just as their hats (no sprite for any other body part). When I log in there is almost no visual data at all, no map, and no sprites. I can see the names of some other chars on the same map, and I can blindly "move" which leaves a trail of tracer-like artifacts behind.

I've seen similar symptoms before when my client data was not updated. So I logged out, and logged back in ensuring I ran a normal client-data update, but there was no change. I hoped this was a temporary issue at the server end and left it alone for a while. Just now I tried again and had the same results.

I rebuilt manaplus from git, but I had the same result. I deleted the client data (rm -rf ~/.local/share/mana) which properly forced a new download of all client data - but still no luck. I tried rerunning the video autodetect, but that had no effect. I also switched from "Normal OpenGL" to "software" but that also had no affect.

EDIT: I get the same results on world.evonline.org too.

I just noticed manaplus run from the command line spits out countless repetitions of the errror: "libpng error: Not a PNG file" and a few "libpng warning: iCCP: known incorrect sRGB profile"
Last edited by Amarynthus on 19 Jan 2017, 21:39, edited 2 times in total.
4144
Knight
Knight
Posts: 965
Joined: 03 Aug 2009, 11:57

Re: No sprites or maps

Post by 4144 »

Look like windows for you works.
Login to game and run command in chat: /uploadlog
After it complete, it will show url with log. Copy this url to this forum topic.
User avatar
Amarynthus
Novice
Novice
Posts: 51
Joined: 26 Mar 2014, 19:29
Location: Hurnscald

Re: No sprites or maps

Post by Amarynthus »

Thanks for the quick reply. I was able to get the log:

http://sprunge.us/TTUc?txt

The relevant errors seem to start on line 1756 with many repeated variations of this sequence:

Code: Select all

[20:53:31.09] Assert:
[20:53:31.09] Error, image load failed: Error reading the PNG file.
[20:53:31.09] resources/openglimagehelper.cpp:74: in function `load'
[20:53:31.09] manaplus(_Z11reportStackv+0x25) [0x5b7515]
[20:53:31.09] manaplus(_ZN17OpenGLImageHelper4loadEP9SDL_RWopsRK3Dye+0x11a) [0x5a4eca]
[20:53:31.09] manaplus() [0x5a60df]
[20:53:31.09] manaplus(_ZN15ResourceManager3getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERFP8ResourcePKvESB_+0x65) [0x5aa8c5]
[20:53:31.09] manaplus(_ZN6Loader8getImageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4a) [0x5a630a]
[20:53:31.09] manaplus(_ZN11TextCommand9loadImageEv+0x311) [0x6696e1]
[20:53:31.09] manaplus(_ZN11TextCommandC1EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_13CommandTargetS7_j11MagicSchooljj+0xde) [0x669a8e]
[20:53:31.09] manaplus(_ZN12SpellManager4loadEv+0x1c0) [0x69ffc0]
[20:53:31.09] manaplus(_ZN12SpellManagerC1Ev+0x49) [0x6a0e69]
[20:53:31.09] manaplus(_ZN6Client8gameExecEv+0x122d) [0x6654ed]
[20:53:31.09] manaplus(_Z7mainGuiiPPc+0x83) [0x602963]
[20:53:31.09] /usr/lib/libc.so.6(__libc_start_main+0xf1) [0x7ff46e96c291]
[20:53:31.09] manaplus(_start+0x2a) [0x53deda]
I also see a lot of messages like the following in the debug tab:

Code: Select all

[20:53] Error loading image: graphics/sprites/model/male.png|W;B;R[64x64]
[20:53] resources/resourcemanager/resourcemanager.cpp:509: in function `get'
...
[20:53] graphics/sprites/equipment/legs/pants.xml|#a4b2b2, ffffff: Imageset "base" not defined in
[20:53] resources/sprite/spritedef.cpp:272: in function `getImageSet'
EDIT: I am running archlinux, and there were a handful of packages upgraded between when I last successfully used manaplus yesterday and when it failed today. The only updates in the manaplus dependency tree were zlib and lz4. As all the graphics resources are zipped, it seems a change in these could be relevant to the issue. I'm downgrading now to try to identify the relevant change.

EDIT 2: found it. Downgrading zlib from 1.2.11 to 1.2.8 worked. It seems manaplus may be incompatable with the newest zlib?

----

WORKAROUND: After some back and forth with 4144 trying to debug this, he believes the problem is with a dependency that needs to be rebuilt against the new zlib. Yet I've rebuilt every package in the dependency tree between manaplus and zlib and it still does not work. Rather than hold back package upgrades I've opted for the following workaround. I copied the lib from an older zlib (libz.so.1.2.8 in my case) into my home directory and now launch manaplus with `LD_PRELOAD=/path/to/old/libz.so.1.2.9 manaplus ...`
User avatar
Amarynthus
Novice
Novice
Posts: 51
Joined: 26 Mar 2014, 19:29
Location: Hurnscald

Re: No sprites or maps

Post by Amarynthus »

This problem has been traced to a zlib bug introduced in the following commit:
https://github.com/madler/zlib/commit/b ... 9014f7b282

A zlib build from immediately before that commit works fine, while this commit causes decompression of the sprite png data to fail. Other zlib decompression failures have been found among erlang users and a zlib bug report has been opened.
4144
Knight
Knight
Posts: 965
Joined: 03 Aug 2009, 11:57

Re: [SOLVED] No sprites or maps

Post by 4144 »

Amarynthus, can you say what libpng and SDL_Image version you using?
4144
Knight
Knight
Posts: 965
Joined: 03 Aug 2009, 11:57

Re: [SOLVED] No sprites or maps

Post by 4144 »

Now i can reproduce issue.
It happened in manaplus only in this chain: physfs load zip, from zip it load png image, and in same stream/buffer called libpng for unpack this image. And it failed look like in SDL_Image in line

Code: Select all

if ( setjmp(png_ptr->jmpbuf) )
{
    error = "Error reading the PNG file.";
    goto done;
}
Also look like for me if failing not on all images, but on most
User avatar
Amarynthus
Novice
Novice
Posts: 51
Joined: 26 Mar 2014, 19:29
Location: Hurnscald

Re: [SOLVED] No sprites or maps

Post by Amarynthus »

It does seem the zlib devs are saying this is not a problem on there end. But it sounds like they've changed the interface without sufficient warnings of deprecated functions (from what I can gather).

SDL_image is at 1.2.12-3 here.

I can confirm that not quite all images fail to load. In the character selection window, all of my chars hats are visible, and those without hats on have visible heads, but nothing else is visible.

I get the impression that SDL 1.x development has ceased in favor of SDL2. Can manaplus be built against SDL2, or are there plans of moving to that in the future?
4144
Knight
Knight
Posts: 965
Joined: 03 Aug 2009, 11:57

Re: [SOLVED] No sprites or maps

Post by 4144 »

Amarynthus wrote: I get the impression that SDL 1.x development has ceased in favor of SDL2. Can manaplus be built against SDL2, or are there plans of moving to that in the future?
Yes, and i get issue on SDL2 build. Visible hats, and no other sprites.
Trying to detect for what files it happened and why. After will try reduce libs usage for reproduce issue.

You can try other physfs version. I think now exists two branches physfs1 and physfs2.
Also try link SDL_Image with different libpng. For me here libpng 1.2
4144
Knight
Knight
Posts: 965
Joined: 03 Aug 2009, 11:57

Re: [SOLVED] No sprites or maps

Post by 4144 »

For build with SDL2 into configure add flag: --with-sdl2
4144
Knight
Knight
Posts: 965
Joined: 03 Aug 2009, 11:57

Re: [SOLVED] No sprites or maps

Post by 4144 »

I tracked issue to physfs+zlib.
Will investigate more and will create demo program.
4144
Knight
Knight
Posts: 965
Joined: 03 Aug 2009, 11:57

Re: [SOLVED] No sprites or maps

Post by 4144 »

Found issue in libphysfs.

Here is patch for physfs 2.0: http://download.evolonline.org/manaplus ... _seek.diff
Post Reply