Author Topic: crash when use wxsmith  (Read 2586 times)

Offline icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
crash when use wxsmith
« on: April 19, 2017, 03:16:42 pm »
       Hello, On windows10, the codeblocks built against wx30 and Tdm-gcc5.1, while I use wxSmith to change a control's style, cb crashing.
       So I debug codeblocks, and I attached the picture of call stack. It seems related to wx30(I guess this is the wx's bug), the similar question http://trac.wxwidgets.org/ticket/12552 . But it should be fixed. Then I debug the
wxSmith, I can't trigger it in wxSmith, just as same as the picture.
       Therefore, I am yet not sure that it is the wx'problem or wxSmith'problem. Can Anyone helps me, Thanks very
much.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1581
Re: crash when use wxsmith
« Reply #1 on: April 19, 2017, 04:18:23 pm »
can you post the exact steps to reproduce?
Can you post the full backtrace? It would be cool if you can post it in text form. You can copy it from the debugger log tab.

You probably have to recompile codeblocks with the debugger symbols enabled so the backtrace is filled with readable function names:
In Settings->Global Variables->cb_release_type->base add a "-g"
then you have to rebuild all codeblocks:
Build->Rebuild workspace

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #2 on: April 19, 2017, 04:37:43 pm »
It would be cool if you can post it in text form. You can copy it from the debugger log tab.
In fact there is a simpler way: right click -> copy to clipboard or right click -> save to file.

You probably have to recompile codeblocks with the debugger symbols enabled so the backtrace is filled with readable function names:
Also it will be good if you can add symbols to wxwidgets. This will make the backtrace more meaningful.
<debugger plugin maintainer>
(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 icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: crash when use wxsmith
« Reply #3 on: April 20, 2017, 06:08:43 am »
can you post the exact steps to reproduce?
Can you post the full backtrace? It would be cool if you can post it in text form. You can copy it from the debugger log tab.

first open a .wxs file, second, go to resource->properties,then check a style, last, save the .wxs file.
cb will crash after these steps.

Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
wxSmith
Adding source dir: D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\
Adding source dir: D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\
Adding file: D:\code\codeblocks_sf\src\output30\codeblocks.exe
Changing directory to: D:/code/codeblocks_sf/src/plugins/contrib/wxSmith/.
Set variable: PATH=.;D:\wx3.0.2\lib\gcc_dll;D:\wx3.0.2\lib\gcc_dll\mswu;D:\code\codeblocks_sf\src\devel30;C:\TDM-GCC-32\bin;C:\TDM-GCC-32;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;D:\Git\cmd;D:\zip300xn;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\LLVM\bin;D:\cmake\bin;D:\opencv2.4.13\my_build\bin;C:\Users\icequan\AppData\Local\Microsoft\WindowsApps
Starting debugger: C:\TDM-GCC-32\gdb32\bin\gdb32.exe -nx -fullname -quiet  -args D:/code/codeblocks_sf/src/output30/codeblocks.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Reading symbols from D:/code/codeblocks_sf/src/output30/codeblocks.exe...(no debugging symbols found)...done.
Debugger name and version: GNU gdb (GDB) 7.9.1
Child process PID: 4520
Program received signal SIGSEGV, Segmentation fault.
In wxmsw30u_gcc_custom!_ZNK12wxPGProperty5GetY2Ei () (D:\code\codeblocks_sf\src\output30\wxmsw30u_gcc_custom.dll)
> bt
#0  0x6a9a0d17 in wxmsw30u_gcc_custom!_ZNK12wxPGProperty5GetY2Ei () from D:\code\codeblocks_sf\src\output30\wxmsw30u_gcc_custom.dll
#1  0x0a6ea2d0 in ?? ()
#2  0xfeeefeee in ?? ()
#3  0xfeeefeee in ?? ()
#4  0xfeeefeee in ?? ()
#5  0xfeeefeee in ?? ()
#6  0xfeeefeee in ?? ()
#7  0xfeeefeee in ?? ()
#8  0xfeeefeee in ?? ()
#9  0xfeeefeee in ?? ()
#10 0xfeeefeee in ?? ()
#11 0xfeeefeee in ?? ()
#12 0xfeeefeee in ?? ()
#13 0xfeeefeee in ?? ()
#14 0xfeeefeee in ?? ()
#15 0xfeeefeee in ?? ()
#16 0xfeeefeee in ?? ()
#17 0xfeeefeee in ?? ()
#18 0xfeeefeee in ?? ()
#19 0xfeeefeee in ?? ()
#20 0xfeeefeee in ?? ()
#21 0xfeeefeee in ?? ()
#22 0xfeeefeee in ?? ()
#23 0xfeeefeee in ?? ()
#24 0xfeeefeee in ?? ()
#25 0xfeeefeee in ?? ()
#26 0xfeeefeee in ?? ()
#27 0xfeeefeee in ?? ()
#28 0xfeeefeee in ?? ()
#29 0xfeeefeee in ?? ()
#30 0xfeeefeee in ?? ()
#31 0xfeeefeee in ?? ()
#32 0xfeeefeee in ?? ()
#33 0xfeeefeee in ?? ()
#34 0xfeeefeee in ?? ()
#35 0xfeeefeee in ?? ()
#36 0xfeeefeee in ?? ()
#37 0xfeeefeee in ?? ()
#38 0xfeeefeee in ?? ()
#39 0xfeeefeee in ?? ()
#40 0xfeeefeee in ?? ()
#41 0xfeeefeee in ?? ()
#42 0xfeeefeee in ?? ()
#43 0xfeeefeee in ?? ()
#44 0xfeeefeee in ?? ()
#45 0xfeeefeee in ?? ()
#46 0xfeeefeee in ?? ()
#47 0xfeeefeee in ?? ()
#48 0xfeeefeee in ?? ()
#49 0xfeeefeee in ?? ()
#50 0xfeeefeee in ?? ()
#51 0xfeeefeee in ?? ()
#52 0xfeeefeee in ?? ()
#53 0xfeeefeee in ?? ()
#54 0xfeeefeee in ?? ()
#55 0xfeeefeee in ?? ()
#56 0xfeeefeee in ?? ()
#57 0xfeeefeee in ?? ()
#58 0xfeeefeee in ?? ()
#59 0xfeeefeee in ?? ()
#60 0xfeeefeee in ?? ()
#61 0xfeeefeee in ?? ()
#62 0xfeeefeee in ?? ()
#63 0xfeeefeee in ?? ()
#64 0xfeeefeee in ?? ()
#65 0xfeeefeee in ?? ()
#66 0xfeeefeee in ?? ()
#67 0xfeeefeee in ?? ()
#68 0xfeeefeee in ?? ()
#69 0xfeeefeee in ?? ()
#70 0xfeeefeee in ?? ()
#71 0xfeeefeee in ?? ()
#72 0xfeeefeee in ?? ()
#73 0xfeeefeee in ?? ()
#74 0xfeeefeee in ?? ()
#75 0xfeeefeee in ?? ()
#76 0xfeeefeee in ?? ()
#77 0xfeeefeee in ?? ()
#78 0xfeeefeee in ?? ()
#79 0xfeeefeee in ?? ()
#80 0xfeeefeee in ?? ()
#81 0xfeeefeee in ?? ()
#82 0xfeeefeee in ?? ()
#83 0xfeeefeee in ?? ()
#84 0xfeeefeee in ?? ()
#85 0xfeeefeee in ?? ()
#86 0xfeeefeee in ?? ()
#87 0xfeeefeee in ?? ()
#88 0xfeeefeee in ?? ()
#89 0xfeeefeee in ?? ()
#90 0xfeeefeee in ?? ()
#91 0xfeeefeee in ?? ()
#92 0xfeeefeee in ?? ()
#93 0xfeeefeee in ?? ()
#94 0xfeeefeee in ?? ()
#95 0xfeeefeee in ?? ()
#96 0xfeeefeee in ?? ()
#97 0xfeeefeee in ?? ()
#98 0xfeeefeee in ?? ()
#99 0xfeeefeee in ?? ()
#100 0xfeeefeee in ?? ()
#101 0xfeeefeee in ?? ()
#102 0xfeeefeee in ?? ()
#103 0xfeeefeee in ?? ()
#104 0xfeeefeee in ?? ()
#105 0xfeeefeee in ?? ()
#106 0xfeeefeee in ?? ()
#107 0xfeeefeee in ?? ()
#108 0xfeeefeee in ?? ()
#109 0xfeeefeee in ?? ()
#110 0xfeeefeee in ?? ()
#111 0xfeeefeee in ?? ()
#112 0xfeeefeee in ?? ()
#113 0xfeeefeee in ?? ()
#114 0xfeeefeee in ?? ()
#115 0xfeeefeee in ?? ()
#116 0xfeeefeee in ?? ()
#117 0xfeeefeee in ?? ()
#118 0xfeeefeee in ?? ()
#119 0xfeeefeee in ?? ()
#120 0xfeeefeee in ?? ()
#121 0xfeeefeee in ?? ()
#122 0xfeeefeee in ?? ()
#123 0xfeeefeee in ?? ()
#124 0xfeeefeee in ?? ()
#125 0xfeeefeee in ?? ()
#126 0xfeeefeee in ?? ()
#127 0xfeeefeee in ?? ()
#128 0xfeeefeee in ?? ()
#129 0xfeeefeee in ?? ()
#130 0xfeeefeee in ?? ()
#131 0xfeeefeee in ?? ()
#132 0xfeeefeee in ?? ()
#133 0xfeeefeee in ?? ()
#134 0xfeeefeee in ?? ()
#135 0xfeeefeee in ?? ()
#136 0xfeeefeee in ?? ()
#137 0xfeeefeee in ?? ()
#138 0xfeeefeee in ?? ()
#139 0xfeeefeee in ?? ()
#140 0xfeeefeee in ?? ()
#141 0xfeeefeee in ?? ()
#142 0xfeeefeee in ?? ()
#143 0xfeeefeee in ?? ()
#144 0xfeeefeee in ?? ()
#145 0xfeeefeee in ?? ()
#146 0xfeeefeee in ?? ()
#147 0xfeeefeee in ?? ()
#148 0xfeeefeee in ?? ()
#149 0xfeeefeee in ?? ()
#150 0xfeeefeee in ?? ()
#151 0xfeeefeee in ?? ()
#152 0xfeeefeee in ?? ()
#153 0xfeeefeee in ?? ()
#154 0xfeeefeee in ?? ()
#155 0xfeeefeee in ?? ()
#156 0xfeeefeee in ?? ()
#157 0xfeeefeee in ?? ()
#158 0xfeeefeee in ?? ()
#159 0xfeeefeee in ?? ()
#160 0xfeeefeee in ?? ()
#161 0xfeeefeee in ?? ()
#162 0xfeeefeee in ?? ()
#163 0xfeeefeee in ?? ()
#164 0xfeeefeee in ?? ()
#165 0xfeeefeee in ?? ()
#166 0xfeeefeee in ?? ()
#167 0xfeeefeee in ?? ()
#168 0xfeeefeee in ?? ()
#169 0xfeeefeee in ?? ()
#170 0xfeeefeee in ?? ()
#171 0xfeeefeee in ?? ()
#172 0xfeeefeee in ?? ()
#173 0xfeeefeee in ?? ()
#174 0xfeeefeee in ?? ()
#175 0xfeeefeee in ?? ()
#176 0xfeeefeee in ?? ()
#177 0xfeeefeee in ?? ()
#178 0xfeeefeee in ?? ()
#179 0xfeeefeee in ?? ()
#180 0xfeeefeee in ?? ()
#181 0xfeeefeee in ?? ()
#182 0xfeeefeee in ?? ()
#183 0xfeeefeee in ?? ()
#184 0xfeeefeee in ?? ()
#185 0xfeeefeee in ?? ()
#186 0xfeeefeee in ?? ()
#187 0xfeeefeee in ?? ()
#188 0xfeeefeee in ?? ()
#189 0xfeeefeee in ?? ()
#190 0xfeeefeee in ?? ()
#191 0xfeeefeee in ?? ()
#192 0xfeeefeee in ?? ()
#193 0xfeeefeee in ?? ()
#194 0xfeeefeee in ?? ()
#195 0xfeeefeee in ?? ()
#196 0xfeeefeee in ?? ()
#197 0xfeeefeee in ?? ()
#198 0xfeeefeee in ?? ()
#199 0xfeeefeee in ?? ()
#200 0xfeeefeee in ?? ()
#201 0xfeeefeee in ?? ()
#202 0xfeeefeee in ?? ()
#203 0xfeeefeee in ?? ()
#204 0xfeeefeee in ?? ()
#205 0xfeeefeee in ?? ()
#206 0xfeeefeee in ?? ()
#207 0xfeeefeee in ?? ()
#208 0xfeeefeee in ?? ()
#209 0xfeeefeee in ?? ()
#210 0xfeeefeee in ?? ()
#211 0xfeeefeee in ?? ()
#212 0xfeeefeee in ?? ()
#213 0xfeeefeee in ?? ()
#214 0xfeeefeee in ?? ()
#215 0xfeeefeee in ?? ()
#216 0xfeeefeee in ?? ()
#217 0xfeeefeee in ?? ()
#218 0xfeeefeee in ?? ()
#219 0xfeeefeee in ?? ()
#220 0xfeeefeee in ?? ()
#221 0xfeeefeee in ?? ()
#222 0xfeeefeee in ?? ()
#223 0xfeeefeee in ?? ()
#224 0xfeeefeee in ?? ()
#225 0xfeeefeee in ?? ()
#226 0xfeeefeee in ?? ()
#227 0xfeeefeee in ?? ()
#228 0xfeeefeee in ?? ()
#229 0xfeeefeee in ?? ()
#230 0xfeeefeee in ?? ()
#231 0xfeeefeee in ?? ()
#232 0xfeeefeee in ?? ()
#233 0xfeeefeee in ?? ()
#234 0xfeeefeee in ?? ()
#235 0xfeeefeee in ?? ()
#236 0xfeeefeee in ?? ()
#237 0xfeeefeee in ?? ()
#238 0xfeeefeee in ?? ()
#239 0xfeeefeee in ?? ()
#240 0xfeeefeee in ?? ()
#241 0xfeeefeee in ?? ()
#242 0xfeeefeee in ?? ()
#243 0xfeeefeee in ?? ()
#244 0xfeeefeee in ?? ()
#245 0xfeeefeee in ?? ()
#246 0xfeeefeee in ?? ()
#247 0xfeeefeee in ?? ()
#248 0xfeeefeee in ?? ()
#249 0xfeeefeee in ?? ()
#250 0xfeeefeee in ?? ()
#251 0xfeeefeee in ?? ()
#252 0xfeeefeee in ?? ()
#253 0xfeeefeee in ?? ()
#254 0xfeeefeee in ?? ()
#255 0xfeeefeee in ?? ()
#256 0xfeeefeee in ?? ()
#257 0xfeeefeee in ?? ()
#258 0xfeeefeee in ?? ()
#259 0xfeeefeee in ?? ()
#260 0xfeeefeee in ?? ()
#261 0xfeeefeee in ?? ()
#262 0xfeeefeee in ?? ()
#263 0xfeeefeee in ?? ()
#264 0xfeeefeee in ?? ()
#265 0xfeeefeee in ?? ()
#266 0xfeeefeee in ?? ()
#267 0xfeeefeee in ?? ()
#268 0xfeeefeee in ?? ()
#269 0xfeeefeee in ?? ()
#270 0xfeeefeee in ?? ()
#271 0xfeeefeee in ?? ()
#272 0xfeeefeee in ?? ()
#273 0xfeeefeee in ?? ()
#274 0xfeeefeee in ?? ()
#275 0xfeeefeee in ?? ()
#276 0xfeeefeee in ?? ()
#277 0xfeeefeee in ?? ()
#278 0xfeeefeee in ?? ()
#279 0xfeeefeee in ?? ()
#280 0xfeeefeee in ?? ()
#281 0xfeeefeee in ?? ()
#282 0xfeeefeee in ?? ()
#283 0xfeeefeee in ?? ()
#284 0xfeeefeee in ?? ()
#285 0xfeeefeee in ?? ()
#286 0xfeeefeee in ?? ()
#287 0xfeeefeee in ?? ()
#288 0xfeeefeee in ?? ()
#289 0xfeeefeee in ?? ()
#290 0xfeeefeee in ?? ()
#291 0xfeeefeee in ?? ()
#292 0xfeeefeee in ?? ()
#293 0xfeeefeee in ?? ()
#294 0xfeeefeee in ?? ()
#295 0xfeeefeee in ?? ()
#296 0xfeeefeee in ?? ()
#297 0xfeeefeee in ?? ()
#298 0xfeeefeee in ?? ()
#299 0xfeeefeee in ?? ()
#300 0xfeeefeee in ?? ()
#301 0xfeeefeee in ?? ()
#302 0xfeeefeee in ?? ()
#303 0xfeeefeee in ?? ()
#304 0xfeeefeee in ?? ()
#305 0xfeeefeee in ?? ()
#306 0xfeeefeee in ?? ()
#307 0xfeeefeee in ?? ()
#308 0xfeeefeee in ?? ()
#309 0xfeeefeee in ?? ()
#310 0xfeeefeee in ?? ()
#311 0xfeeefeee in ?? ()
#312 0xfeeefeee in ?? ()
#313 0xfeeefeee in ?? ()
#314 0xfeeefeee in ?? ()
#315 0xfeeefeee in ?? ()
#316 0xfeeefeee in ?? ()
#317 0xfeeefeee in ?? ()
#318 0xfeeefeee in ?? ()
#319 0xfeeefeee in ?? ()
#320 0xfeeefeee in ?? ()
#321 0xfeeefeee in ?? ()
#322 0xfeeefeee in ?? ()
#323 0xfeeefeee in ?? ()
#324 0xfeeefeee in ?? ()
#325 0xfeeefeee in ?? ()
#326 0xfeeefeee in ?? ()
#327 0xfeeefeee in ?? ()
#328 0xfeeefeee in ?? ()
#329 0xfeeefeee in ?? ()
#330 0xfeeefeee in ?? ()
#331 0xfeeefeee in ?? ()
#332 0xfeeefeee in ?? ()
#333 0xfeeefeee in ?? ()
#334 0xfeeefeee in ?? ()
#335 0xfeeefeee in ?? ()
#336 0xfeeefeee in ?? ()
#337 0xfeeefeee in ?? ()
#338 0xfeeefeee in ?? ()
#339 0xfeeefeee in ?? ()
#340 0xfeeefeee in ?? ()
#341 0xfeeefeee in ?? ()
#342 0xfeeefeee in ?? ()
#343 0xfeeefeee in ?? ()
#344 0xfeeefeee in ?? ()
#345 0xfeeefeee in ?? ()
#346 0xfeeefeee in ?? ()
#347 0xfeeefeee in ?? ()
#348 0xfeeefeee in ?? ()
#349 0xfeeefeee in ?? ()
#350 0xfeeefeee in ?? ()
#351 0xfeeefeee in ?? ()
#352 0xfeeefeee in ?? ()
#353 0xfeeefeee in ?? ()
#354 0xfeeefeee in ?? ()
#355 0xfeeefeee in ?? ()
#356 0xfeeefeee in ?? ()
#357 0xfeeefeee in ?? ()
#358 0xfeeefeee in ?? ()
#359 0xfeeefeee in ?? ()
#360 0xfeeefeee in ?? ()
#361 0xfeeefeee in ?? ()
#362 0xfeeefeee in ?? ()
#363 0xfeeefeee in ?? ()
#364 0xfeeefeee in ?? ()
#365 0xfeeefeee in ?? ()
#366 0xfeeefeee in ?? ()
#367 0xfeeefeee in ?? ()
#368 0xfeeefeee in ?? ()
#369 0xfeeefeee in ?? ()
#370 0xfeeefeee in ?? ()
#371 0x13b4e7f5 in ?? ()
#372 0x181adb24 in ?? ()
#373 0x6b19aff8 in wxmsw30u_gcc_custom!_ZTV8wxBitmap () from D:\code\codeblocks_sf\src\output30\wxmsw30u_gcc_custom.dll
#374 0x0a72d8f0 in ?? ()
Backtrace stopped: Cannot access memory at address 0xfeeefef2
I don't know about the wxSmith, so I can't set the breakpoint where the code of my steps.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #4 on: April 20, 2017, 10:57:49 am »
Tried it, it doesn't happen on linux. Can some windows user with a wx30 build try to reproduce it?
<debugger plugin maintainer>
(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 stahta01

  • Lives here!
  • ****
  • Posts: 5988
    • My Best Post
Re: crash when use wxsmith
« Reply #5 on: April 20, 2017, 02:38:26 pm »
I am building wxWidgets 3.0.2 32 bit right now; in a several hours, I plan to see if I get the problem under Windows 10 32 bit.

Edit: Note to self, need both wxSmith and wxSmith MIME plugins enabled to do testing.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5988
    • My Best Post
Re: crash when use wxsmith
« Reply #6 on: April 20, 2017, 09:40:04 pm »
Duplicated the crash on Windows 10 32 bit.
Now going to use debug wxWidgets to see if more info results during crash.

Edit:
Code: [Select]
gcc version 5.1.0 (tdm-1)

Tim S.
« Last Edit: April 20, 2017, 10:11:10 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5988
    • My Best Post
Re: crash when use wxsmith
« Reply #7 on: April 20, 2017, 11:08:25 pm »
Attaching crash report; it crashed twice.

Edit: Using wxWidgets 3.0.2 with patch on it to build using GCC 6.3.0.
Edit2: Now building wxWidgets WX_3_0_BRANCH to see if the problem has been fixed in that git branch.
Edit3: Problem NOT fixed in WX_3_0_BRANCH git branch; so, likely NOT wxWidgets problem.
Going to build using MinGW64 GCC 6.3.0 and see if problem goes away; I am better using GDB under MSys2.
Note: I still am very bad at using gdb, I just might be able to do a back trace under MSys2.

Tim S.
« Last Edit: April 21, 2017, 07:37:02 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #8 on: April 20, 2017, 11:43:25 pm »
Can you post a backtrace/callstack from the debugger. This report is hardly readable...
<debugger plugin maintainer>
(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 skool daze

  • Single posting newcomer
  • *
  • Posts: 9
  • beginning with Code::Blocks
Re: crash when use wxsmith
« Reply #9 on: April 21, 2017, 12:40:30 am »
You probably have to recompile codeblocks with the debugger symbols enabled so the backtrace is filled with readable function names:
In Settings->Global Variables->cb_release_type->base add a "-g"
then you have to rebuild all codeblocks:
Build->Rebuild workspace
For rebuild/recompile do you mean compile+link C::B from sources or is because  icequan says "the codeblocks built against wx30"?
Beginning with Code::Blocks

Offline icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: crash when use wxsmith
« Reply #10 on: April 21, 2017, 06:00:26 am »
Hi, guys. I found position where my steps in wxSmith, so I set breakpoints and trace it. Finally, I got the crash point,
in codeblocks SDK, the editormanager.cpp and the cbauibook.cpp, I attach the call stack. And there is some debug
information.
Code: [Select]
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsstyle.cpp:132
Continuing...
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1441
Continuing...
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:184
Continuing...
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:295
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:299
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:300
At D:\code\codeblocks_sf\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:301
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:193
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:200
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:186
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:202
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:203
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:668
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1451
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1452
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1460
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1479
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:1480
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:690
At D:\code\codeblocks_sf\src\sdk\editorbase.cpp:184
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:668
At D:\code\codeblocks_sf\src\sdk\editormanager.cpp:698
At D:\code\codeblocks_sf\src\sdk\cbauibook.cpp:526
Program received signal SIGSEGV, Segmentation fault.
In wxPGProperty::GetY2(int) const () (D:\code\codeblocks_sf\src\devel30\wxmsw30u_gcc_custom.dll)
Debugger finished with status 0
I have some quesition. First, in editormanager.cpp:698, when running to this statement, cb was crushing.
m_pNotebook->DeletePage(index), I noticed that the m_pNotebook was initialized to nullptr and NEW in constructor, I think which is no problem. Then I step into cbauibook.cpp, just derived form wxAuiNotebook,
I also think there is no problem at this statement. I don't think it is the wx'problem, because I can delete the
page of code editor normally, and if I don't change the style, it is also deleted. So, in my opinion, the most probably reasons is m_pNotebook was released forward in constructor when called out of obeject. I means that
the NEW operation is useless, beacause the resource of constructor was released, so actually we don't allocate resource for m_pNotebook, and the adress is nullptr, so will crash here. just my guess, can anyone helps debug or
see whether it ie right.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #11 on: April 21, 2017, 10:34:02 am »
icequan233: Can you open the call stack window (debug ->  debugging windwos -> callstack) and post the full call stack at the time of the crash?
<debugger plugin maintainer>
(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 icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: crash when use wxsmith
« Reply #12 on: April 21, 2017, 12:31:05 pm »
icequan233: Can you open the call stack window (debug ->  debugging windwos -> callstack) and post the full call stack at the time of the crash?
       Sorry for the picture, the forums limits size, I crop the call stack.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #13 on: April 21, 2017, 12:59:33 pm »
This is not the crash site as far as I can tell, isn't it?
Please remove all breakpoints and let it crash.
Then go to the call stack window, right click in the window and click on the copy to clipboard menu item.
Then paste the callstack in a code or quote tags.
<debugger plugin maintainer>
(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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7222
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: crash when use wxsmith
« Reply #14 on: April 21, 2017, 01:29:04 pm »
The crash happens because of an illegal pointer in propgrid.cpp (GetY2) in the for-loop.
getParent returns 0xfeeefee.
I can reproduce it with wx2.8 and wx3.
It either tries to access an already deleted or an incorrect initialized pointer, looking at the address, the first is more likely.
It might be an(other) optimization bug of gcc.

Offline icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: crash when use wxsmith
« Reply #15 on: April 21, 2017, 02:00:12 pm »
This is not the crash site as far as I can tell, isn't it?
Please remove all breakpoints and let it crash.
Then go to the call stack window, right click in the window and click on the copy to clipboard menu item.
Then paste the callstack in a code or quote tags.
The true crash site is the first post, and I attached the picture. I think @jens is right, the similar question of gcc
http://forums.codeblocks.org/index.php/topic,21773.0.html .
 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #16 on: April 21, 2017, 02:22:53 pm »
It might be an(other) optimization bug of gcc.
These are not bugs, but features :)
Lets see if I can reproduce this in wx2.8 and gcc 6.x.
<debugger plugin maintainer>
(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: 10399
Re: crash when use wxsmith
« Reply #17 on: April 21, 2017, 02:26:22 pm »
The true crash site is the first post, and I attached the picture. I think @jens is right, the similar question of gcc
http://forums.codeblocks.org/index.php/topic,21773.0.html .
Sorry, but do you think you can solve the problem with the information provided in the first posts?

GCC is very solid compiler and it is very hard to find bugs in it.
Most of the times the problems are caused by bugs in the program that are manifested by an aggressive optimization.
These are still bugs in the program and not in GCC!
<debugger plugin maintainer>
(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 stahta01

  • Lives here!
  • ****
  • Posts: 5988
    • My Best Post
Re: crash when use wxsmith
« Reply #18 on: April 21, 2017, 06:54:39 pm »
I am now going to apply the wxWidgets code change to IsKindOf method and verify it really fixes this problem.

Edit: It did NOT fix the problem.

Tim S.

Back trace below:
Code: [Select]
(gdb) bt
#0  0x02bf9c14 in wxPGProperty::IsExpanded (this=0xfeeefeee)
    at ../../include/wx/propgrid/property.h:1905
#1  0x0285b723 in wxPGProperty::GetY2 (this=0x18852688, lh=20)
    at ../../src/propgrid/property.cpp:2200
#2  0x028685a7 in wxPropertyGrid::GetEditorWidgetRect (this=0x18732220,
    p=0x18852688, column=1) at ../../src/propgrid/propgrid.cpp:3717
#3  0x0284d2ca in wxPropertyGrid::CorrectEditorWidgetPosY (this=0x18732220)
    at ../../src/propgrid/editors.cpp:1807
#4  0x0286a380 in wxPropertyGrid::RecalculateVirtualSize (this=0x18732220,
    forceXPos=-1) at ../../src/propgrid/propgrid.cpp:4508
#5  0x02862b9a in wxPropertyGrid::PrepareAfterItemsAdded (this=0x18732220)
    at ../../src/propgrid/propgrid.cpp:1571
#6  0x028659b9 in wxPropertyGrid::Refresh (this=0x18732220, rect=0x0)
    at ../../src/propgrid/propgrid.cpp:2640
#7  0x02871cb6 in wxPropertyGridInterface::RefreshGrid (this=0x18732100,
    state=0x18732c70) at ../../src/propgrid/propgridiface.cpp:93
#8  0x02871f1a in wxPropertyGridInterface::DeleteProperty (this=0x18732100,
    id=...) at ../../src/propgrid/propgridiface.cpp:150
#9  0x18dc732b in wxsPropertyGridManager::UnbindPropertyContainer (
    this=0x18731f90, PC=0x18839970, doFreeze=false)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\properties\wxspropertygridmanager.cpp:175
#10 0x18dc601d in wxsPropertyContainer::~wxsPropertyContainer (
    this=0x18839970, __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\properties\wxspropertycontainer.cpp:52
#11 0x18f1c689 in wxsBaseProperties::~wxsBaseProperties (this=0x18839970,
    __in_chrg=<optimized out>)
    at C:/Devel/open_source_code/version_control/codeblocks_https_metadata-git/src/plugins/contrib/wxSmith/wxwidgets/wxsbaseproperties.h:37
#12 0x18ea2d0f in wxsItem::~wxsItem (this=0x18839930,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxwidgets\wxsitem.cpp:63
#13 0x18ec8517 in wxsParent::~wxsParent (this=0x18839930,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxwidgets\wxsparent.cpp:36
#14 0x18eefb98 in wxsContainer::~wxsContainer (this=0x18839930,
    __in_chrg=<optimized out>)
    at C:/Devel/open_source_code/version_control/codeblocks_https_metadata-git/src/plugins/contrib/wxSmith/wxwidgets/wxscontainer.h:38
#15 0x18f2b7a4 in wxsPanel::~wxsPanel (this=0x18839930,
    __in_chrg=<optimized out>)
    at C:/Devel/open_source_code/version_control/codeblocks_https_metadata-git/src/plugins/contrib/wxSmith/wxwidgets/defitems/wxspanel.h:28
#16 0x18f2b76f in wxsPanel::~wxsPanel (this=0x18839930,
    __in_chrg=<optimized out>)
    at C:/Devel/open_source_code/version_control/codeblocks_https_metadata-git/src/plugins/contrib/wxSmith/wxwidgets/defitems/wxspanel.h:28
#17 0x18eb69c2 in wxsItemResData::~wxsItemResData (this=0x18837c60,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxwidgets\wxsitemresdata.cpp:135
#18 0x18eb6b7b in wxsItemResData::~wxsItemResData (this=0x18837c60,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxwidgets\wxsitemresdata.cpp:151
#19 0x18ea779f in wxsItemEditor::~wxsItemEditor (this=0x12fa95e8,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:79
#20 0x18ea77d9 in wxsItemEditor::~wxsItemEditor (this=0x12fa95e8,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxwidgets\wxsitemeditor.cpp:81
#21 0x026cca46 in wxWindowBase::Destroy (this=0x12fa95e8)
    at ../../src/common/wincmn.cpp:576
#22 0x0e0beeee in EditorBase::Close (this=0x12fa95e8)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\sdk\editorbase.cpp:207
#23 0x18dd2d55 in wxsResource::~wxsResource (this=0x21a432d0,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxsresource.cpp:124
#24 0x18eef54d in wxWidgetsRes::~wxWidgetsRes (this=0x21a432d0,
    __in_chrg=<optimized out>)
    at C:/Devel/open_source_code/version_control/codeblocks_https_metadata-git/src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsres.h:29
#25 0x18eb1737 in wxsItemRes::~wxsItemRes (this=0x21a432d0,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxwidgets\wxsitemres.cpp:141
#26 0x18eed5bc in wxsPanelRes::~wxsPanelRes (this=0x21a432d0,
    __in_chrg=<optimized out>)
    at C:/Devel/open_source_code/version_control/codeblocks_https_metadata-git/src/plugins/contrib/wxSmith/wxwidgets/wxspanelres.h:29
#27 0x18eed587 in wxsPanelRes::~wxsPanelRes (this=0x21a432d0,
    __in_chrg=<optimized out>)
    at C:/Devel/open_source_code/version_control/codeblocks_https_metadata-git/src/plugins/contrib/wxSmith/wxwidgets/wxspanelres.h:29
#28 0x18dd1505 in wxsProject::~wxsProject (this=0x21a41f40,
    __in_chrg=<optimized out>)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxsproject.cpp:64
#29 0x18dd03e5 in wxSmith::OnProjectClose (this=0x181fce78, event=...)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\plugins\contrib\wxSmith\wxsmith.cpp:351
#30 0x18ef22db in cbEventFunctor<wxSmith, CodeBlocksEvent>::Call (
    this=0x182ba198, event=...) at ../../../include/cbfunctor.h:49
#31 0x0e0feb07 in Manager::ProcessEvent (this=0x126d9cf8, event=...)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\sdk\manager.cpp:263
#32 0x0e111ffd in PluginManager::NotifyPlugins (this=0x12fa6d68, event=...)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\sdk\pluginmanager.cpp:1437
#33 0x0e12d670 in ProjectManager::CloseProject (this=0x12dbd048, project=
    0x188281e8, dontsave=true, refresh=false)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\sdk\projectmanager.cpp:449
#34 0x0e12d3ae in ProjectManager::CloseAllProjects (this=0x12dbd048,
    dontsave=true)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\sdk\projectmanager.cpp:392
#35 0x0e12de39 in ProjectManager::CloseWorkspace (this=0x12dbd048)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\sdk\projectmanager.cpp:588
#36 0x00457c7c in MainFrame::DoCloseCurrentWorkspace (this=0x12da7a98)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\src\main.cpp:1878
#37 0x0045dd33 in MainFrame::OnApplicationClose (this=0x12da7a98, event=...)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\src\main.cpp:2758
#38 0x02473706 in wxAppConsoleBase::HandleEvent (this=0x12687f10,
    handler=0x12da7a98, func=
    (void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0x45db94 <MainFrame::OnApplicationClose(wxCloseEvent&)>, event=...)
    at ../../src/common/appbase.cpp:611
#39 0x02473762 in wxAppConsoleBase::CallEventHandler (this=0x12687f10,
    handler=0x12da7a98, functor=..., event=...)
    at ../../src/common/appbase.cpp:623
#40 0x0253b569 in wxEvtHandler::ProcessEventIfMatchesId (entry=...,
    handler=0x12da7a98, event=...) at ../../src/common/event.cpp:1392
#41 0x0253a5ad in wxEventHashTable::HandleEvent (
    this=0x580324 <MainFrame::sm_eventHashTable>, event=..., self=0x12da7a98)
    at ../../src/common/event.cpp:998
#42 0x0253b9f3 in wxEvtHandler::TryHereOnly (this=0x12da7a98, event=...)
    at ../../src/common/event.cpp:1589
#43 0x02b3acd8 in wxEvtHandler::TryBeforeAndHere (this=0x12da7a98, event=...)
    at ../../include/wx/event.h:3671
#44 0x0253b7cb in wxEvtHandler::ProcessEvent (this=0x12da7a98, event=...)
    at ../../src/common/event.cpp:1491
#45 0x0253b8c1 in wxEvtHandler::DoTryChain (this=0x126e6bf4, event=...)
    at ../../src/common/event.cpp:1554
#46 0x0253b856 in wxEvtHandler::ProcessEventLocally (this=0x126e6bf4,
    event=...) at ../../src/common/event.cpp:1522
#47 0x0253b7e0 in wxEvtHandler::ProcessEvent (this=0x126e6bf4, event=...)
    at ../../src/common/event.cpp:1495
#48 0x0253ba7f in wxEvtHandler::SafelyProcessEvent (this=0x126e6bf4,
    event=...) at ../../src/common/event.cpp:1613
#49 0x026cf0da in wxWindowBase::HandleWindowEvent (this=0x12da7a98, event=...)
    at ../../src/common/wincmn.cpp:1525
#50 0x026ccaca in wxWindowBase::Close (this=0x12da7a98, force=true)
    at ../../src/common/wincmn.cpp:589
#51 0x0045da9c in MainFrame::OnFileQuit (this=0x12da7a98, event=...)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\src\main.cpp:2698
#52 0x02473706 in wxAppConsoleBase::HandleEvent (this=0x12687f10,
    handler=0x12da7a98, func=
    (void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0x45da82 <MainFrame::OnFileQuit(wxCommandEvent&)>, event=...)
    at ../../src/common/appbase.cpp:611
#53 0x02473762 in wxAppConsoleBase::CallEventHandler (this=0x12687f10,
    handler=0x12da7a98, functor=..., event=...)
    at ../../src/common/appbase.cpp:623
#54 0x0253b569 in wxEvtHandler::ProcessEventIfMatchesId (entry=...,
    handler=0x12da7a98, event=...) at ../../src/common/event.cpp:1392
#55 0x0253a5ad in wxEventHashTable::HandleEvent (
    this=0x580324 <MainFrame::sm_eventHashTable>, event=..., self=0x12da7a98)
    at ../../src/common/event.cpp:998
#56 0x0253b9f3 in wxEvtHandler::TryHereOnly (this=0x12da7a98, event=...)
    at ../../src/common/event.cpp:1589
#57 0x02b3acd8 in wxEvtHandler::TryBeforeAndHere (this=0x12da7a98, event=...)
    at ../../include/wx/event.h:3671
#58 0x0253b7cb in wxEvtHandler::ProcessEvent (this=0x12da7a98, event=...)
    at ../../src/common/event.cpp:1491
#59 0x0253b8c1 in wxEvtHandler::DoTryChain (this=0x126e6bf4, event=...)
    at ../../src/common/event.cpp:1554
#60 0x0253b856 in wxEvtHandler::ProcessEventLocally (this=0x126e6bf4,
    event=...) at ../../src/common/event.cpp:1522
#61 0x0253b7e0 in wxEvtHandler::ProcessEvent (this=0x126e6bf4, event=...)
    at ../../src/common/event.cpp:1495
#62 0x026d3f87 in wxWindowBase::TryAfter (this=0x12e421e8, event=...)
    at ../../src/common/wincmn.cpp:3427
#63 0x0253b80b in wxEvtHandler::ProcessEvent (this=0x12e421e8, event=...)
    at ../../src/common/event.cpp:1508
#64 0x0253ba7f in wxEvtHandler::SafelyProcessEvent (this=0x12e421e8,
    event=...) at ../../src/common/event.cpp:1613
#65 0x026cf0da in wxWindowBase::HandleWindowEvent (this=0x12e421e8, event=...)
    at ../../src/common/wincmn.cpp:1525
#66 0x02695d3e in wxMenuBase::SendEvent (this=0x12e26920, itemid=-31837,
    checked=-1) at ../../src/common/menucmn.cpp:666
#67 0x026599c3 in wxFrameBase::ProcessCommand (this=0x12da7a98, item=
    0x12e5aac0) at ../../src/common/framecmn.cpp:298
#68 0x025d31ba in wxFrame::HandleCommand (this=0x12da7a98, id=33699, cmd=0,
    control=0x0) at ../../src/msw/frame.cpp:826
#69 0x025d32d1 in wxFrame::MSWWindowProc (this=0x12da7a98, message=273,
    wParam=33699, lParam=0) at ../../src/msw/frame.cpp:862
#70 0x025a8cbd in wxWndProc(HWND__*, unsigned int, unsigned int, long)@16 (
    hWnd=0x270216, message=273, wParam=33699, lParam=0)
    at ../../src/msw/window.cpp:2711
#71 0x75d08233 in USER32!RecordShutdownReason ()
   from C:\WINDOWS\System32\user32.dll
#72 0x75cde638 in USER32!DispatchMessageW ()
   from C:\WINDOWS\System32\user32.dll
#73 0x75cde103 in USER32!DispatchMessageW ()
   from C:\WINDOWS\System32\user32.dll
#74 0x75cddf50 in USER32!DispatchMessageW ()
   from C:\WINDOWS\System32\user32.dll
#75 0x025cf526 in wxGUIEventLoop::ProcessMessage (this=0x18763068,
    msg=0x1d9fb48) at ../../src/msw/evtloop.cpp:170
#76 0x025cf79a in wxGUIEventLoop::Dispatch (this=0x18763068)
    at ../../src/msw/evtloop.cpp:230
#77 0x02498981 in wxEventLoopManual::ProcessEvents (this=0x18763068)
    at ../../src/common/evtloopcmn.cpp:172
#78 0x02498a03 in wxEventLoopManual::DoRun (this=0x18763068)
    at ../../src/common/evtloopcmn.cpp:206
#79 0x024986f6 in wxEventLoopBase::Run (this=0x18763068)
    at ../../src/common/evtloopcmn.cpp:78
#80 0x02472cf1 in wxAppConsoleBase::MainLoop (this=0x12687f10)
    at ../../src/common/appbase.cpp:334
#81 0x02472a80 in wxAppConsoleBase::OnRun (this=0x12687f10)
    at ../../src/common/appbase.cpp:259
#82 0x0262212c in wxAppBase::OnRun (this=0x12687f10)
    at ../../src/common/appcmn.cpp:304
#83 0x00404c30 in CodeBlocksApp::OnRun (this=0x12687f10)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\src\app.cpp:850
#84 0x024becad in wxEntryReal (argc=@0x30293c8: 1, argv=0x12687ef0)
    at ../../src/common/init.cpp:495
#85 0x025424d0 in wxEntry (argc=@0x30293c8: 1, argv=0x12687ef0)
    at ../../src/msw/main.cpp:197
#86 0x025427a8 in wxEntry (hInstance=0x400000, nCmdShow=10)
    at ../../src/msw/main.cpp:415
#87 0x0040217f in WinMain@16 (hInstance=0x400000,
    hPrevInstance=hPrevInstance@entry=0x0, nCmdShow=10)
    at C:\Devel\open_source_code\version_control\codeblocks_https_metadata-git\src\src\app.cpp:322
#88 0x004f3ded in main (flags=1, cmdline=0x12676f10, inst=0xa1bb8)
    at C:/Devel/open_source_code/version_control/MINGW_packages-git/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18
« Last Edit: April 22, 2017, 02:58:21 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #19 on: April 21, 2017, 08:16:18 pm »
Thanks you for the callstack.

I am now going to apply the wxWidgets code change to IsKindOf method and verify it really fixes this problem.
I doubt this will help.
<debugger plugin maintainer>
(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: 10399
Re: crash when use wxsmith
« Reply #20 on: April 21, 2017, 08:17:25 pm »
@Jens: Are you talking about windows or linux? Have you tried with wx-master?
<debugger plugin maintainer>
(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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7222
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: crash when use wxsmith
« Reply #21 on: April 21, 2017, 10:44:39 pm »
@Jens: Are you talking about windows or linux? Have you tried with wx-master?
I tried wx3.0.2 and 2.8.12 on windows and wx3.1 (not latest) and 2.8.12 on linux.
All crash, not always, but this might depend on the value of m_parent in propgrid.cpp .

I try to dig into it deeper.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #22 on: April 21, 2017, 11:19:41 pm »
I cannot crash it, but I've seen the crash in wxsmith.
What are the steps to reproduce it?
<debugger plugin maintainer>
(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 icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: crash when use wxsmith
« Reply #23 on: April 22, 2017, 03:42:21 am »
I cannot crash it, but I've seen the crash in wxsmith.
What are the steps to reproduce it?
I forget the last steps, After checking or changing the style, you need delete the page of wxs editor, It should be
crash. On my virtual machine, Ubuntu16.04, I can reproduce this crash, but not always.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5988
    • My Best Post
Re: crash when use wxsmith
« Reply #24 on: April 22, 2017, 06:43:52 am »
I just finished building wxWidgets git master (Updated in the past 24 hours) and did NOT see the crash.
Too tired to double check my work tonight. If I confirm this; then, it is likely a wxWidgets problem that has already been fixed to git master.

Edit1: A quick search resulted in this being the change most likely to have fixed the bug.
Edit2: This is based on the guess that compiler optimization is causing the bug.

Quote
SHA-1: 01ccff2e05128241827935646cbb275bab05223b

* Avoid comparing address of reference to NULL

As GCC 6 points out, the compiler is free to assume a reference is never
null, and remove such a check

Code: [Select]
src/propgrid/property.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp
index f8973cd1f6..0e992becc1 100644
--- a/src/propgrid/property.cpp
+++ b/src/propgrid/property.cpp
@@ -515,13 +515,13 @@ void wxPGProperty::Init()
 
 void wxPGProperty::Init( const wxString& label, const wxString& name )
 {
-    // We really need to check if &label and &name are NULL pointers
-    // (this can if we are called before property grid has been initialized)
+    // wxPG_LABEL reference can be NULL if we are called before property
+    // grid has been initialized
 
-    if ( (&label) != NULL && label != wxPG_LABEL )
+    if ( sm_wxPG_LABEL && label != wxPG_LABEL )
         m_label = label;
 
-    if ( (&name) != NULL && name != wxPG_LABEL )
+    if ( sm_wxPG_LABEL && name != wxPG_LABEL )
         DoSetName( name );
     else
         DoSetName( m_label );

Tim S.
« Last Edit: April 22, 2017, 07:20:24 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10399
Re: crash when use wxsmith
« Reply #25 on: April 22, 2017, 10:19:50 am »
Edit2: This is based on the guess that compiler optimization is causing the bug.
This is already fixed in our version of wxpropgrid in master. This is not the cause for the bug.
<debugger plugin maintainer>
(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 icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: crash when use wxsmith
« Reply #26 on: April 22, 2017, 11:40:46 am »
I just finished building wxWidgets git master (Updated in the past 24 hours) and did NOT see the crash.
Too tired to double check my work tonight. If I confirm this; then, it is likely a wxWidgets problem that has already been fixed to git master.

Edit1: A quick search resulted in this being the change most likely to have fixed the bug.
Edit2: This is based on the guess that compiler optimization is causing the bug.



Tim S.
Thanks Tim, many thanks. Anyway, the problem has been fixed.
Now I think that even if compiler optimization cause this problem, we also need to change
our code to slove this problem. So, it is the key that how to slove but not who's bug.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7222
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: crash when use wxsmith
« Reply #27 on: April 22, 2017, 04:27:22 pm »
This should be fixed in latest trunk (svn r11053).
It's tested on linux with wx2.8.12, 3.022 and latest trunk and on windows with 2.8.12 and 3.0.2 .

Offline icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: crash when use wxsmith
« Reply #28 on: April 23, 2017, 11:43:06 am »
This should be fixed in latest trunk (svn r11053).
It's tested on linux with wx2.8.12, 3.022 and latest trunk and on windows with 2.8.12 and 3.0.2 .
I just tested on windows, fixed indeed. Thanks jens, this is the best method to slove it.