[closed] memory access error caused by a "vertical_frames"

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

[closed] memory access error caused by a "vertical_frames"

by Hybrid Dog » Tue Jan 20, 2015 16:28

l tried to make an animated nyancat rainbow.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.override_item("default:nyancat_rainbow", {
   tiles = {   -- 300ms (from nyan.cat)
      {
         name = "default_nc_rb_ani.png^[transformR90",
         animation = {
            type = "vertical_frames",
            aspect_w = 16,
            aspect_h = 16,
            length = 0.6,
         },
      },
      --"default_nc_rb.png^[transformR90",
      "default_nc_rb.png^[transformR90",
   },
})

The animated rainbow texture:Image
But when l want to test it, minetest crashes and tells me a memory access error (Speicherzugriffsfehler).
lt crashes if l look for the cat in the unified inventory and/or look at it when it's placed.
I tested it with an additional inventory_image in the node definition but it didn't help.

If I remove the "^[transformR90", minetest doesn't crash.

minetest --trace just tells me following:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
12 <- 127.0.0.1:d770, size=85, data= 4f45 7403 0001 17:16:55: INFO[main]: Lazily creating item texture and mesh for "default:nyancat_rainbow"
10 -> 127.0.0.1:9b8d, size=20, data= 4f45 7403 0001 0003 061c 0100 3200 0100 0f09 00000003 061b 0100 4700 1900 0001 f400...
...
12 -> 127.0.0.1:d770, size=bSpeicherzugriffsfehler


My problem is following:
When minetest crashes it doesn't inform me enough about the mistake, it only tells me that it crashed when creating an item texture for "default:nyancat_rainbow". And it doesn't tell me the exact reason for the crash.
Attachments
default_nc_rb_ani.png
default_nc_rb_ani.png (221 Bytes) Viewed 254 times
Last edited by Hybrid Dog on Sun Sep 27, 2015 12:59, edited 2 times in total.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: memory access error caused by a "vertical_frames" animat

by 4aiman » Wed Jan 21, 2015 06:36

You have vertical frames and a rotated image.
I guess the engine couldn't find the second part of an image because it's not "below" but "to the right" of the first frame after you have rotated the texture.

Anyway, why don't you want to supply an already rotated image?

Or, if the whole case is about MT doesn't tell what to do, then I'm all for adding more info in the verbose mode. Currently even that can't tell one where to start searching for a bug.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: memory access error caused by a "vertical_frames" animat

by Hybrid Dog » Wed Jan 21, 2015 16:18

4aiman wrote:You have vertical frames and a rotated image.
I guess the engine couldn't find the second part of an image because it's not "below" but "to the right" of the first frame after you have rotated the texture.

Anyway, why don't you want to supply an already rotated image?

For the nyancat l would need 2 more rainbow textures instead of only one. I think I could use ^[combine for it.

4aiman wrote:Or, if the whole case is about MT doesn't tell what to do, then I'm all for adding more info in the verbose mode. Currently even that can't tell one where to start searching for a bug.

lf l use a not existing texture, minetest informs me about it but if l use vertical_frames in a wrong way minetest crashes with "Speicherzugriffsfehler" as reason.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: memory access error caused by a "vertical_frames" animat

by 4aiman » Thu Jan 22, 2015 08:22

For the nyancat l would need 2 more rainbow textures instead of only one. I think I could use ^[combine for it.

Why not use a 2x2 textures image? Or did I get your wrong?

lf l use a not existing texture, minetest informs me about it but if l use vertical_frames in a wrong way minetest crashes with "Speicherzugriffsfehler" as reason.

Me "nein sprachen Deutch" (I don't know how to spell "I do not speak German" in German ;) but the memory access error seems to be a valid reason - the engine searches for pixels outside the actual canvas.

"Rotate" modifier only rotates image.
If it was like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
+-+-+
| | |
+-+-+


it will become
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
+-+
| |
+-+
| |
+-+


and not

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
+-+-+
| | |
+-+-+
| | |
+-+-+


Or maybe I didn't get you at all :'(
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: memory access error caused by a "vertical_frames" animat

by Hybrid Dog » Thu Jan 22, 2015 15:54

4aiman wrote:
For the nyancat l would need 2 more rainbow textures instead of only one. I think I could use ^[combine for it.

Why not use a 2x2 textures image? Or did I get your wrong?

lf l use a not existing texture, minetest informs me about it but if l use vertical_frames in a wrong way minetest crashes with "Speicherzugriffsfehler" as reason.

Me "nein sprachen Deutch" (I don't know how to spell "I do not speak German" in German ;) but the memory access error seems to be a valid reason - the engine searches for pixels outside the actual canvas.

"Rotate" modifier only rotates image.
If it was like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
+-+-+
| | |
+-+-+


it will become
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
+-+
| |
+-+
| |
+-+


and not

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
+-+-+
| | |
+-+-+
| | |
+-+-+


Or maybe I didn't get you at all :'(

Ok, a 32x32 animated rainbow texture should work, too, but like an additional image it would need more space, l think. l could use ^verticalframe to cut the animated water texture and do rainbows onto it with ^combine…
And memory access error isn't accurate enough in my opinion.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 27 guests

cron