Forum
Sign Up

Bug report: QTitanRibbon assert failure with unexpected WindowFrameSection

5 years 2 months ago #1 by 无锡飞谱电子信息技术有限公司
In QTitanRibbon 5.1.0, the following function:
int QTITAN_PREPEND_NAMESPACE(qtn_get_sys_command_win)(QWidget* window, QMouseEvent* event,
Qt::WindowFrameSection frameSection):


in my case, the frameSection sometimes is assigned as Qt::NoSection, and so it will lead to the assert failure in the following line:
case Qt::TitleBarArea:
if (event->type() == QEvent::MouseButtonDblClick)
{
if (event->button() == Qt::LeftButton)
{
if (window->isMaximized())
command = SC_RESTORE;
else
command = SC_MAXIMIZE;
}
}
else
command = SC_MOVE | 0x0002;

break;
default:
Q_ASSERT(false);
break;
}
return command;


I doubted whether this assertion failure is expected?

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago - 5 years 2 months ago #3 by Developer Machines
Strangely enough, this error was fixed in 5.1. How did you reproduce it? Could you describe your actions?
Last edit: 5 years 2 months ago by Developer Machines.

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #4 by 无锡飞谱电子信息技术有限公司
Sometimes, this error happened when my GUI application starts up without maximization. I can copy the calling stack to you once this error happened.

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #5 by Developer Machines
Please send a call-stack to the This email address is being protected from spambots. You need JavaScript enabled to view it..

Is it possible to reproduce the bug with our demo examples?

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #6 by Michael
Today I switched to QTitanRibbon 5.1 with Qt 5.12.5 VS64 2017 and althou have an issue with an assert.
I removed the Windows Title bar:

ribbonBar()->setFrameThemeEnabled();

If I then close the application i get the following assert as in the attached screenshot.

File QtnPlatform_win.cpp
line: 398
instruction: Q_ASSERT(m_hookHash.size() == 0);

I commented it out, no I can close my application without an assert.
Is this line realy necessary?

Regards
Michael
Attachments:

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.171 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )