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

Pages: [1]
1
Hello,
I've just followed the example as in the tutorial (https://www.sfml-dev.org/tutorials/1.6/graphics-qt.php), but if that is not correct it would be great to mark it as incorrect or just delete the page. I don't see how should it be done if not deriving from sf::RenderWindow.

The way we solved it is by rebuilding the SFML with all the methods from AutoreleasePoolWrapper.mm commented so the memory management is done only by Qt.

It seems to be the same issue as reported in https://github.com/SFML/SFML/issues/1549

Thanks!

2
Hello!
While integrating SFML (2.5.1) with Qt (5.15.2) in macOS I found that I can't delete an object that inherits from both QWidget and sf::RenderWindow because it crashes. The message the debug console shows before crashing is:

Cannot close SFML area when SFML is integrated in a NSView.
Cannot close SFML area when SFML is integrated in a NSView.
2021-07-29 13:18:42.123407+0200 sfmlqt[79650:1336970] Premature drain of QMacAutoReleasePool(0x7ffee7eab8a8) This can happen if you've allocated the pool on the heap, or as a member of a heap-allocated object. This is not a supported use of QMacAutoReleasePool, and might result in crashes when objects in the pool are deallocated and then used later on under the assumption they will be valid until QMacAutoReleasePool(0x7ffee7eab8a8) has been drained.


I've made a minimal example (see code files attached) in order to reproduce the crash. It is a program with two widgets, the one that inherits from QWidget and sf::RenderWindow (called WindowWidget) and a button that destroys the WindowWidget when it is clicked.

In Windows it works fine.

Am I missing something? Is there a reason I can't delete that object? Is there any workaround?

Thanks in advance

Pages: [1]