Author Topic: wxSmith assert in wx30 builds due to rev 10392  (Read 10822 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
wxSmith assert in wx30 builds due to rev 10392
« on: May 07, 2016, 11:57:51 am »
This commit makes cb emit wx warnings for duplicate properties added to wxpropgrid. And indeed the "default min size" is added twice. The assert triggers even in a minimal wxsmith based project when I click on the static text or any of the buttons.

@Jens: Do you remember why this commit is needed? If not I'll just revert it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #1 on: May 07, 2016, 05:33:21 pm »
I only have it once, as far as I know.
it was added because it was just no there, but is sometimes needed.

I will try to look into it later this evening.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #2 on: May 07, 2016, 07:04:50 pm »
I have it twice in a minimal wxsmith project, but this is a codeblocks built with wx3.0. I'm not sure if it will happen with wx2.8 built one.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #3 on: May 07, 2016, 07:28:49 pm »
Happens with wx2.8, too. And also the properties are duplicated and visible in both 2.8 and 3.0.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #4 on: May 07, 2016, 11:02:13 pm »
I see it now, too.

Can you test this patch ?

Code: diff
From bcce2c3accacf9f4fc28ec4277dfd5c7ae9e3161 Mon Sep 17 00:00:00 2001
From: Jens Lody <jens@codeblocks.org>
Date: Sat, 7 May 2016 22:57:19 +0200
Subject: * wxSmith: fix assert with wx3.0, due to doubled properties in some
 sizeritems. See:
 http://forums.codeblocks.org/index.php/topic,21168.msg144517.html#msg144517


Index: src/plugins/contrib/wxSmith/wxwidgets/wxssizer.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxssizer.cpp
+++ src/plugins/contrib/wxSmith/wxwidgets/wxssizer.cpp
@@ -56,12 +56,15 @@
     };
 }
 
-void wxsSizerExtra::OnEnumProperties(cb_unused long _Flags)
+void wxsSizerExtra::OnEnumProperties(long _Flags)
 {
     static const int Priority = 20;
     WXS_SIZERFLAGS_P(wxsSizerExtra,Flags,Priority);
     WXS_DIMENSION_P(wxsSizerExtra,Border,_("Border width"),_("  Dialog Units"),_T("border"),0,false,Priority);
-    WXS_SIZE_P(wxsSizerExtra,MinSize,_("Default Min size"),_("Min Width"),_("Min Height"),_("Min size in dialog units"), _T("minsize"),Priority);
+    // We only need to add "Default Min Size", if flMinMaxSize is not set.
+    // If it is set, it should already be there.
+    if ( !( _Flags & flMinMaxSize ) )
+        WXS_SIZE_P(wxsSizerExtra,MinSize,_("Default Min size"),_("Min Width"),_("Min Height"),_("Min size in dialog units"), _T("minsize"),Priority);
     WXS_LONG_P(wxsSizerExtra,Proportion,_("Proportion"),_T("option"),0,Priority);
 }
 

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #5 on: June 12, 2016, 09:27:08 am »
I see it now, too.

Can you test this patch ?

Any updates ?

If there are no objections I will commit later the day.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #6 on: June 12, 2016, 01:07:24 pm »
Can you test this patch ?
I had tested it on Windows - no issues so far and I worked with that option a lot.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #7 on: June 12, 2016, 09:33:26 pm »
I've tested it and it didn't fix the problem. Since then I have had no time to investigate further.
Morten are you using wx3.0 built cb?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #8 on: June 12, 2016, 10:22:16 pm »
I've tested it and it didn't fix the problem. Since then I have had no time to investigate further.
Morten are you using wx3.0 built cb?
I just tested it again with and without the patch, latest revision of C::B and wxWidgets and it works for me.
I just created a wxWidgets-projecet with the wizard, added a static text and a static text inside a sizer.
Without the patch I get the assert and have the doubled property, with the patch everything is okay.

Can you please give the exact steps to reproduce the issue with the patch ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #9 on: June 13, 2016, 09:32:32 pm »
Seems to be issue with the rebuild. Building from the Contribs workspace fails to build correctly for some reason. The problem is fixed after I did a clean build using the autotools build system.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith assert in wx30 builds due to rev 10392
« Reply #10 on: June 14, 2016, 07:46:11 am »
committed