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 - kryx

Pages: [1] 2
1
Problem solved, and it's absolutely my fault. If the socket is connected, he is deleted instead of kept (when the socket failed to connect).

2
I don't understand... If I remove the sfml part, I won't be able to use the socket, so there is no crash...

My application don't do anything else that launching a socket and connect to the server.

3
It is complete.

The crash occurs in an other thread that the main thread. This one is stucked one the line just after the "connect" function (it is a "i++" option, so nothing from there)

The application isn't doing anything else except connecting to localhost. This thread is not a thread that I have launched :/

4
Yep, there is the stack,

http://imgur.com/a/euycZ


If you want anything else, ask for it, more code, stack or test :p


5
Hello,

I don't know if you prefer a new post or a post following this topic...

I have exactly the same problem with the network package, but on Windows 10 :/

I have a server that is listening on 127.0.0.1:9000 and a client that try to connect to 127.0.0.1:9000, but the application crash at this point. No error, no exceptions.

The debugger of Visual Studio show me a stack inside msvc120.dll, but no code source from sfml or from me :/

Server:

Code: [Select]
        sf::TcpListener listener;
        listener.setBlocking(false);
        if (listener.listen(9000) != sf::Socket::Done) {
            LOG_ERROR("Unable to start listening on port ", 9000);
        }
        socket = new sf::TcpSocket();
        if (listener.accept(*socket) == sf::Socket::Done) {
                 LOG_DBUG("OK");
        }

Client:

Code: [Select]
        socket = new sf::TcpSocket();
        sf::Socket::Status statut = socket->connect("127.0.0.1", 9000, sf::seconds(10));
//Crash after this line

Thanks for your help,

K

6
Java / Re: How to build JSFML
« on: October 14, 2014, 05:55:04 pm »
Thanks a lot!

Now it isn't urgent as I have applied changes in previous version, but I'll take the 2.2 when it arrive :D

I hope that Anti-aliasing on RenderTexture will be implemented... :D (but no link here :D)

Have a nice day!

7
Java / Re: How to build JSFML
« on: October 08, 2014, 11:15:58 pm »
mmmh yes, I suppose it to...

I have compile withour error the 2.1 version, so I know that I don't do errors.
But as I don't know what I must change in JSFLM (BlendMode.java?) to work fine, I have applied some majors corrections to my 2.1 version SFML and compile it...

But if you know how to do, I am very interesting by learn it!

8
Java / Re: How to build JSFML
« on: October 08, 2014, 09:47:17 am »
I know and I understand why you don't follow the sfml-master.

But I really need this changes (it's a primary major bug) and I need to rebuild all the sources. It's done in c++, but I need only the BlendMode.java (if I have understood) to compile in jsfml

in c++, the class BlendMode evolve from:

enum BlendMode
{
    BlendAlpha,    ///< Pixel = Source * Source.a + Dest * (1 - Source.a)
    BlendAdd,      ///< Pixel = Source + Dest
    BlendMultiply, ///< Pixel = Source * Dest
    BlendNone      ///< Pixel = Source
};

to

struct SFML_GRAPHICS_API BlendMode
{

    enum Factor
    {
        Zero,             ///< (0, 0, 0, 0)
        One,              ///< (1, 1, 1, 1)
        SrcColor,         ///< (src.r, src.g, src.b, src.a)
        OneMinusSrcColor, ///< (1, 1, 1, 1) - (src.r, src.g, src.b, src.a)
        DstColor,         ///< (dst.r, dst.g, dst.b, dst.a)
        OneMinusDstColor, ///< (1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a)
        SrcAlpha,         ///< (src.a, src.a, src.a, src.a)
        OneMinusSrcAlpha, ///< (1, 1, 1, 1) - (src.a, src.a, src.a, src.a)
        DstAlpha,         ///< (dst.a, dst.a, dst.a, dst.a)
        OneMinusDstAlpha  ///< (1, 1, 1, 1) - (dst.a, dst.a, dst.a, dst.a)
    };

    enum Equation
    {
        Add,     ///< Pixel = Src * SrcFactor + Dst * DstFactor
        Subtract ///< Pixel = Src * SrcFactor - Dst * DstFactor
    };

    BlendMode();


    BlendMode(Factor sourceFactor, Factor destinationFactor, Equation blendEquation = Add);


    BlendMode(Factor colorSourceFactor, Factor colorDestinationFactor,
              Equation colorBlendEquation, Factor alphaSourceFactor,
              Factor alphaDestinationFactor, Equation alphaBlendEquation);

    ////////////////////////////////////////////////////////////
    // Member Data
    ////////////////////////////////////////////////////////////
    Factor   colorSrcFactor; ///< Source blending factor for the color channels
    Factor   colorDstFactor; ///< Destination blending factor for the color channels
    Equation colorEquation;  ///< Blending equation for the color channels
    Factor   alphaSrcFactor; ///< Source blending factor for the alpha channel
    Factor   alphaDstFactor; ///< Destination blending factor for the alpha channel
    Equation alphaEquation;  ///< Blending equation for the alpha channel
};


SFML_GRAPHICS_API bool operator ==(const BlendMode& left, const BlendMode& right);


SFML_GRAPHICS_API bool operator !=(const BlendMode& left, const BlendMode& right);

SFML_GRAPHICS_API extern const BlendMode BlendAlpha;    ///< Blend source and dest according to dest alpha
SFML_GRAPHICS_API extern const BlendMode BlendAdd;      ///< Add source to dest
SFML_GRAPHICS_API extern const BlendMode BlendMultiply; ///< Multiply source and dest
SFML_GRAPHICS_API extern const BlendMode BlendNone;     ///< Overwrite dest with source

} // namespace sf
 

9
Java / Re: How to build JSFML
« on: October 08, 2014, 08:08:31 am »
Hi,

I'm trying recompiling the news source of sfml at master into jsfml. But this seems don't work.

When I compiling, I receive the error:

JSFML-master\src\cpp/JNI/org_jsfml_graphics_SFMLNativeDrawer.cpp(25) : error C2440: 'cast de type' : impossible de convertir de 'jint' en 'sf::BlendMode'
     [exec]         Aucun constructeur n'a pu prendre le type de source, ou la résolution de la surcharge du constructeur était ambiguë
     [exec] JSFML-master\src\cpp/JNI/org_jsfml_graphics_SFMLNativeDrawer.cpp(42) : error C2440: 'cast de type' : impossible de convertir de 'jint' en 'sf::BlendMode'
     [exec]        Aucun constructeur n'a pu prendre le type de source, ou la résolution de la surcharge du constructeur était ambiguë

In fact, BlendMode.h seems to be different in sfml 2.1 and sfml-master. But I need this rebuild in my project because this is a bug in jsfml actually that don't clear properly the renderTexture on some plateforms.

Someone can maybe help me to write the good BlendMode class in java to do a nice compiling for the new sfml sources?

Thanks a lot

10
Java / Android
« on: June 16, 2014, 10:41:22 pm »
Hi,

Shall JSFML be available for IOS and Android soon? I've read that should be come^^

Thanks

11
Graphics / Re: RenderTexture won't clear properly
« on: June 16, 2014, 04:02:59 pm »
Thanks a lot.
yes, while this is not merged, I prefer not take it, to avoid bug due to this code.
But now it is merge, I'll take it, sure^^

12
Graphics / Re: RenderTexture won't clear properly
« on: June 14, 2014, 08:13:19 pm »
no no, I don't need the sfml 2.2, but i read that "needs to be reviewed, merged and the issue closed".

So I only wait a review and a merge... But if merge mean release sfml 2.2, a review is nice :D

13
Graphics / Re: RenderTexture won't clear properly
« on: June 13, 2014, 10:21:51 am »
It is fixed, but not merged to project. I work in jsfml and I canno't rebuild all versions of sfml, bot windows 32/64, mac , linux, etc... So I need an official update with this merge :/

14
Graphics / Re: RenderTexture won't clear properly
« on: June 12, 2014, 11:56:58 pm »
Up, I need really this update!

15
Graphics / Re: RenderTexture and Shapes: Fantoms Pixels
« on: May 22, 2014, 11:44:00 am »
perfect, I'm waiting it so

Pages: [1] 2
anything