Re: [E-devel] Edje aspect.preference big-endian issue
On Wed, 18 Jan 2012 01:01:45 -0500 Youness Alaoui kakar...@kakaroto.homelinux.net said: i expected you would have already... ? commit! :) hehe, well, I just looked over edje_private.h and I didn't see any enum being used like aspect_preference was.Although maybe it's best if someone else had a quick look. I'm going to commit the patch I had as is. On Tue, Jan 17, 2012 at 11:06 PM, Carsten Haitzler ras...@rasterman.comwrote: On Fri, 13 Jan 2012 22:47:38 +0100 Cedric BAIL cedric.b...@free.fr said: On Fri, Jan 13, 2012 at 8:30 PM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: On Fri, Jan 13, 2012 at 10:32 AM, Cedric BAIL cedric.b...@free.fr wrote: On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: I've had an issue recently when I tried to run my app (using edje) on the PS3, the aspect ratio of all the images were wrong, and it looked really bad. I investigated the issue and found out that the aspect_preference was the cause and that when it's set to 'BOTH' for example, the desc-aspect.prefer value is 50331648 which is.. 0x300 .. so it's a big endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in the enum is '3'. So I figured the reading of the .edj is wrong, so I looked and it seems to read it as a 'EET_T_CHAR', but the structure contains the enum as type, which makes it an int.. so what happens is that it stores 1 byte (the char) in the 32bit variable.. on little endian, it's fine, it works, but on big endian, it makes the value huge. So I fixed it by changing the declaration of he 'aspect.prefer' structure to a char instead of the enum it represents. I tested and it seems to work and not break anything (and fixes the bug). However, since this seems a bit sensitive, I thought it's best to send the patch here to make sure I'm not doing something wrong. Thanks for reviewing this simple one liner patch : http://pastie.org/3176835 I have noticed other structures do the same thing, 'fill mode' for example is defined as EET_T_UCHAR in the eet data description and as 'unsigned char' in the structure, that's why I fixed it this way. Note also that this shouldn't break the .edj file's compatibility or anything. Good, you figured out why it was broken. The fix sounds fine for me. Did you check that the only enum, we are using directly in one of our saved structure or should I check ? Ok cool, I will commit it then. I checked and didn't see any other enum being used, but I didn't do an extensive check. I will make sure it was the only one and fix any other I might see. Cool, thanks ! awesome. all handled before i got to it! eexcellent! :) -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Edje aspect.preference big-endian issue
No, I hadn't cause I got quite busy with something else, and I still needed to take the time to check if there were any other enums affected by the same kind of bug. I committed it yesterday though. On Wed, Jan 18, 2012 at 3:04 AM, Carsten Haitzler ras...@rasterman.comwrote: On Wed, 18 Jan 2012 01:01:45 -0500 Youness Alaoui kakar...@kakaroto.homelinux.net said: i expected you would have already... ? commit! :) hehe, well, I just looked over edje_private.h and I didn't see any enum being used like aspect_preference was.Although maybe it's best if someone else had a quick look. I'm going to commit the patch I had as is. On Tue, Jan 17, 2012 at 11:06 PM, Carsten Haitzler ras...@rasterman.comwrote: On Fri, 13 Jan 2012 22:47:38 +0100 Cedric BAIL cedric.b...@free.fr said: On Fri, Jan 13, 2012 at 8:30 PM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: On Fri, Jan 13, 2012 at 10:32 AM, Cedric BAIL cedric.b...@free.fr wrote: On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: I've had an issue recently when I tried to run my app (using edje) on the PS3, the aspect ratio of all the images were wrong, and it looked really bad. I investigated the issue and found out that the aspect_preference was the cause and that when it's set to 'BOTH' for example, the desc-aspect.prefer value is 50331648 which is.. 0x300 .. so it's a big endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in the enum is '3'. So I figured the reading of the .edj is wrong, so I looked and it seems to read it as a 'EET_T_CHAR', but the structure contains the enum as type, which makes it an int.. so what happens is that it stores 1 byte (the char) in the 32bit variable.. on little endian, it's fine, it works, but on big endian, it makes the value huge. So I fixed it by changing the declaration of he 'aspect.prefer' structure to a char instead of the enum it represents. I tested and it seems to work and not break anything (and fixes the bug). However, since this seems a bit sensitive, I thought it's best to send the patch here to make sure I'm not doing something wrong. Thanks for reviewing this simple one liner patch : http://pastie.org/3176835 I have noticed other structures do the same thing, 'fill mode' for example is defined as EET_T_UCHAR in the eet data description and as 'unsigned char' in the structure, that's why I fixed it this way. Note also that this shouldn't break the .edj file's compatibility or anything. Good, you figured out why it was broken. The fix sounds fine for me. Did you check that the only enum, we are using directly in one of our saved structure or should I check ? Ok cool, I will commit it then. I checked and didn't see any other enum being used, but I didn't do an extensive check. I will make sure it was the only one and fix any other I might see. Cool, thanks ! awesome. all handled before i got to it! eexcellent! :) -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio,
Re: [E-devel] Edje aspect.preference big-endian issue
On Fri, 13 Jan 2012 22:47:38 +0100 Cedric BAIL cedric.b...@free.fr said: On Fri, Jan 13, 2012 at 8:30 PM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: On Fri, Jan 13, 2012 at 10:32 AM, Cedric BAIL cedric.b...@free.fr wrote: On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: I've had an issue recently when I tried to run my app (using edje) on the PS3, the aspect ratio of all the images were wrong, and it looked really bad. I investigated the issue and found out that the aspect_preference was the cause and that when it's set to 'BOTH' for example, the desc-aspect.prefer value is 50331648 which is.. 0x300 .. so it's a big endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in the enum is '3'. So I figured the reading of the .edj is wrong, so I looked and it seems to read it as a 'EET_T_CHAR', but the structure contains the enum as type, which makes it an int.. so what happens is that it stores 1 byte (the char) in the 32bit variable.. on little endian, it's fine, it works, but on big endian, it makes the value huge. So I fixed it by changing the declaration of he 'aspect.prefer' structure to a char instead of the enum it represents. I tested and it seems to work and not break anything (and fixes the bug). However, since this seems a bit sensitive, I thought it's best to send the patch here to make sure I'm not doing something wrong. Thanks for reviewing this simple one liner patch : http://pastie.org/3176835 I have noticed other structures do the same thing, 'fill mode' for example is defined as EET_T_UCHAR in the eet data description and as 'unsigned char' in the structure, that's why I fixed it this way. Note also that this shouldn't break the .edj file's compatibility or anything. Good, you figured out why it was broken. The fix sounds fine for me. Did you check that the only enum, we are using directly in one of our saved structure or should I check ? Ok cool, I will commit it then. I checked and didn't see any other enum being used, but I didn't do an extensive check. I will make sure it was the only one and fix any other I might see. Cool, thanks ! awesome. all handled before i got to it! eexcellent! :) -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Edje aspect.preference big-endian issue
hehe, well, I just looked over edje_private.h and I didn't see any enum being used like aspect_preference was.Although maybe it's best if someone else had a quick look. I'm going to commit the patch I had as is. On Tue, Jan 17, 2012 at 11:06 PM, Carsten Haitzler ras...@rasterman.comwrote: On Fri, 13 Jan 2012 22:47:38 +0100 Cedric BAIL cedric.b...@free.fr said: On Fri, Jan 13, 2012 at 8:30 PM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: On Fri, Jan 13, 2012 at 10:32 AM, Cedric BAIL cedric.b...@free.fr wrote: On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: I've had an issue recently when I tried to run my app (using edje) on the PS3, the aspect ratio of all the images were wrong, and it looked really bad. I investigated the issue and found out that the aspect_preference was the cause and that when it's set to 'BOTH' for example, the desc-aspect.prefer value is 50331648 which is.. 0x300 .. so it's a big endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in the enum is '3'. So I figured the reading of the .edj is wrong, so I looked and it seems to read it as a 'EET_T_CHAR', but the structure contains the enum as type, which makes it an int.. so what happens is that it stores 1 byte (the char) in the 32bit variable.. on little endian, it's fine, it works, but on big endian, it makes the value huge. So I fixed it by changing the declaration of he 'aspect.prefer' structure to a char instead of the enum it represents. I tested and it seems to work and not break anything (and fixes the bug). However, since this seems a bit sensitive, I thought it's best to send the patch here to make sure I'm not doing something wrong. Thanks for reviewing this simple one liner patch : http://pastie.org/3176835 I have noticed other structures do the same thing, 'fill mode' for example is defined as EET_T_UCHAR in the eet data description and as 'unsigned char' in the structure, that's why I fixed it this way. Note also that this shouldn't break the .edj file's compatibility or anything. Good, you figured out why it was broken. The fix sounds fine for me. Did you check that the only enum, we are using directly in one of our saved structure or should I check ? Ok cool, I will commit it then. I checked and didn't see any other enum being used, but I didn't do an extensive check. I will make sure it was the only one and fix any other I might see. Cool, thanks ! awesome. all handled before i got to it! eexcellent! :) -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Edje aspect.preference big-endian issue
Hi, On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: I've had an issue recently when I tried to run my app (using edje) on the PS3, the aspect ratio of all the images were wrong, and it looked really bad. I investigated the issue and found out that the aspect_preference was the cause and that when it's set to 'BOTH' for example, the desc-aspect.prefer value is 50331648 which is.. 0x300 .. so it's a big endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in the enum is '3'. So I figured the reading of the .edj is wrong, so I looked and it seems to read it as a 'EET_T_CHAR', but the structure contains the enum as type, which makes it an int.. so what happens is that it stores 1 byte (the char) in the 32bit variable.. on little endian, it's fine, it works, but on big endian, it makes the value huge. So I fixed it by changing the declaration of he 'aspect.prefer' structure to a char instead of the enum it represents. I tested and it seems to work and not break anything (and fixes the bug). However, since this seems a bit sensitive, I thought it's best to send the patch here to make sure I'm not doing something wrong. Thanks for reviewing this simple one liner patch : http://pastie.org/3176835 I have noticed other structures do the same thing, 'fill mode' for example is defined as EET_T_UCHAR in the eet data description and as 'unsigned char' in the structure, that's why I fixed it this way. Note also that this shouldn't break the .edj file's compatibility or anything. Good, you figured out why it was broken. The fix sounds fine for me. Did you check that the only enum, we are using directly in one of our saved structure or should I check ? Regards, -- Cedric BAIL -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Edje aspect.preference big-endian issue
On Fri, Jan 13, 2012 at 10:32 AM, Cedric BAIL cedric.b...@free.fr wrote: Hi, On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: I've had an issue recently when I tried to run my app (using edje) on the PS3, the aspect ratio of all the images were wrong, and it looked really bad. I investigated the issue and found out that the aspect_preference was the cause and that when it's set to 'BOTH' for example, the desc-aspect.prefer value is 50331648 which is.. 0x300 .. so it's a big endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in the enum is '3'. So I figured the reading of the .edj is wrong, so I looked and it seems to read it as a 'EET_T_CHAR', but the structure contains the enum as type, which makes it an int.. so what happens is that it stores 1 byte (the char) in the 32bit variable.. on little endian, it's fine, it works, but on big endian, it makes the value huge. So I fixed it by changing the declaration of he 'aspect.prefer' structure to a char instead of the enum it represents. I tested and it seems to work and not break anything (and fixes the bug). However, since this seems a bit sensitive, I thought it's best to send the patch here to make sure I'm not doing something wrong. Thanks for reviewing this simple one liner patch : http://pastie.org/3176835 I have noticed other structures do the same thing, 'fill mode' for example is defined as EET_T_UCHAR in the eet data description and as 'unsigned char' in the structure, that's why I fixed it this way. Note also that this shouldn't break the .edj file's compatibility or anything. Good, you figured out why it was broken. The fix sounds fine for me. Did you check that the only enum, we are using directly in one of our saved structure or should I check ? Ok cool, I will commit it then. I checked and didn't see any other enum being used, but I didn't do an extensive check. I will make sure it was the only one and fix any other I might see. Thanks, KaKaRoTo Regards, -- Cedric BAIL -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Edje aspect.preference big-endian issue
On Fri, Jan 13, 2012 at 8:30 PM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: On Fri, Jan 13, 2012 at 10:32 AM, Cedric BAIL cedric.b...@free.fr wrote: On Fri, Jan 13, 2012 at 8:12 AM, Youness Alaoui kakar...@kakaroto.homelinux.net wrote: I've had an issue recently when I tried to run my app (using edje) on the PS3, the aspect ratio of all the images were wrong, and it looked really bad. I investigated the issue and found out that the aspect_preference was the cause and that when it's set to 'BOTH' for example, the desc-aspect.prefer value is 50331648 which is.. 0x300 .. so it's a big endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in the enum is '3'. So I figured the reading of the .edj is wrong, so I looked and it seems to read it as a 'EET_T_CHAR', but the structure contains the enum as type, which makes it an int.. so what happens is that it stores 1 byte (the char) in the 32bit variable.. on little endian, it's fine, it works, but on big endian, it makes the value huge. So I fixed it by changing the declaration of he 'aspect.prefer' structure to a char instead of the enum it represents. I tested and it seems to work and not break anything (and fixes the bug). However, since this seems a bit sensitive, I thought it's best to send the patch here to make sure I'm not doing something wrong. Thanks for reviewing this simple one liner patch : http://pastie.org/3176835 I have noticed other structures do the same thing, 'fill mode' for example is defined as EET_T_UCHAR in the eet data description and as 'unsigned char' in the structure, that's why I fixed it this way. Note also that this shouldn't break the .edj file's compatibility or anything. Good, you figured out why it was broken. The fix sounds fine for me. Did you check that the only enum, we are using directly in one of our saved structure or should I check ? Ok cool, I will commit it then. I checked and didn't see any other enum being used, but I didn't do an extensive check. I will make sure it was the only one and fix any other I might see. Cool, thanks ! -- Cedric BAIL -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Edje aspect.preference big-endian issue
Hi, I've had an issue recently when I tried to run my app (using edje) on the PS3, the aspect ratio of all the images were wrong, and it looked really bad. I investigated the issue and found out that the aspect_preference was the cause and that when it's set to 'BOTH' for example, the desc-aspect.prefer value is 50331648 which is.. 0x300 .. so it's a big endian vs. little endian issue since the EDJE_ASPECT_PREFER_BOTH value in the enum is '3'. So I figured the reading of the .edj is wrong, so I looked and it seems to read it as a 'EET_T_CHAR', but the structure contains the enum as type, which makes it an int.. so what happens is that it stores 1 byte (the char) in the 32bit variable.. on little endian, it's fine, it works, but on big endian, it makes the value huge. So I fixed it by changing the declaration of he 'aspect.prefer' structure to a char instead of the enum it represents. I tested and it seems to work and not break anything (and fixes the bug). However, since this seems a bit sensitive, I thought it's best to send the patch here to make sure I'm not doing something wrong. Thanks for reviewing this simple one liner patch : http://pastie.org/3176835 I have noticed other structures do the same thing, 'fill mode' for example is defined as EET_T_UCHAR in the eet data description and as 'unsigned char' in the structure, that's why I fixed it this way. Note also that this shouldn't break the .edj file's compatibility or anything. Thanks, KaKaRoTo -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel