Author Topic: Problem with svn 12446  (Read 3088 times)

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 717
Re: Problem with svn 12446
« Reply #15 on: June 07, 2021, 06:14:03 pm »
Looks like memory layout in Squirrel is flaky, see ticket 1102
You can try adding -fno-strict-aliasing to the Squirrel target.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 651
Re: Problem with svn 12446
« Reply #16 on: June 07, 2021, 08:12:44 pm »
I have added  -fno-strict-aliasing to the Squirrel target. Effectively, less warnings during the build (a full rebuild), but it's not sufficient: the problem is still there :(
Windows 10 64 bits (21H1), svn C::B (last version or almost!), wxWidgets 3.1.5, Msys2 Compilers 10.3.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13318
    • Travis build status
Re: Problem with svn 12446
« Reply #17 on: June 07, 2021, 08:29:01 pm »
Are you still using rev 12446? There were major problems with the new squirrel binding API which I've since fixed.
Have you tried to build the latest trunk?
(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 gd_on

  • Lives here!
  • ****
  • Posts: 651
Re: Problem with svn 12446
« Reply #18 on: June 07, 2021, 11:28:03 pm »
I use now svn 12458 (as told in reply #14), but this does not change anything for this specific problem. RPT file is the same (except for addresses).

If you look also in my reply #13, you can see that the problem is not recent, and was already there before the new squirrel rewrite.
« Last Edit: June 08, 2021, 09:31:20 am by gd_on »
Windows 10 64 bits (21H1), svn C::B (last version or almost!), wxWidgets 3.1.5, Msys2 Compilers 10.3.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Online AndrewCot

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Problem with svn 12446
« Reply #19 on: Yesterday at 06:48:05 am »
I have been able to reproduce the crash with the source from https://github.com/obfuscated/codeblocks_sf and it is crashing in the same spot as my RPT file looks like the same as post#11's codeblocks-g.RPT. The version is reporting as svn-r12459.


 

Online AndrewCot

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Problem with svn 12446
« Reply #20 on: Yesterday at 09:25:12 am »
My debugging shows the crash occurs in the in the SortTemplates() function in the \src\sdk\newfromtemplatedlg.cpp file, but the problem is hard to debug as the variables are wxWidget data types and are not shown in a readable format in the watch window. I have got the wxwidget pretty printing to work, but it is missing some of the structures... More work!!!!!

It looks like there may be some GCC bug as I have added a bunch of logging, but it does not work as my first line "if (data1->pt)" causes a crash. If I set a breakpoint on the line and watch the data1->pt is shows "Cannot access memory at address 0xffffffffd90246c0". When watching data1 is is also pointing to 0xffffffffd90246c0.

I suspect a GCC issue. Anyone got any ideas or any pointers on what to try next?

When I modify the newfromtemplatedlg.cpp the following is the relevant biuld log output:
-------------- Build: sdk in Code::Blocks wx3.1.x (64 bit) (compiler: MSYS2 GNU GCC Compiler)---------------

Running target pre-build steps
.objs31_64\autorevision +wx +int +t .. include/autorevision.h
g++.exe -Wall -std=gnu++11 -m64 -g -Og -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DNOPCH -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -IF:\Andrew_Development\wxWidgets-3.1.5\include -IF:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c F:\Andrew_Development\codeblocks_sf\src\sdk\newfromtemplatedlg.cpp -o .objs31_64\sdk\newfromtemplatedlg.o
g++.exe -shared  -Wl,--out-implib=devel31_64\libcodeblocks.a -Wl,--dll -LF:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll -Ldevel31_64 <<<OBJECT LIST REMOVED>>>  -o devel31_64\codeblocks.dll -Wl,--enable-auto-image-base -Wl,--add-stdcall-alias -Wl,--enable-auto-import -Wl,--no-undefined -m64  -lshfolder -ltxml -lwxscintilla_cb -lsquirrel -lgdi32 -lwxmsw31u
Output file is devel31_64\codeblocks.dll with size 126.20 MB
Running target post-build steps
cmd /c if not exist devel31_64\share\CodeBlocks mkdir devel31_64\share\CodeBlocks
zip -jq9 devel31_64\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc
cmd /c "cd sdk\resources & zip -0 -q ..\..\devel31_64\share\CodeBlocks\manager_resources.zip images\*.png images\8x8\*.png images\10x10\*.png images\12x12\*.png images\16x16\*.png images\20x20\*.png images\24x24\*.png images\28x28\*.png images\32x32\*.png images\40x40\*.png images\48x48\*.png images\56x56\*.png images\64x64\*.png"


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13318
    • Travis build status
Re: Problem with svn 12446
« Reply #21 on: Yesterday at 09:50:05 am »
Can you post a backtrace? Does it crash if you use night builds provided by us?
(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!]

Online AndrewCot

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Problem with svn 12446
« Reply #22 on: Today at 07:29:45 am »
If I use the nightly SVN12458 it does not crash.

Attached is the GDB backtrace and the codeblocks.rpt for the same exe.

Online AndrewCot

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Problem with svn 12446
« Reply #23 on: Today at 08:02:35 am »
If I comment out the "list->SortItems(SortTemplates, (wxIntPtr)0);" line then the wizard is shown. I have not done any testing on the wizard to see if it works or not.