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

Pages: [1]
1
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: October 16, 2012, 09:38:53 pm »
I never had crashes there before.
According to what I see in the backtrace, this happens when you press the mouse button, right?

unfocusAllObjects can't crash if no objects were created. The only thing I can think of is that somehow the m_FocusedObject variable is messed up, but it is changed in many places.

Could you show a minimal example of how to reproduce this crash?
Some other info might also help (OS, compiler, static/dynamic linking).

I don't know what you meant with linking to openGL so I made a code::blocks project which links to SFML 2.0 and has the TGUI source in it. There is some very minimal code in the main file which reproduces the crash. You might have to change the location of your SFML lib files in the project settings to get it to compile.

For some extra info: I'm using Ubuntu 12.04 x64 with gcc 4.6.3. Let me know if you find anything interesting or need anything else!

(The project was too large to attach to the post so I sent you a PM with a link.)

2
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: October 16, 2012, 12:46:28 pm »
Could you show a minimal example of how to reproduce this crash?
Some other info might also help (OS, compiler, static/dynamic linking).

It turns out there were objects attached to the window at the time of the crash. I removed all objects from the window before the crash point and the crash stopped happening. At that point I decided to simplify my code to make it easier to make a minimal example. After simplifying the code, the crash is no longer there. (yes I removed the remove all objects part)

I was displaying an alert window in the form of a button and every time I wanted to show another alert I would create another button. At the point of the crash, all alert buttons should have been deleted; which apparently was not the case. In my simplified code, I use one button and just change the text for each new alert. (Which is much more elegant for my implementation.) I assume it was just bad code on my part. Thanks for your help.

3
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: October 15, 2012, 08:10:02 pm »
I just upgraded from V0.4 to V0.5 (and SFML 1.6 -> 2.0) and after changing the broken methods I've been noticing some segfaults that weren't there before.

A backtrace shows it happening when the window handles events.
Code: [Select]
#0  0x00000000682e7473 in ?? ()
#1  0x000000000042e2e8 in tgui::EventManager::unfocusAllObjects (this=0x9920a8)
    at /home/*****/Desktop/WarBound/src/TGUI/EventManager.cpp:346
#2  0x000000000042d984 in tgui::EventManager::handleEvent (this=0x9920a8,
    event=...) at /home/*****/Desktop/WarBound/src/TGUI/EventManager.cpp:122
#3  0x0000000000511980 in tgui::Window::handleEvent (this=0x992020, event=...)
    at /home/*****/Desktop/WarBound/src/TGUI/Window.cpp:93
#4  0x000000000051c902 in ClientGame::gameLoop (this=0x7faee0)
    at /home/*****/Desktop/WarBound/src/client.cpp:181
#5  0x000000000051fe87 in main (argc=1, argv=0x7fffffffe1f8)
    at /home/*****/Desktop/WarBound/src/client.cpp:563

I thought it would be from me handling my callbacks incorrectly but in this section of code there are no callbacks being processed. i.e. my code for the callbacks in that section is:

Code: [Select]
tgui::Callback callback;
while(window->getCallback(callback))
{
  continue;
}

It might also be good to mention that I don't have any active objects attached to the window at the point of the segfault.

Let me know what you think about this new way of handling callbacks.
Any ideas, comments or critics are welcome.

I think that is a wonderful idea. I was just thinking that callbacks should have this functionality.

4
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: July 07, 2012, 08:49:41 pm »
Hi. I did a little looking at the documentation that you have and I couldn't really devise a way to make the text boxes lose focus when you click out of them. Am I missing something? Aside from that I've been enjoying using your library.

Thanks.

Pages: [1]
anything