News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Makeobj for 6655+ stuck on water with large animation & depths

Started by Fabio, September 27, 2013, 11:13:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fabio

Quote from: kierongreen on August 18, 2013, 06:33:56 PM
http://simutrans-germany.com/files/upload/6655-makeobj-win.zip

New makeobj for 6655+ (and at least the one before it) can't handle anymore water animations as pre-double height makeobj's did.
This is current Pak128 water:


Obj=ground
Name=Water
Copyright=none
# animated water:
Image[0][0]=water_ani.1.0
Image[0][1]=water_ani.1.1
Image[0][2]=water_ani.1.2
Image[0][3]=water_ani.1.3
Image[0][4]=water_ani.1.4
Image[0][5]=water_ani.1.5
Image[0][6]=water_ani.1.6
Image[0][7]=water_ani.1.7
Image[0][8]=water_ani.1.8
Image[0][9]=water_ani.1.9
Image[0][10]=water_ani.1.10
Image[0][11]=water_ani.1.11
Image[0][12]=water_ani.1.12
Image[0][13]=water_ani.1.13
Image[0][14]=water_ani.1.14
Image[0][15]=water_ani.1.15
Image[0][16]=water_ani.1.16
Image[0][17]=water_ani.1.17
Image[0][18]=water_ani.1.18
Image[0][19]=water_ani.1.19
Image[0][20]=water_ani.1.20
Image[0][21]=water_ani.1.21
Image[0][22]=water_ani.1.22
Image[0][23]=water_ani.1.23
Image[0][24]=water_ani.1.24
Image[0][25]=water_ani.1.25
Image[0][26]=water_ani.1.26
Image[0][27]=water_ani.1.27
Image[0][28]=water_ani.1.28
Image[0][29]=water_ani.1.29
Image[0][30]=water_ani.1.30
Image[0][31]=water_ani.1.31
Image[1][0]=water_ani.2.0
Image[1][1]=water_ani.2.1
Image[1][2]=water_ani.2.2
Image[1][3]=water_ani.2.3
Image[1][4]=water_ani.2.4
Image[1][5]=water_ani.2.5
Image[1][6]=water_ani.2.6
Image[1][7]=water_ani.2.7
Image[1][8]=water_ani.2.8
Image[1][9]=water_ani.2.9
Image[1][10]=water_ani.2.10
Image[1][11]=water_ani.2.11
Image[1][12]=water_ani.2.12
Image[1][13]=water_ani.2.13
Image[1][14]=water_ani.2.14
Image[1][15]=water_ani.2.15
Image[1][16]=water_ani.2.16
Image[1][17]=water_ani.2.17
Image[1][18]=water_ani.2.18
Image[1][19]=water_ani.2.19
Image[1][20]=water_ani.2.20
Image[1][21]=water_ani.2.21
Image[1][22]=water_ani.2.22
Image[1][23]=water_ani.2.23
Image[1][24]=water_ani.2.24
Image[1][25]=water_ani.2.25
Image[1][26]=water_ani.2.26
Image[1][27]=water_ani.2.27
Image[1][28]=water_ani.2.28
Image[1][29]=water_ani.2.29
Image[1][30]=water_ani.2.30
Image[1][31]=water_ani.2.31
Image[2][0]=water_ani.3.0
Image[2][1]=water_ani.3.1
Image[2][2]=water_ani.3.2
Image[2][3]=water_ani.3.3
Image[2][4]=water_ani.3.4
Image[2][5]=water_ani.3.5
Image[2][6]=water_ani.3.6
Image[2][7]=water_ani.3.7
Image[2][8]=water_ani.3.8
Image[2][9]=water_ani.3.9
Image[2][10]=water_ani.3.10
Image[2][11]=water_ani.3.11
Image[2][12]=water_ani.3.12
Image[2][13]=water_ani.3.13
Image[2][14]=water_ani.3.14
Image[2][15]=water_ani.3.15
Image[2][16]=water_ani.3.16
Image[2][17]=water_ani.3.17
Image[2][18]=water_ani.3.18
Image[2][19]=water_ani.3.19
Image[2][20]=water_ani.3.20
Image[2][21]=water_ani.3.21
Image[2][22]=water_ani.3.22
Image[2][23]=water_ani.3.23
Image[2][24]=water_ani.3.24
Image[2][25]=water_ani.3.25
Image[2][26]=water_ani.3.26
Image[2][27]=water_ani.3.27
Image[2][28]=water_ani.3.28
Image[2][29]=water_ani.3.29
Image[2][30]=water_ani.3.30
Image[2][31]=water_ani.3.31
Image[3][0]=water_ani.4.0
Image[3][1]=water_ani.4.1
Image[3][2]=water_ani.4.2
Image[3][3]=water_ani.4.3
Image[3][4]=water_ani.4.4
Image[3][5]=water_ani.4.5
Image[3][6]=water_ani.4.6
Image[3][7]=water_ani.4.7
Image[3][8]=water_ani.4.8
Image[3][9]=water_ani.4.9
Image[3][10]=water_ani.4.10
Image[3][11]=water_ani.4.11
Image[3][12]=water_ani.4.12
Image[3][13]=water_ani.4.13
Image[3][14]=water_ani.4.14
Image[3][15]=water_ani.4.15
Image[3][16]=water_ani.4.16
Image[3][17]=water_ani.4.17
Image[3][18]=water_ani.4.18
Image[3][19]=water_ani.4.19
Image[3][20]=water_ani.4.20
Image[3][21]=water_ani.4.21
Image[3][22]=water_ani.4.22
Image[3][23]=water_ani.4.23
Image[3][24]=water_ani.4.24
Image[3][25]=water_ani.4.25
Image[3][26]=water_ani.4.26
Image[3][27]=water_ani.4.27
Image[3][28]=water_ani.4.28
Image[3][29]=water_ani.4.29
Image[3][30]=water_ani.4.30
Image[3][31]=water_ani.4.31
Image[4][0]=water_ani.5.0
Image[4][1]=water_ani.5.1
Image[4][2]=water_ani.5.2
Image[4][3]=water_ani.5.3
Image[4][4]=water_ani.5.4
Image[4][5]=water_ani.5.5
Image[4][6]=water_ani.5.6
Image[4][7]=water_ani.5.7
Image[4][8]=water_ani.5.8
Image[4][9]=water_ani.5.9
Image[4][10]=water_ani.5.10
Image[4][11]=water_ani.5.11
Image[4][12]=water_ani.5.12
Image[4][13]=water_ani.5.13
Image[4][14]=water_ani.5.14
Image[4][15]=water_ani.5.15
Image[4][16]=water_ani.5.16
Image[4][17]=water_ani.5.17
Image[4][18]=water_ani.5.18
Image[4][19]=water_ani.5.19
Image[4][20]=water_ani.5.20
Image[4][21]=water_ani.5.21
Image[4][22]=water_ani.5.22
Image[4][23]=water_ani.5.23
Image[4][24]=water_ani.5.24
Image[4][25]=water_ani.5.25
Image[4][26]=water_ani.5.26
Image[4][27]=water_ani.5.27
Image[4][28]=water_ani.5.28
Image[4][29]=water_ani.5.29
Image[4][30]=water_ani.5.30
Image[4][31]=water_ani.5.31
Image[5][0]=water_ani.6.0
Image[5][1]=water_ani.6.1
Image[5][2]=water_ani.6.2
Image[5][3]=water_ani.6.3
Image[5][4]=water_ani.6.4
Image[5][5]=water_ani.6.5
Image[5][6]=water_ani.6.6
Image[5][7]=water_ani.6.7
Image[5][8]=water_ani.6.8
Image[5][9]=water_ani.6.9
Image[5][10]=water_ani.6.10
Image[5][11]=water_ani.6.11
Image[5][12]=water_ani.6.12
Image[5][13]=water_ani.6.13
Image[5][14]=water_ani.6.14
Image[5][15]=water_ani.6.15
Image[5][16]=water_ani.6.16
Image[5][17]=water_ani.6.17
Image[5][18]=water_ani.6.18
Image[5][19]=water_ani.6.19
Image[5][20]=water_ani.6.20
Image[5][21]=water_ani.6.21
Image[5][22]=water_ani.6.22
Image[5][23]=water_ani.6.23
Image[5][24]=water_ani.6.24
Image[5][25]=water_ani.6.25
Image[5][26]=water_ani.6.26
Image[5][27]=water_ani.6.27
Image[5][28]=water_ani.6.28
Image[5][29]=water_ani.6.29
Image[5][30]=water_ani.6.30
Image[5][31]=water_ani.6.31
---------------------------



When I try to compile the pak file, makeobj gets "stuck" without crashing and needs to be manually killed.
Does it overflow (having 32 animations per water depth)? Formerly it compiled it flawlessly.

Dwachs

Afaict, the code to write this type of object was not changed for months (including the writer code for obj=ground and all the image writing stuff). Either a completely subtile bug was introduced anywhere else or this executable is broken.
Parsley, sage, rosemary, and maggikraut.

Fabio

Quote from: Dwachs on September 27, 2013, 11:40:15 AM
Afaict, the code to write this type of object was not changed for months

Actually, I noticed this since Kieron's first makeobj compiles (early spring, IIRC).

Quote from: Dwachs on September 27, 2013, 11:40:15 AM
this executable is broken.

I had the same problem with all double height executables released by Kieron...

The workaround is either compile this single object with a non-double height makeobj or temporarily switch to a non-animated water ground.

I wonder if it can be some array overflow (6*32=192 images, maybe somewhere it's limited to 128 image slots)

kierongreen

Could be a signed/unsigned char problem yes. Note that my Windows makeobl compiles are very much unofficial - I make them in MinGW running inside Wine in Linux so there could well be weirdness there!

Fabio


Markohs

Just compiled one with last svn version, try it. You might need Microsoft C++ redistributable since I compiled with VS

https://dl.dropboxusercontent.com/u/30024783/Makeobj.exe

I tried it and seems to work:


C:\t>Makeobj.exe pak128
Makeobj version 55.2 for Simutrans 112.4 Nightly and higher

Makeobj version 55.2 for Simutrans 112.4 Nightly and higher

(c) 2002-2012 V. Meyer, Hj. Malthaner, M. Pristovsek & Simutrans development team

Image size is set to 128x128
writing invidual files to ./
   reading file ./w.dat
   writing file ./ground.Water.pak
      packing ground.Water
C:\t>

Dwachs

Parsley, sage, rosemary, and maggikraut.

Markohs

hehe ninja svn commit! ;)

Anyway my version is like half the binary size.

Dwachs

Parsley, sage, rosemary, and maggikraut.

Fabio

Thank you both!

Quote from: Markohs on September 27, 2013, 02:43:59 PM
Just compiled one with last svn version, try it. You might need Microsoft C++ redistributable since I compiled with VS

https://dl.dropboxusercontent.com/u/30024783/Makeobj.exe

Windows complains (after intalling Microsoft C++ redistributable) that "Makeobj in not a vaild Win32 application"

Quote from: Dwachs on September 27, 2013, 02:50:59 PM
Here is another build, there was an memory error. Maybe this works better than Markohs' compile :P

http://simutrans-germany.com/files/upload/makeobj-r6762.exe.zip
Wierd, extremely wierd.
If I run makeobj pak128 ./ water_ani.dat it compiles it properly, BUT if I run makeobj pak128 ./ ./ it gets stuck again when it reaches water_ani's turn...

Markohs

Quote from: Fabio on September 27, 2013, 03:14:42 PM
Thank you both!
Windows complains (after intalling Microsoft C++ redistributable) that "Makeobj in not a vaild Win32 application"

Oh, you have Windows XP?

This one should work in XP(incorporates the bug fix Dwachs did, @6762):

https://dl.dropboxusercontent.com/u/30024783/Makeobj_xp.exe

Ters

I sense that Windows XP will be the baseline for Windows for at least five years to come.

Markohs

Quote from: Ters on September 27, 2013, 04:29:31 PM
I sense that Windows XP will be the baseline for Windows for at least five years to come.

Yep, I just didn't bothered to change the plattform toolset, it defaults to Windows Vista ++ in MSVC 2012 and didn't needed to change, since I have Windows 7 on all my computers, and don't use to release binaries.

Quote from: Dwachs on September 27, 2013, 03:14:33 PM
you won :)

Well, both binaries had problems so we both failed so far. ;)

Dwachs

Parsley, sage, rosemary, and maggikraut.

z9999+

Makeobj which Markohs was attached writes correct image, but latest makeobj which Dwachs was attached doesn't write correct image.
Right 1px of each line is lacking.



Dwachs

Parsley, sage, rosemary, and maggikraut.

Fabio

Quote from: Dwachs on September 28, 2013, 08:30:07 AM
Fabio, does this version work for you ?

Still not  :-[

S:\PAK128\landscape\grounds>..\..\makeobj pak128 ./test.pak ./
Makeobj version 55.2 for Simutrans 112.4 Nightly and higher

Makeobj version 55.2 for Simutrans 112.4 Nightly and higher

(c) 2002-2012 V. Meyer, Hj. Malthaner, M. Pristovsek & Simutrans development team

Image size is set to 128x128
writing file ./test.pak
   reading file ./basement.dat
      packing ground.Basement
   reading file ./fences.dat
      packing ground.Fence
libpng warning: Interlace handling should be turned on when using png_read_image
   reading file ./marker.dat
      packing ground.Marker
   reading file ./sidewalk.dat
      packing misc.Sidewalk
   reading file ./slope.dat
      packing ground.Slopes
   reading file ./TextureGrounds.dat
      packing ground.LightTexture
      packing ground.ClimateTexture
      packing ground.ShoreTrans
      packing ground.SlopeTrans
      packing ground.Borders
   reading file ./tunnel_ground.dat
      packing misc.TunnelTexture
   reading file ./water_ani.dat



And it gets stuck there.

Single file compile instead works nice:
S:\PAK128\landscape\grounds>..\..\makeobj pak128 water-test.pak water_ani.dat
Makeobj version 55.2 for Simutrans 112.4 Nightly and higher

Makeobj version 55.2 for Simutrans 112.4 Nightly and higher

(c) 2002-2012 V. Meyer, Hj. Malthaner, M. Pristovsek & Simutrans development team

Image size is set to 128x128
writing file water-test.pak
   reading file water_ani.dat
      packing ground.Water

Dwachs

Parsley, sage, rosemary, and maggikraut.

Fabio

Still nothing...

It DOES create a file (attached here) but it still gets stuck and doesn't finalize it. The single ground.Water.pak is rather big (1.6 Mb), could this be a reason?

The disk has room enough for all the other files (it also compiles the huge RES_blocks.pak!).

Dwachs

I could pak the landscape files of pak128 without problems (but on Linux). I do not have Windows to test.
Parsley, sage, rosemary, and maggikraut.

Fabio

Quote from: Dwachs on September 28, 2013, 11:04:38 AM
I could pak the landscape files of pak128 without problems.

Could you try also Pak128.newlandscape (on the SVN) please? The files there are somewhat different.

Dwachs

Parsley, sage, rosemary, and maggikraut.

Fabio

makefile is severely outdated.
pyton and win batch compile all but crash on water. There is where I narrowed the issue to. :-[

Dwachs

Parsley, sage, rosemary, and maggikraut.

z9999+

Sorry, this is a little off-topic, but the latest makeobj still having some problem ?


Dwachs

Parsley, sage, rosemary, and maggikraut.

Fabio


Dwachs

The main bug was a failure in the read-png-file implementation. I blame the non-existent documentation of libpng for this: one had to allocate rows of pixels, but the value returned by libpng how many pixels should be allocated was wrong. One had to call a magic stupid_lib_update_your_internal_data function.

And there were some arrays that were way too large in the code and my inability to properly fix one out-of-bounds access in the image_writer class.

Thanks for reporting that everything works :)
Parsley, sage, rosemary, and maggikraut.

Fabio


prissi

Thank you, that part of libpng was used aparently wrong for ages.