Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › JPEG crashing the game

Tagged: , ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #4608

    Mathias

    Hi,

    Whenever I try to load an JPG image in my Felgo game the game crashes with output:

    “The program has unexpectedly finished.”

    With same image in PNG format it works fine. I did not find anywhere on your website talking about supported formats, but I found out that all your demo games uses PNGs. Is JPG format not supported?

    – Mathias

    #4609

    Alex
    Felgo Team

    Hi Mathias,

    in general jpeg is supported, although png is preferred on mobile devices. Can you provide some more information about your jpg? Are there any special chars or whitespaces in its file name? How are you using your jpg image (some code snippet would be of advantage!). Furthermore on which platform are you developing?

    Thanks,

    Alex

    #4610

    Christian
    Felgo Team

    Hi Mathias,

    loading jpegs should work, although we do not recommend it, because it has major disadvantages in terms of graphics memory and loading times on mobile devices. Thus please use pngs. You could also send us the jpg, so we can try to load it, with the information which OS you are running on.

    Cheers, Chris

    #4611

    Mathias

    Thanks for the fast reply. I tried with different kind of images of different resolution, sizes and file names before i found out that the problem was with the file format. I simply tried to replace the images in one of your demos with my jpg image and it would not build any more.

    Here is the code I tried to build locally in my Qt Creator on Ubuntu using Desktop as target:

    import VPlay 1.0 // for the gaming components
    import QtQuick 1.1 // for the Image element
     GameWindow {
         activeScene: scene
         width: 720
         height: 1280
         Scene {
             id: scene
             anchors.fill: parent
             Image {
                 id: bg
                 anchors.fill: parent
                 source: "img/bg1.jpg"
             }
         }
     }

    When exchanging the image to bg1.png it works fine. The reason why i would like to use jpg instead of png for some of the art in my game is that the PNG almost three times larger in filesize than corresponding JPG.

    #4612

    Alex
    Felgo Team

    Ok, that’s a rather simple snippet. 😉 As Chris already mentioned, could you please send us the jpg to team@felgo.com so that we’re able to further debug this problem?

    Thanks,

    Alex

    #4613

    Mathias

    The problem is same for any JPEG image really, not only the background I created. As soon as I convert the image to PNG it starts working. I have the same problem when trying to build with both Qt 4.7 and Qt 4.8. I sent you the image and my log file so you can try to reproduce the error. I’m using Ubuntu 12.04 and I installed Qt Creator 2.4.1 using your Felgo installer.

    I will use PNG for my project for now. Hopefully you will find out what might be causing this problem.

    Best Regards,

    Mathias

    #4624

    Alex
    Felgo Team

    Hi Mathias,

    I could not reproduce the crash, both on Mac OS X and on Ubuntu 12. I however noticed (from your sent log output) that your project is probably building against the wrong Qt version. Our SDK comes with Qt 4.8.1, your project however uses 4.7.4 (which is probably pre-installed on your machine). Can you please open the “Projects” tab on the left (while your project is opened in Qt Creator) and ensure that Qt version 4.8.1 is selected (like in this screenshot: http://d.pr/i/woTZ )?

    Thanks,

    Alex

    #4706

    Mathias

    I have tried with different versions of the sdk. Unfortunately the problem remains also with version 4.8.1. My workaround has been to use only PNGs for my project.

    #4709

    Alex
    Felgo Team

    Hi,

    could you please post us a screenshot of the “Project” tab (while your crashing project is opened) within Qt Creator? Seems to be still a configuration issue.

    Thanks,

    Alex

    #4730

    Mathias
    #4756

    Mathias

    After some more testing:

    The jpg crashing did NOT happen when I build the game for my Harmattan device, only when trying to build on desktop. I have not tried to build for iPhone or android yet but I guess it will work since that is running on your build server.

    Here is an other interesting issue I came across when building on desktop:
    http://postimg.org/image/3tlp3k2pn/

    As you can see the image to the left is rendered correctly. The left image was created using GIMP. I then saved the same image as JPG, reopened it using GIMP and resaved it as a PNG. This image is on the right and you can see when the image is overlapping the image is not rendered correctly. On my Harmattan phone it is how ever rendered as expected, and hopefully on iPhone and Android too.

     

    – Mathias

    #4760

    Alex
    Felgo Team

    Hi Mathias,

    we are currently testing the jpg issue with a fresh installation of Ubuntu 12.04 again and will come back to you as soon as we have some results.

    Regarding your second issue: Against which version of Felgo SDK are your currently building (you should find this info in the SDKMaintenanceTool when selecting “Package manager” or “Update components”)? This looks like a minor alpha channel issue which we already fixed with the latest Pro version 1.3.0.

    Thanks,
    Alex

    #4785

    Alex
    Felgo Team

    Hi Mathias,

    we tested on a fresh installation again and everything is working as expected with jpgs. We currently suspect an incompatible version of libjpeg on your system (Felgo ships with its own version, but probably a system library gets linked even before ours). Could you please add the following line to the end of your project file, run qmake from the Build menu and post us the Compile output?

    message(LIBS: $$LIBS)

    Furthermore, could you please run

    locate libjpeg

    in a terminal an post us the output too?

    You can also send us your log output to contact@felgo.com if you do’nt want to post your system’s output her. 🙂

    Thanks a lot,

    Alex

Viewing 13 posts - 1 through 13 (of 13 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded