Author Topic: crash when use wxsmith  (Read 15033 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

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
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: 13413
    • Travis build status
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.
(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
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: 13413
    • Travis build status
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?
(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: 7582
    • 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 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • 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
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 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • 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 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
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...
(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

  • Multiple posting newcomer
  • *
  • Posts: 10
  • 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
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: 13413
    • Travis build status
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?
(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: 13413
    • Travis build status
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.
(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: 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.