Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Edimartin

Pages: [1]
1
General / Re: SFML with Steam SDK crash on linux.
« on: March 09, 2022, 10:08:08 pm »
Hi exploiter.
I download SFML source code and I compile it with "cmake CMakeList.txt" and "makefile -j 4". I try now compile using the command "make" without the "-j 4" and it runs the same bug.

I make the qtcreator project and I run it with the gdb in qtcreator. When it crash, the IDE shows the tree:

1  ??                                                                                                                                          
2  __pthread_once_slow                                                                                        pthread_once.c 116 0x7ffff753547f
3  llvm::ManagedStaticBase::RegisterManagedStatic(void * ( *)(), void ( *)(void *)) const                                        0x7ffff066530a
4  ??                                                                                                                            0x7ffff04f2e94
5  ??                                                                                                                            0x7ffff7fe0b8a
6  ??                                                                                                                            0x7ffff7fe0c91
7  _dl_catch_exception                                                                                                           0x7ffff7ab6895
8  ??                                                                                                                            0x7ffff7fe542d
9  _dl_catch_exception                                                                                                           0x7ffff7ab6838
10 ??                                                                                                                            0x7ffff7fe45fa
11 ??                                                                                                                            0x7ffff751f34c
12 _dl_catch_exception                                                                                                           0x7ffff7ab6838
13 _dl_catch_error                                                                                                               0x7ffff7ab6903
14 ??                                                                                                                            0x7ffff751fb59
15 dlopen                                                                                                                        0x7ffff751f3da
16 glPrimitiveBoundingBox                                                                                                        0x7ffff7140762
17 glPrimitiveBoundingBox                                                                                                        0x7ffff714085d
18 ??                                                                                                                            0x7ffff7120085
19 ??                                                                                                                            0x7ffff7135dee
20 ??                                                                                                                            0x7ffff71275f9
21 ??                                                                                                                            0x7ffff7122dd4
22 ??                                                                                                                            0x7ffff7123472
23 sfglx_LoadFunctions                                                                                                           0x7ffff7f1d430
24 sf::priv::GlxContext::GlxContext(sf::priv::GlxContext *)                                                                      0x7ffff7f1cdb5
25 sf::priv::GlContext::initResource()                                                                                           0x7ffff7f0b927
26 sf::Window::Window()                                                                                                          0x7ffff7f0deb3
27 sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)                    0x7ffff7f75a9d
28 main                                                                                                       main.cpp       17  0x5555555553d7

 

And the line 17 have this:

sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
 

I hope you guys can fix this in future versions of SFML.
I try make some programs with SDL 2.0, GLFW and ALLEGRO and the three librarys run the window with steam SDK without crash.

2
General / Re: SFML with Steam SDK crash on linux.
« on: March 09, 2022, 12:17:45 am »
Hi.

Thank you Exploiter to the help.

I change the order of the librarys and I write this in the .pro file:

LIBS += -lsfml-graphics -lsfml-window -lsfml-system

unix:!macx: LIBS += -L$$PWD/lib/linux64/ -lsdkencryptedappticket -lsteam_api
 

I have the same problem. The software crash in line:

sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
 

The debugger (or the IDE), when crash, show a popup with the name "Signal Received" with this message:

The inferior stopped because it received a signal from the operating system.

Signal name : SIGSEGV
Signal meaning : Segmentation fault
 

I test in Windows 7 with the MinGW Builds 7.3.0 (64-bit) (the link is in SFML download page)  and it runs OK. I test and if I press shift+tab, the screen shows the steam menu.

Thank you verry much. I will see the tutorial.

If the problem persist. I will comment the problem here.

3
General / SFML with Steam SDK crash on linux.
« on: March 06, 2022, 11:33:25 pm »
Hi. I am developing my first game for steam. It's a 2D game with SFML and OpenGL in Linux.

I am developing in Linux Mint with XFCE:

OS: Linuxmint 20.3 una
Kernel: x86_64 Linux 5.4.0-100-generic
Uptime: 52m
Packages: 3127
Shell: bash
Resolution: 3286x1080
DE: Xfce
WM: Xfwm4
WM Theme: Mint-Y
GTK Theme: Mint-Y [GTK2]
Icon Theme: Mint-Y
Font: Ubuntu 10
Disk: 383G / 598G (68%)
CPU: Intel Core i5-3330 @ 4x 3.2GHz [51.0°C]
GPU: NVE4
RAM: 3675MiB / 15971MiB
 

I have one C++ project using the QTcreator IDE. I compile SFML for my linux and I am using the lates version 2.5.1.
I download the steam SDK from this link https://partner.steamgames.com/downloads/steamworks_sdk.zip and I attach the library in my QTcreator project.

The problem is when I add the steam lib it crash. In debug it crash when I declare the sf::RenderWindow window;

I create another project with just an SFML example:

#include <SFML/Graphics.hpp>

int main()
{
    // create the window
    sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

    // run the program as long as the window is open
    while (window.isOpen())
    {
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (window.pollEvent(event))
        {
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)
                window.close();
        }

        // clear the window with black color
        window.clear(sf::Color::Black);

        // draw everything here...
        // window.draw(...);

        // end the current frame
        window.display();
    }

    return 0;
}
 

And I attach the SFML and Steam SDK in my project using this command in project.pro:

LIBS += -lsfml-system -lsfml-window -lsfml-graphics

LIBS += -L$$PWD/lib/linux64/ -lsdkencryptedappticket -lsteam_api
 

It compiles very good, but when I run the project in debug mode, it crash exacly in this line:

sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

Have someone try to make an SFML project with steam SDK in linux?
I try compile and run it in release mode but in crashes aready.

4
Hi eXpl0it3r.
I make a mistake about the character tex from SFML.

The link you send have a code with testing if the character is smaller than 128, but the special UTF8 characters are bigger than 128.
I change it and it solved my problem.

Thanks. ;D

5
Hi eXpl0it3r.

As the SFML don't have this brazillian keys, i fixed this in the SFML source code in Linux. I hope you guys from the project can add it on the next version.

I found the X11 keys and I discover that keys are dead keys (don't know what does this mean).

Then I go on the file include/SFML/Window/Keyboard.hpp and I add this:
//here the add begin
        cCedilla,
        grave,
        acute,
        circumflex,
        tilde,
        macron,
        breve,
        abovedot,
        diaeresis,
        abovering,
        doubleacute,
        caron,
        cedilla,
        ogonek,
        iota,
        voicedSound,
        semivoicedSound,
        belowdot,
        hook,
        horn,
        //here the add end

        KeyCount,     ///< Keep last -- the total number of keyboard keys

And I go on the file src/SFML/Window/Unix/WindowImplX11.cpp and I add this code in function keysymToSF:
case XK_9:            return sf::Keyboard::Num9;
            //Here the add begin
            case XK_ccedilla:     return sf::Keyboard::cCedilla;
            case XK_cedilla:      return sf::Keyboard::cedilla;
            case XK_dead_grave:   return sf::Keyboard::grave;
            case XK_dead_acute:   return sf::Keyboard::acute;
            case XK_dead_circumflex: return sf::Keyboard::circumflex;
            case XK_dead_tilde:   return sf::Keyboard::tilde;
            case XK_dead_macron:  return sf::Keyboard::macron;
            case XK_dead_breve:   return sf::Keyboard::breve;
            case XK_dead_abovedot: return sf::Keyboard::abovedot;
            case XK_dead_diaeresis: return sf::Keyboard::diaeresis;
            case XK_dead_abovering: return sf::Keyboard::abovering;
            case XK_dead_doubleacute: return sf::Keyboard::doubleacute;
            case XK_dead_caron:   return sf::Keyboard::caron;
            case XK_dead_cedilla: return sf::Keyboard::cedilla;
            case XK_dead_ogonek:  return sf::Keyboard::ogonek;
            case XK_dead_iota:    return sf::Keyboard::iota;
            case XK_dead_voiced_sound: return sf::Keyboard::voicedSound;
            case XK_dead_semivoiced_sound: return sf::Keyboard::semivoicedSound;
            case XK_dead_belowdot: return sf::Keyboard::belowdot;
            case XK_dead_hook:    return sf::Keyboard::hook;
            case XK_dead_horn:    return sf::Keyboard::horn;
            //here the add end
        }

With this code, the events return the code of the key and not -1.

Thanks for the help.

PS: I merge two cedilla in one because one is dead and another is not. It's because I don't know hou SFML will have it in the future. I think my keyboard shoud use it but it use's the cCedilla (cedilla in the C letter).
I hope you can fix it creating two different cedillas.

6
Hi. Thanks for the explanation.
Unfortunately ti didn't work  :(. I press tilde two times and the ~ character appears but the '~' with 'a' to make 'ã' and it doesn't return.

I will test older versions of SFML.

Thank you very much.

7
Hi.
I am using SFML to make a game where the player can write text. I am making a text field to get the pressed keys from keyboard. I am having some problem with my ABNT2 keyboard.

I write this code for test:
#include <SFML/Graphics.hpp>
#include <SFML/Config.hpp>

int main()
{
    // create the window
    sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

    printf("\n%u %s %s SFML version == %u.%u.%u\n",__LINE__,__FILE__,__func__
           ,SFML_VERSION_MAJOR
           ,SFML_VERSION_MINOR
           ,SFML_VERSION_PATCH
           );fflush(stdout);

    // run the program as long as the window is open
    while (window.isOpen())
    {
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (window.pollEvent(event))
        {
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)
                window.close();

            //read the key pressed
            if(event.type == sf::Event::KeyPressed){
                printf("\n%u %s %s Key Pressed code == %d",__LINE__,__FILE__,__func__
                       ,event.key.code
                       );fflush(stdout);
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::Tilde)){
                    // left key is pressed: move our character
                    printf(" TILDE PRESSED");fflush(stdout);
                }
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::Quote)){
                    // left key is pressed: move our character
                    printf(" QUOTE PRESSED");fflush(stdout);
                }
            }
        }

        // clear the window with black color
        window.clear(sf::Color::Black);

        // draw everything here...
        // window.draw(...);

        // end the current frame
        window.display();
    }

    return 0;
}
 

When I run the program, I press first the quote key '´' one time and then I press the tilde key '~' and I have this return:
$ ./helloSFML

9 main.cpp main SFML version == 2.5.1

28 main.cpp main Key Pressed code == -1 TILDE PRESSED
28 main.cpp main Key Pressed code == -1^C

Is this a problem with the last SFML version? Maybe I could try another old version.
How can I solve this problem?

I am using linux mint "4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux" with XFCE 4.12 with G++ "g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0".

Thanks.

8
Graphics / Re: JPEG error in Windows 64 bits
« on: February 26, 2015, 08:02:45 pm »
Thanks. I will try with the last SFML source code in Windows.

I am using Windows only to compile the last versions. I am developing the project in Linux 64.

9
Graphics / JPEG error in Windows 64 bits
« on: February 24, 2015, 04:33:28 pm »
Hi. I am making a Game Engine for my Conclusion Work in College. To be multi-plataform I chose SFML to make Linux and Windows versions of the same game.

I create a simple plataform project to show the Game Engine features. I am using both JPEG and PNG files to create the game design.

In Linux 64 bits the game runs OK. In Windows I use the MinGW 32 and 64 for Windows 32 and 64 versions and I have this problem.

SFML return this error message in Windows 64 version:

Failed to load image from memory. Reason : JPEG format not supported (progressive)

Why?

Pages: [1]
anything