Code::Blocks

User forums => Nightly builds => Topic started by: killerbot on December 30, 2018, 01:35:24 pm

Title: The 30 December 2018 build (11543) is out.
Post by: killerbot on December 30, 2018, 01:35:24 pm
Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

Before you use a nightly make sure you understand how it works (http://forums.codeblocks.org/index.php/topic,3232.0.html).

A link to the unicode windows wxWidget dll(s) for Code::Blocks : http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/wxmsw31u_gcc_cb_wx311_gcc810-mingw64.7z
A link to Mingw64 dll's needed by Code::Blocks : http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/Mingw64dlls8.1.0.7z


The 30 December 2018 build is out.
  - Windows :
   http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/2018/CB_20181230_rev11543_win64.7z
  - Linux :
   none

The current SDK version is : 1.37.0

Resolved Fixed:


Regressions/Confirmed/Annoying/Common bugs:


Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on December 30, 2018, 02:26:36 pm
anyone seeing crashes with this ?


Code: [Select]
Error occurred on Sunday, December 30, 2018 at 14:25:15.

codeblocks.exe caused an Access Violation at location 00000000677535AC in module codecompletion.dll Reading from location 0000000000000000.

AddrPC           Params
00000000677535AC 000000000DC28E30 000000000E7964F0 000000000EF75658  codecompletion.dll!0x935ac
0000000067753F32 000000000DC28E30 000000000E7964F0 0000000000000006  codecompletion.dll!0x93f32
00000000677539B6 000000000DC28E30 000000000D974280 000000000E7964E0  codecompletion.dll!0x939b6
00000000677532CF 000000000DC28E30 000000000D974280 00000000FFFFFFFF  codecompletion.dll!0x932cf
0000000067751B1F 000000000DC28E30 0000000067750F7E 000000000DC28E30  codecompletion.dll!0x91b1f
0000000067751401 000000000E7965E0 000000000DC28E30 000000000F83BDF0  codecompletion.dll!0x91401
00000000677511C6 000000000E796730 000000000DC28E30 000000000F4F0AC0  codecompletion.dll!0x911c6
000000006773C4B8 000000000DC28E20 000000000DC28E30 0000000002000002  codecompletion.dll!0x7c4b8
000000006773C0DD 000000000DC28E20 000000000DC29048 0000000008F4D700  codecompletion.dll!0x7c0dd
000000006773AC75 000000000DC28E20 000000000DC28E20 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 0000000008F4D3B0 000000000E797E00 000000000E797E00  codecompletion.dll!0x712d4
000000006773467D 0000000008F4D3B0 000000000E797E00 000000000DC28B01  codecompletion.dll!0x7467d
000000006773EC6A 000000000DC28950 000000006780B8A0 0000000002000002  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000DC28950 000000000DC28B78 0000000008F4D700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000DC28950 000000000DC28950 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 0000000008F4D3B0 000000000E798E20 000000000E798E00  codecompletion.dll!0x712d4
000000006773467D 0000000008F4D3B0 000000000E798E20 000000000DC28101  codecompletion.dll!0x7467d
000000006773EC6A 000000000DC27FB0 000000006780B8A0 0000000002080130  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000DC27FB0 000000000DC281D8 0000000008F4D700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000DC27FB0 000000000DC27FB0 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 0000000008F4D3B0 000000000E799E40 000000000E799E00  codecompletion.dll!0x712d4
000000006773467D 0000000008F4D3B0 000000000E799E40 000000000DC26E01  codecompletion.dll!0x7467d
000000006773EC6A 000000000DC26C70 000000006780B8A0 0000000002000002  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000DC26C70 000000000DC26E98 0000000008F4D700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000DC26C70 000000000DC26C70 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 0000000008F4D3B0 000000000E79AE60 000000000E79AE00  codecompletion.dll!0x712d4
000000006773467D 0000000008F4D3B0 000000000E79AE60 000000000DC28601  codecompletion.dll!0x7467d
000000006773EC6A 000000000DC28480 000000006780B8A0 00000000020800F0  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000DC28480 000000000DC286A8 0000000008F4D700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000DC28480 000000000DC28480 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 0000000008F4D3B0 000000000E79BE80 000000000E79BE00  codecompletion.dll!0x712d4
000000006773467D 0000000008F4D3B0 000000000E79BE80 000000000DC26901  codecompletion.dll!0x7467d
000000006773EC6A 000000000DC267A0 000000006780B8A0 0000000002000000  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000DC267A0 000000000DC269C8 0000000008F4D700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000DC267A0 000000000DC267A0 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 0000000008F4D3B0 000000000E79CEA0 000000000E79CE00  codecompletion.dll!0x712d4
000000006773467D 0000000008F4D3B0 000000000E79CEA0 000000000DC26401  codecompletion.dll!0x7467d
000000006773EC6A 000000000DC262D0 000000006780B8A0 000000000208004C  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000DC262D0 000000000DC264F8 0000000008F4D700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000DC262D0 000000000DC262D0 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 0000000008F4D3B0 000000000E79DEC0 000000000E79DE00  codecompletion.dll!0x712d4
000000006773467D 0000000008F4D3B0 000000000E79DEC0 000000000DC26001  codecompletion.dll!0x7467d
000000006773EC6A 000000000DC25E00 000000006780B8A0 000000000208004E  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000DC25E00 000000000DC26028 0000000008F4D700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000DC25E00 000000000DC25E00 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 0000000008F4D3B0 000000000E79EEE0 000000000E79EE00  codecompletion.dll!0x712d4
000000006773467D 0000000008F4D3B0 000000000E79EEE0 000000000D8F9001  codecompletion.dll!0x7467d
000000006773EC6A 000000000D8F8E50 000000006780B8A0 0000000002080058  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000D8F8E50 000000000D8F9078 000000000D621800  codecompletion.dll!0x7b1a7
000000006773AC75 000000000D8F8E50 00000000000005CC 000000000E79F900  codecompletion.dll!0x7ac75
0000000067761A62 000000000D8F8E50 000000000D621880 0000000000000000  codecompletion.dll!0xa1a62
00000000709787AF 000000000D621820 0000000000000000 0000000000000000  codeblocks.dll!cbThreadPool::cbWorkerThread::Entry
0000000069D3AFF2 000000000D621820 000000000D621830 0000000000000000  wxmsw311u_gcc_cb.dll!wxThread::CallEntry
0000000069D3F419 00007FFD02A0F090 0000000000000000 0000000000000000  wxmsw311u_gcc_cb.dll!wxMutex::wxMutex
0000000069D3FD01 00000000090466F0 0000000000000000 0000000000000000  wxmsw311u_gcc_cb.dll!wxMutex::wxMutex
00007FFD0004AE06 00007FFD0009F6D0 000000000911C140 0000000000000000  msvcrt.dll!_beginthreadex
00007FFD0004AEDC 0000000000000000 0000000000000000 0000000000000000  msvcrt.dll!_endthreadex
00007FFD000C2784 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk
00007FFD02A30C31 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart
Title: Re: The 30 December 2018 build (11543) is out.
Post by: cyuyan on December 30, 2018, 02:36:45 pm
It needs three files:libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on December 30, 2018, 03:04:03 pm
ok, thanks for the info, can anyone confirm this ?

Upon confirmation I will package them and upload them.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: zed on December 30, 2018, 04:28:41 pm
can anyone confirm this ?
Yes, you need this dll's:

Code: [Select]
c:\dev\CodeBlocks>dumpbin /dependents codeblocks.exe

Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file codeblocks.exe

File Type: EXECUTABLE IMAGE

  Image has the following dependencies:

    COMCTL32.dll
    libgcc_s_seh-1.dll
    KERNEL32.dll
    msvcrt.dll
    SHELL32.dll
    SHFOLDER.dll
    USER32.dll
    libstdc++-6.dll
    wxmsw311u_gcc_cb.dll
    codeblocks.dll
    exchndl.dll

  Summary

        1000 .CRT
        A000 .bss
        1000 .data
        1000 .edata
       20000 .idata
       11000 .pdata
       39000 .rdata
        7000 .reloc
       3D000 .rsrc
      123000 .text
        1000 .tls
       1E000 .xdata
Title: Re: The 30 December 2018 build (11543) is out.
Post by: gd_on on December 30, 2018, 05:31:17 pm
Yes, these dlls are necessary.
If I remember well, with TDM compilers it was not necessary because those dependancies were statically linked internally.
Of course, if you have installed MinGW 8.1 compiler 64 bits, and the bin subfolder is in your path variable, it's not useful to duplicate them. But for a standard distribution, without compiler, you need them just for C::B itself.

gd_on
Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on December 30, 2018, 06:53:08 pm
dll's added in a zip file (Mingw64dlls8.1.0.7z), see original message.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: BlueHazzard on December 30, 2018, 08:06:47 pm
dll's added in a zip file (Mingw64dlls8.1.0.7z), see original message.
Thank you. I tested the build and got the same crash for code completion
Code: [Select]
00000000677535AC 000000000CB29760 000000000D2DF150 000000000D29D018  codecompletion.dll!0x935ac
0000000067753F32 000000000CB29760 000000000D2DF150 000000000000000D  codecompletion.dll!0x93f32
00000000677539B6 000000000CB29760 000000000D175330 000000000A6F9DF0  codecompletion.dll!0x939b6
00000000677532CF 000000000CB29760 000000000D175330 00000000FFFFFFFF  codecompletion.dll!0x932cf
0000000067751B1F 000000000CB29760 0000000067750F7E 000000000CB29760  codecompletion.dll!0x91b1f
0000000067751401 000000000A6F9EF0 000000000CB29760 000000000CB29AF0  codecompletion.dll!0x91401
0000000067751067 000000000A6FA310 000000000CB29760 000000000C71D2F0  codecompletion.dll!0x91067
000000006773BFE7 000000000CB29750 000000000CB29978 00000000079DF700  codecompletion.dll!0x7bfe7
000000006773AC75 000000000CB29750 000000000CB29750 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 00000000079DF420 000000000A6FAE60 000000000A6FAE00  codecompletion.dll!0x712d4
000000006773467D 00000000079DF420 000000000A6FAE60 000000000CB29401  codecompletion.dll!0x7467d
000000006773EC6A 000000000CB29280 000000006780B8A0 000000000C47CC60  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000CB29280 000000000CB294A8 00000000079DF700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000CB29280 000000000CB29280 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 00000000079DF420 000000000A6FBE80 000000000A6FBE00  codecompletion.dll!0x712d4
000000006773467D 00000000079DF420 000000000A6FBE80 000000000CB28F01  codecompletion.dll!0x7467d
000000006773EC6A 000000000CB28DB0 000000006780B8A0 0000000007DFCB80  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000CB28DB0 000000000CB28FD8 00000000079DF700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000CB28DB0 000000000CB28DB0 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 00000000079DF420 000000000A6FCEA0 000000000A6FCE00  codecompletion.dll!0x712d4
000000006773467D 00000000079DF420 000000000A6FCEA0 000000000CB28B01  codecompletion.dll!0x7467d
000000006773EC6A 000000000CB288E0 000000006780B8A0 0000000007A78D40  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000CB288E0 000000000CB28B08 00000000079DF700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000CB288E0 000000000CB288E0 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 00000000079DF420 000000000A6FDEC0 000000000A6FDE00  codecompletion.dll!0x712d4
000000006773467D 00000000079DF420 000000000A6FDEC0 000000000CB28101  codecompletion.dll!0x7467d
000000006773EC6A 000000000CB27F40 000000006780B8A0 000000000CAF8A60  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000CB27F40 000000000CB28168 00000000079DF700  codecompletion.dll!0x7b1a7
000000006773AC75 000000000CB27F40 000000000CB27F40 0000000000000000  codecompletion.dll!0x7ac75
00000000677312D4 00000000079DF420 000000000A6FEEE0 000000000A6FEE00  codecompletion.dll!0x712d4
000000006773467D 00000000079DF420 000000000A6FEEE0 000000000C6E5401  codecompletion.dll!0x7467d
000000006773EC6A 000000000C6E52A0 000000006780B8A0 000000000C68B230  codecompletion.dll!0x7ec6a
000000006773B1A7 000000000C6E52A0 000000000C6E54C8 000000000B977A00  codecompletion.dll!0x7b1a7
000000006773AC75 000000000C6E52A0 0000000000000430 000000000A6FF900  codecompletion.dll!0x7ac75
0000000067761A62 000000000C6E52A0 000000000B977A90 0000000000000000  codecompletion.dll!0xa1a62
00000000709787AF 000000000B977A30 0000000000000000 0000000000000000  codeblocks.dll!cbThreadPool::cbWorkerThread::Entry
0000000069D3AFF2 000000000B977A30 000000000B977A40 0000000000000000  wxmsw311u_gcc_cb.dll!wxThread::CallEntry
0000000069D3F419 000000000B977A30 0000000007AEFB90 0000000000000000  wxmsw311u_gcc_cb.dll!wxMutex::wxMutex
0000000069D3FD01 0000000007E5D760 0000000000000000 0000000000000000  wxmsw311u_gcc_cb.dll!wxMutex::wxMutex
000007FEFD7F415F 000007FEFD881EA0 0000000007E5D760 0000000000000000  msvcrt.dll!_endthreadex
000007FEFD7F6EBD 0000000000000000 0000000000000000 0000000000000000  msvcrt.dll!_endthreadex
0000000076FC59CD 0000000000000000 0000000000000000 0000000000000000  kernel32.dll!BaseThreadInitThunk
000000007722385D 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart

Would it be possible to  leave the debugging symbols in the nightly build? So this (and other nightly crashes) would be more easier to debug...
Title: Re: The 30 December 2018 build (11543) is out.
Post by: BlueHazzard on December 30, 2018, 08:12:36 pm
Also the layout is strange, and some symbols in the toolbar are missing ,
see the attached image the missing symbols for thread search (where the override is written)
Title: Re: The 30 December 2018 build (11543) is out.
Post by: Melchior on December 30, 2018, 08:13:12 pm
Would it be possible to  leave the debugging symbols in the nightly build? So this (and other nightly crashes) would be more easier to debug...
would be nice if they did that lol...
Title: Re: The 30 December 2018 build (11543) is out.
Post by: sphinx66 on December 30, 2018, 09:31:19 pm
This version crash on start, when I try open existing project
Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on December 31, 2018, 08:35:31 am
could everyone who suffers from some crash, try the same thing with the previous nightly (same code version but the older compiler), so we can determine if it is due to code changes or just using the new compiler.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: BlueHazzard on December 31, 2018, 10:48:51 am
could everyone who suffers from some crash, try the same thing with the previous nightly (same code version but the older compiler), so we can determine if it is due to code changes or just using the new compiler.
I have tried it and at the moment i do not get any crash during working. I will still test during the day.

Also the missing images are present (see the attached image and compare it with the image from the previous post)

Could it be that the build was not completely clean before compiler switching?
Title: Re: The 30 December 2018 build (11543) is out.
Post by: usercdbl on December 31, 2018, 11:06:33 am
The Zip File size of the latest version is smaller than the previous one.
Is there any reason that you know?
Please see in the attached jpg.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on December 31, 2018, 11:43:55 am
new compiler version that creates smaller stuff ?

Or because it in the old one something was in there which was obsolete ? For the new toolchain build I started with a clean development dir ...

I will try to have a look at the difference.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: Khram on December 31, 2018, 12:02:09 pm
May be better to use this "Equation" compiler: ftp://ftp.equation.com/gcc/gcc-8.2.0-64.exe from http://www.equation.com/servlet/equation.cmd?fa=fortran
Title: Re: The 30 December 2018 build (11543) is out.
Post by: usercdbl on December 31, 2018, 12:25:52 pm
I use MSYS2 mingw gcc-8.2 64 bit compiler.
I can open the project in CodeBlocks but when I try to write in the editor the CodeBlocks Window disappears.(With CB_20181230_rev11543, 3 dll files are in the folder of CB)
I have no problem with the previous version. (CB_20181229_rev11543)
Title: Re: The 30 December 2018 build (11543) is out.
Post by: cyuyan on December 31, 2018, 12:31:18 pm
This version crash on start, when I try open existing project

Me too!
Title: Re: The 30 December 2018 build (11543) is out.
Post by: BlueHazzard on December 31, 2018, 02:16:19 pm
The Zip File size of the latest version is smaller than the previous one.
Is there any reason that you know?
Please see in the attached jpg.
You have to add the static linked libraries, that killerbot provides in a other download. TDM links statically to this libraries and for this the executable will be larger...
But i still think there may be some differences...

PS. I am amazed how png is better then jpg... Your attached jpg image has roughly the same resolution as my attached png image, still i need only half the file size and it is loose less compressed...
Title: Re: The 30 December 2018 build (11543) is out.
Post by: usercdbl on December 31, 2018, 05:26:15 pm
At first I had added mingw64/bin to path, did not work.
Then I had copied dll files to CB Nightly's folder, did not work either.
I tried to add dll files to Compiler-Linker table, did not work.

I prepared the image in microsoft paint. Paint produces png file of the same image with a size of 118 KB, three times larger than jpg.
I think it depends on the program that one uses.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: riban on January 01, 2019, 09:08:34 am
This nightly (svn 11543) is crashing for me also. Can't get past first stage of a project so it is unusable. Opening an existing project crashes. Creating new command line (hello world) project crashes when trying to compile. It is too irksome to repeat and debug but give specific instructions to gather info and I will give it a go.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on January 01, 2019, 10:06:09 am
for all those who have crashes when opening your projects, could you please first try to disable the code completion plug-in, and see it that avoids the crash ?
Title: Re: The 30 December 2018 build (11543) is out.
Post by: riban on January 01, 2019, 10:10:07 am
Did some more testing and it seems that disabling Code Completion plugin stops the crashing.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: sphinx66 on January 01, 2019, 10:37:07 am
disabling Code Completion plugin stops crashing  (I try one project, more tests should be done)
Title: Re: The 30 December 2018 build (11543) is out.
Post by: riban on January 01, 2019, 10:39:50 am
Saw an assertion error which might be a useful pointer:

Assertion failed in SystemHeadersThread::SystemHeadersThread(wxEvtHandler*, wxCritialSection*, SystemHeadersMap&, const wxArrayString&) at D:\Codeblocks\src\plugins\codecompletion\systemheadersthread.cpp:145.

incDirs.size()>0
Title: Re: The 30 December 2018 build (11543) is out.
Post by: usercdbl on January 01, 2019, 01:19:32 pm
I was able to write, compile and execute in CodeBlocks after disabling the Code Completion Plugin.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 01, 2019, 03:54:24 pm
Saw an assertion error which might be a useful pointer:

Assertion failed in SystemHeadersThread::SystemHeadersThread(wxEvtHandler*, wxCritialSection*, SystemHeadersMap&, const wxArrayString&) at D:\Codeblocks\src\plugins\codecompletion\systemheadersthread.cpp:145.

incDirs.size()>0
Are you able to reproduce this on a simple project? Do you have something special in your compiler settings?
Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on January 01, 2019, 06:36:41 pm
When launching the debug build (so no symbols stripped) : and loading the  CB workspace and then wait a few seconds (no further investigation done)

PART 1 :
Code: [Select]
-------------------

Error occurred on Tuesday, January 1, 2019 at 18:34:03.

codeblocks.exe caused an Access Violation at location 00000000097235AC in module codecompletion.dll Reading from location 0000000000000000.

AddrPC           Params
00000000097235AC 000000001F2968F0 0000000021A764F0 000000001EED6B68  codecompletion.dll!KMP_Find  [D:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 1720]
  1718:         else
  1719:         {
> 1720:             index += j - next[j];
  1721:             if (next[j] != -1)
  1722:                 j = next[j];
0000000009723F32 000000001F2968F0 0000000021A764F0 0000000000000006  codecompletion.dll!GetFirstTokenPosition  [D:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 1934]
  1932:     for (;;)
  1933:     {
> 1934:         const int ret = KMP_Find(p, key, keyLen);
  1935:         if (ret == -1)
  1936:             break;
00000000097239B6 000000001F2968F0 000000001F0F09F0 0000000021A764E0  codecompletion.dll!GetMacroExpandedText  [D:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 1849]
  1847:         {
  1848:             // find the first exist of formal arg from data to dataEnd
> 1849:             const int pos = GetFirstTokenPosition(data, dataEnd - data, key, keyLen);
  1850:             if (pos != -1)
  1851:             {
00000000097232CF 000000001F2968F0 000000001F0F09F0 00000000FFFFFFFF  codecompletion.dll!ReplaceMacroUsage  [D:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 1665]
  1663:
  1664:     wxString macroExpandedText;
> 1665:     if ( GetMacroExpandedText(tk, macroExpandedText) )
  1666:         return ReplaceBufferText(macroExpandedText, tk);
  1667:
0000000009721B1F 000000001F2968F0 0000000009720F7E 000000001F2968F0  codecompletion.dll!CheckMacroUsageAndReplace  [D:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 1089]
  1087:         const Token* token = m_TokenTree->at(id);
  1088:         if (token)
> 1089:             return ReplaceMacroUsage(token);// either object like macro or function like macro can be handled
  1090:     }
  1091:     return false;
0000000009721401 0000000021A765E0 000000001F2968F0 0000000021C27CA0  codecompletion.dll!DoGetToken  [D:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 966]
   964:         if (identifier)
   965:         {
>  966:             bool replaced = CheckMacroUsageAndReplace();
   967:             // replaced is true means macro expansion happens, so we need to call Lex()
   968:             if (replaced)
00000000097211C6 0000000021A76730 000000001F2968F0 000000000EDC9040  codecompletion.dll!PeekToken  [D:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 904]
   902:         if (SkipUnwanted())
   903:         {
>  904:             m_PeekToken = DoGetToken();
   905:             if (m_PeekToken == _T("(") && m_State^tsRawExpression)
   906:                 ReadParentheses(m_PeekToken);
000000000970C4B8 000000001F2968E0 000000001F2968F0 0000000002000002  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1016]
  1014:                         {
  1015:                             // check for operator()()
> 1016:                             wxString peek = m_Tokenizer.PeekToken();
  1017:                             if (  !peek.IsEmpty()
  1018:                                 && peek.GetChar(0) != ParserConsts::opbracket_chr)
000000000970C0DD 000000001F2968E0 000000001F296B08 000000000EF41400  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 929]
   927:                     {
   928:                         m_Tokenizer.GetToken(); // "eat" {
>  929:                         DoParse(); // time for recursion ;)
   930:                     }
   931:                 }
000000000970AC75 000000001F2968E0 000000001F2968E0 0000000000000000  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
00000000097012D4 000000000EF41130 0000000021A77E00 0000000021A77E00  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 345]
   343:             // run the parse recursively
   344:             AddParserThread(thread);
>  345:             result = thread->Parse();
   346:             RemoveParserThread(thread);
   347:             delete thread;
000000000970467D 000000000EF41130 0000000021A77E00 000000001F298701  codecompletion.dll!ParseFile  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 670]
   668:
   669:     // TODO (Morten#9#) locker ?
>  670:     const bool ret = Parse(filename, !isGlobal, locked);
   671:
   672:     return ret;
000000000970EC6A 000000001F2985C0 00000000097DB8A0 000000000208010A  codecompletion.dll!HandleIncludes  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1738]
  1736:
  1737:             TRACE(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str());
> 1738:             m_Parent->ParseFile(real_filename, isGlobal, true);
  1739:         }
  1740:         while (false);
000000000970B1A7 000000001F2985C0 000000001F2987E8 000000000EF41400  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 653]
   651:                     // those could be: "#include" or "#warning" or "#xxx" and more
   652:                     if (token == ParserConsts::kw_include)
>  653:                         HandleIncludes();
   654:                     else // handle "#warning" or "#xxx" and more, just skip them
   655:                         m_Tokenizer.SkipToEOL();
000000000970AC75 000000001F2985C0 000000001F2985C0 0000000000000000  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
00000000097012D4 000000000EF41130 0000000021A78E20 0000000021A78E00  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 345]
   343:             // run the parse recursively
   344:             AddParserThread(thread);
>  345:             result = thread->Parse();
   346:             RemoveParserThread(thread);
   347:             delete thread;
000000000970467D 000000000EF41130 0000000021A78E20 000000001F293101  codecompletion.dll!ParseFile  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 670]
   668:
   669:     // TODO (Morten#9#) locker ?
>  670:     const bool ret = Parse(filename, !isGlobal, locked);
   671:
   672:     return ret;
000000000970EC6A 000000001F292F20 00000000097DB8A0 0000000002080130  codecompletion.dll!HandleIncludes  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1738]
  1736:
  1737:             TRACE(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str());
> 1738:             m_Parent->ParseFile(real_filename, isGlobal, true);
  1739:         }
  1740:         while (false);
000000000970B1A7 000000001F292F20 000000001F293148 000000000EF41400  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 653]
   651:                     // those could be: "#include" or "#warning" or "#xxx" and more
   652:                     if (token == ParserConsts::kw_include)
>  653:                         HandleIncludes();
   654:                     else // handle "#warning" or "#xxx" and more, just skip them
   655:                         m_Tokenizer.SkipToEOL();
000000000970AC75 000000001F292F20 000000001F292F20 0000000000000000  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
00000000097012D4 000000000EF41130 0000000021A79E40 0000000021A79E00  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 345]
   343:             // run the parse recursively
   344:             AddParserThread(thread);
>  345:             result = thread->Parse();
   346:             RemoveParserThread(thread);
   347:             delete thread;
000000000970467D 000000000EF41130 0000000021A79E40 000000001F299B01  codecompletion.dll!ParseFile  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 670]
   668:
   669:     // TODO (Morten#9#) locker ?
>  670:     const bool ret = Parse(filename, !isGlobal, locked);
   671:
   672:     return ret;
000000000970EC6A 000000001F299900 00000000097DB8A0 0000000002000002  codecompletion.dll!HandleIncludes  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1738]
  1736:
  1737:             TRACE(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str());
> 1738:             m_Parent->ParseFile(real_filename, isGlobal, true);
  1739:         }
  1740:         while (false);
000000000970B1A7 000000001F299900 000000001F299B28 000000000EF41400  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 653]
   651:                     // those could be: "#include" or "#warning" or "#xxx" and more
   652:                     if (token == ParserConsts::kw_include)
>  653:                         HandleIncludes();
   654:                     else // handle "#warning" or "#xxx" and more, just skip them
   655:                         m_Tokenizer.SkipToEOL();
000000000970AC75 000000001F299900 000000001F299900 0000000000000000  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
00000000097012D4 000000000EF41130 0000000021A7AE60 0000000021A7AE00  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 345]
   343:             // run the parse recursively
   344:             AddParserThread(thread);
>  345:             result = thread->Parse();
   346:             RemoveParserThread(thread);
   347:             delete thread;
000000000970467D 000000000EF41130 0000000021A7AE60 000000001F292701  codecompletion.dll!ParseFile  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 670]
   668:
   669:     // TODO (Morten#9#) locker ?
>  670:     const bool ret = Parse(filename, !isGlobal, locked);
   671:
   672:     return ret;
000000000970EC6A 000000001F292580 00000000097DB8A0 00000000020800F0  codecompletion.dll!HandleIncludes  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1738]
  1736:
  1737:             TRACE(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str());
> 1738:             m_Parent->ParseFile(real_filename, isGlobal, true);
  1739:         }
  1740:         while (false);
000000000970B1A7 000000001F292580 000000001F2927A8 000000000EF41400  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 653]
   651:                     // those could be: "#include" or "#warning" or "#xxx" and more
   652:                     if (token == ParserConsts::kw_include)
>  653:                         HandleIncludes();
   654:                     else // handle "#warning" or "#xxx" and more, just skip them
   655:                         m_Tokenizer.SkipToEOL();
000000000970AC75 000000001F292580 000000001F292580 0000000000000000  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
00000000097012D4 000000000EF41130 0000000021A7BE80 0000000021A7BE00  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 345]
   343:             // run the parse recursively
   344:             AddParserThread(thread);
>  345:             result = thread->Parse();
   346:             RemoveParserThread(thread);
   347:             delete thread;
000000000970467D 000000000EF41130 0000000021A7BE80 000000001F294E01  codecompletion.dll!ParseFile  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 670]
   668:
   669:     // TODO (Morten#9#) locker ?
>  670:     const bool ret = Parse(filename, !isGlobal, locked);
   671:
   672:     return ret;

Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on January 01, 2019, 06:37:11 pm
and part 2 of the call stack :

Code: [Select]
000000000970EC6A 000000001F294C00 00000000097DB8A0 0000000002000000  codecompletion.dll!HandleIncludes  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1738]
  1736:
  1737:             TRACE(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str());
> 1738:             m_Parent->ParseFile(real_filename, isGlobal, true);
  1739:         }
  1740:         while (false);
000000000970B1A7 000000001F294C00 000000001F294E28 000000000EF41400  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 653]
   651:                     // those could be: "#include" or "#warning" or "#xxx" and more
   652:                     if (token == ParserConsts::kw_include)
>  653:                         HandleIncludes();
   654:                     else // handle "#warning" or "#xxx" and more, just skip them
   655:                         m_Tokenizer.SkipToEOL();
000000000970AC75 000000001F294C00 000000001F294C00 0000000000000000  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
00000000097012D4 000000000EF41130 0000000021A7CEA0 0000000021A7CE00  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 345]
   343:             // run the parse recursively
   344:             AddParserThread(thread);
>  345:             result = thread->Parse();
   346:             RemoveParserThread(thread);
   347:             delete thread;
000000000970467D 000000000EF41130 0000000021A7CEA0 000000001F292201  codecompletion.dll!ParseFile  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 670]
   668:
   669:     // TODO (Morten#9#) locker ?
>  670:     const bool ret = Parse(filename, !isGlobal, locked);
   671:
   672:     return ret;
000000000970EC6A 000000001F2920B0 00000000097DB8A0 000000000208004C  codecompletion.dll!HandleIncludes  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1738]
  1736:
  1737:             TRACE(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str());
> 1738:             m_Parent->ParseFile(real_filename, isGlobal, true);
  1739:         }
  1740:         while (false);
000000000970B1A7 000000001F2920B0 000000001F2922D8 000000000EF41400  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 653]
   651:                     // those could be: "#include" or "#warning" or "#xxx" and more
   652:                     if (token == ParserConsts::kw_include)
>  653:                         HandleIncludes();
   654:                     else // handle "#warning" or "#xxx" and more, just skip them
   655:                         m_Tokenizer.SkipToEOL();
000000000970AC75 000000001F2920B0 000000001F2920B0 0000000000000000  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
00000000097012D4 000000000EF41130 0000000021A7DEC0 0000000021A7DE00  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 345]
   343:             // run the parse recursively
   344:             AddParserThread(thread);
>  345:             result = thread->Parse();
   346:             RemoveParserThread(thread);
   347:             delete thread;
000000000970467D 000000000EF41130 0000000021A7DEC0 000000001F295201  codecompletion.dll!ParseFile  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 670]
   668:
   669:     // TODO (Morten#9#) locker ?
>  670:     const bool ret = Parse(filename, !isGlobal, locked);
   671:
   672:     return ret;
000000000970EC6A 000000001F2950D0 00000000097DB8A0 000000000208003E  codecompletion.dll!HandleIncludes  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1738]
  1736:
  1737:             TRACE(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str());
> 1738:             m_Parent->ParseFile(real_filename, isGlobal, true);
  1739:         }
  1740:         while (false);
000000000970B1A7 000000001F2950D0 000000001F2952F8 000000000EF41400  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 653]
   651:                     // those could be: "#include" or "#warning" or "#xxx" and more
   652:                     if (token == ParserConsts::kw_include)
>  653:                         HandleIncludes();
   654:                     else // handle "#warning" or "#xxx" and more, just skip them
   655:                         m_Tokenizer.SkipToEOL();
000000000970AC75 000000001F2950D0 000000001F2950D0 0000000000000000  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
00000000097012D4 000000000EF41130 0000000021A7EEE0 0000000021A7EE00  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 345]
   343:             // run the parse recursively
   344:             AddParserThread(thread);
>  345:             result = thread->Parse();
   346:             RemoveParserThread(thread);
   347:             delete thread;
000000000970467D 000000000EF41130 0000000021A7EEE0 000000000F319701  codecompletion.dll!ParseFile  [D:/Codeblocks/src/plugins/codecompletion/parser/parser.cpp @ 670]
   668:
   669:     // TODO (Morten#9#) locker ?
>  670:     const bool ret = Parse(filename, !isGlobal, locked);
   671:
   672:     return ret;
000000000970EC6A 000000000F319550 00000000097DB8A0 0000000002000002  codecompletion.dll!HandleIncludes  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 1738]
  1736:
  1737:             TRACE(_T("HandleIncludes() : Adding include file '%s'"), real_filename.wx_str());
> 1738:             m_Parent->ParseFile(real_filename, isGlobal, true);
  1739:         }
  1740:         while (false);
000000000970B1A7 000000000F319550 000000000F319778 000000001EF07700  codecompletion.dll!DoParse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 653]
   651:                     // those could be: "#include" or "#warning" or "#xxx" and more
   652:                     if (token == ParserConsts::kw_include)
>  653:                         HandleIncludes();
   654:                     else // handle "#warning" or "#xxx" and more, just skip them
   655:                         m_Tokenizer.SkipToEOL();
000000000970AC75 000000000F319550 0000000000000660 0000000021A7F900  codecompletion.dll!Parse  [D:/Codeblocks/src/plugins/codecompletion/parser/parserthread.cpp @ 533]
   531:         }
   532:
>  533:         DoParse();
   534:
   535:         if (!m_Options.useBuffer) // Parsing a file
0000000009731A62 000000000F319550 000000001EF07840 0000000000000000  codecompletion.dll!Execute  [D:/Development/wxWidgets-3.1.1/include/wx/wxcrt.h @ 958]
   956:
   957: inline bool wxIsalnum(const wxUniChar& c)  { return wxCRT_IsalnumW(c) != 0; }
>  958: inline bool wxIsalpha(const wxUniChar& c)  { return wxCRT_IsalphaW(c) != 0; }
   959: inline bool wxIscntrl(const wxUniChar& c)  { return wxCRT_IscntrlW(c) != 0; }
   960: inline bool wxIsdigit(const wxUniChar& c)  { return wxCRT_IsdigitW(c) != 0; }
00000000709787AF 000000001EF077E0 0000000000000000 0000000000000000  codeblocks.dll!Entry  [D:/Codeblocks/src/sdk/cbthreadpool.cpp @ 228]
   226:     if (!Aborted())
   227:     {
>  228:       m_pTask->Execute(); // run task's job here
   229:
   230:       {
0000000069D3AFF2 000000001EF077E0 000000001EF077F0 0000000000000000  wxmsw311u_gcc_cb.dll!wxThread::CallEntry
0000000069D3F419 00007FFD02A0F090 0000000000000000 0000000000000000  wxmsw311u_gcc_cb.dll!wxThreadInternal::DoThreadStart
0000000069D3FD01 000000000EF6CF80 0000000000000000 0000000000000000  wxmsw311u_gcc_cb.dll!wxThreadInternal::WinThreadStart
00007FFD0004AE06 00007FFD0009F6D0 000000000F038060 0000000000000000  msvcrt.dll!_beginthreadex
00007FFD0004AEDC 0000000000000000 0000000000000000 0000000000000000  msvcrt.dll!_endthreadex
00007FFD000C2784 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk
00007FFD02A30C31 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart

codeblocks.exe 17.12.0.0
ntdll.dll    10.0.15063.1324
KERNEL32.DLL 10.0.15063.1058
KERNELBASE.dll 10.0.15063.1266
msvcrt.dll  7.0.15063.0
COMCTL32.dll 6.10.15063.1155
SHELL32.dll 10.0.15063.1387
combase.dll 10.0.15063.1155
ucrtbase.dll 10.0.15063.1182
cfgmgr32.dll 10.0.15063.0
RPCRT4.dll  10.0.15063.1155
bcryptPrimitives.dll 10.0.15063.994
shcore.dll  10.0.15063.1155
GDI32.dll    10.0.15063.1324
gdi32full.dll 10.0.15063.1387
windows.storage.dll 10.0.15063.1324
msvcp_win.dll 10.0.15063.936
advapi32.dll 10.0.15063.1356
USER32.dll  10.0.15063.936
sechost.dll 10.0.15063.1356
win32u.dll  10.0.15063.608
shlwapi.dll 10.0.15063.1058
kernel.appcore.dll 10.0.15063.1155
powrprof.dll 10.0.15063.0
profapi.dll 10.0.15063.0
SHFOLDER.dll 10.0.15063.0
libgcc_s_seh-1.dll
libstdc++-6.dll
libwinpthread-1.dll 1.0.0.0
exchndl.dll 0.8.2.0
PSAPI.DLL    10.0.15063.0
VERSION.dll 10.0.15063.0
wxmsw311u_gcc_cb.dll 3.1.1.0
comdlg32.dll 10.0.15063.1155
ole32.dll    10.0.15063.1235
OLEAUT32.dll 10.0.15063.966
OLEACC.dll  7.2.15063.447
UxTheme.dll 10.0.15063.0
WINMM.dll    10.0.15063.0
WINSPOOL.DRV 10.0.15063.1235
WSOCK32.dll 10.0.15063.0
WS2_32.dll  10.0.15063.0
WINMMBASE.dll 10.0.15063.0
bcrypt.dll  10.0.15063.1155
mgwhelp.dll 0.8.2.0
dbghelp.dll 6.3.9600.17298
codeblocks.dll
IMM32.DLL    10.0.15063.0
CRYPTBASE.DLL 10.0.15063.0
MSCTF.dll    10.0.15063.1155
SspiCli.dll 10.0.15063.850
dwmapi.dll  10.0.15063.994
TextInputFramework.dll 10.0.15063.1155
CoreUIComponents.dll 10.0.15063.1387
CoreMessaging.dll 10.0.15063.1387
ntmarta.dll 10.0.15063.0
wintypes.dll 10.0.15063.1155
usermgrcli.dll 10.0.15063.0
clbcatq.dll 2001.12.10941.16384
dataexchange.dll 10.0.15063.0
dcomp.dll    10.0.15063.1155
d3d11.dll    10.0.15063.1155
dxgi.dll    10.0.15063.966
twinapi.appcore.dll 10.0.15063.1206
WindowsCodecs.dll 10.0.15063.1324
msftedit.DLL 10.0.15063.1155
Windows.Globalization.dll 10.0.15063.1292
Bcp47Langs.dll 10.0.15063.1155
globinputhost.dll 10.0.15063.966
thumbcache.dll 10.0.15063.1155
policymanager.dll 10.0.15063.1155
msvcp110_win.dll 10.0.15063.850
abbreviations.dll
astyle.dll
autosave.dll
AutoVersioning.dll
BrowseTracker.dll
byogames.dll
cb_koders.dll
Cccc.dll
classwizard.dll
codecompletion.dll
codesnippets.dll
codestat.dll
compiler.dll
copystrings.dll
CppCheck.dll
Cscope.dll
debugger.dll
defaultmimehandler.dll
devpakupdater.dll
DoxyBlocks.dll 1.7.663.8397
DragScroll.dll
EditorConfig.dll
EditorTweaks.dll
envvars.dll
Exporter.dll
FileManager.dll
FortranProject.dll
headerfixup.dll
help_plugin.dll
HHCTRL.OCX  10.0.15063.1112
HexEditor.dll
IncrementalSearch.dll
keybinder.dll
lib_finder.dll
wxflatnotebook.dll
MouseSap.dll
NassiShneiderman.dll
OccurrencesHighlighting.dll
openfileslist.dll
Profiler.dll
ProjectOptionsManipulator.dll
projectsimporter.dll
RegExTestbed.dll
ReopenEditor.dll
rndgen.dll
scriptedwizard.dll
SmartIndentCpp.dll
SmartIndentFortran.dll
SmartIndentHDL.dll
SmartIndentLua.dll
SmartIndentPascal.dll
SmartIndentPython.dll
SmartIndentXML.dll
SpellChecker.dll
SymTab.dll
ThreadSearch.dll
wxcustombutton.dll
todo.dll
ToolsPlus.dll
wxsmith.dll
wxsmithlib.dll
wxSmithAui.dll
wxSmithContribItems.dll
wxdatetimepicker.dll
wxmathplot.dll
wxspeedbutton.dll
wxchartctrl.dll
wximagepanel.dll
wxkwic.dll
wxled.dll
xpmanifest.dll
msimg32.dll 10.0.15063.0
WININET.dll 11.0.15063.1387
iertutil.dll 11.0.15063.1266
ondemandconnroutehelper.dll 10.0.15063.966
IPHLPAPI.DLL 10.0.15063.0
winhttp.dll 10.0.15063.997
mswsock.dll 10.0.15063.0
NSI.dll      10.0.15063.0
WINNSI.DLL  10.0.15063.0
urlmon.dll  11.0.15063.1324
msiso.dll    11.0.15063.1266
DNSAPI.dll  10.0.15063.1206
mdnsNSP.dll 3.1.0.1
rasadhlp.dll 10.0.15063.0
fwpuclnt.dll 10.0.15063.966

Windows 10.0.15063
DrMingw 0.8.2

Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 01, 2019, 07:19:45 pm
What is the value of j and next?
Title: Re: The 30 December 2018 build (11543) is out.
Post by: killerbot on January 01, 2019, 09:28:51 pm
related to what has been mentioned in a previous comment above : http://forums.codeblocks.org/index.php/topic,22936.0.html
==> the assert was as such also already present before, so that is not due to stepping to gcc810
Title: Re: The 30 December 2018 build (11543) is out.
Post by: riban on January 03, 2019, 12:50:19 am
@oBFusCATed the crash happens with the simplest of project, e.g. new console project (hello world) when the source code editor is opened. The assertion only happens occasionally so I have not figured out how to trigger that.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: BlueHazzard on January 03, 2019, 02:22:40 pm
What is the value of j and next?

funny:

Code: [Select]
> info locals
next = <error reading variable next (Cannot access memory at address 0x0)>
index = 0
i = 0
j = 0

some heavy compiler optimizing going on here xD

compiled with -g3 and no optimization turned on...
Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 03, 2019, 03:18:40 pm
some heavy compiler optimizing going on here xD
I hope this is sarcasm, because the bug happens even with -O0...
And I'm sure it is some kind of buffer overflow, but I'll have to dig a bit more to know the details...
Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 03, 2019, 03:42:30 pm
Here is patch which fixes one of the issues with this function....

Code: [Select]
diff --git a/src/plugins/codecompletion/parser/tokenizer.cpp b/src/plugins/codecompletion/parser/tokenizer.cpp
index 34e85c0..9b72cef 100644
--- a/src/plugins/codecompletion/parser/tokenizer.cpp
+++ b/src/plugins/codecompletion/parser/tokenizer.cpp
@@ -1668,7 +1668,7 @@ bool Tokenizer::ReplaceMacroUsage(const Token* tk)
     return false;
 }

-void Tokenizer::KMP_GetNextVal(const wxChar* pattern, int next[])
+void Tokenizer::KMP_GetNextVal(const wxChar* pattern, int next[], const int patternLen)
 {
     int j = 0, k = -1;
     next[0] = -1;
@@ -1677,6 +1677,8 @@ void Tokenizer::KMP_GetNextVal(const wxChar* pattern, int next[])
         if (k == -1 || pattern[j] == pattern[k])
         {
             ++j;
+            if (j >= patternLen + 1)
+                abort();
             ++k;
             if (pattern[j] != pattern[k])
                 next[j] = k;
@@ -1704,8 +1706,8 @@ int Tokenizer::KMP_Find(const wxChar* text, const wxChar* pattern, const int pat
         }
     }

-    int next[patternLen];
-    KMP_GetNextVal(pattern, next);
+    int next[patternLen + 1];
+    KMP_GetNextVal(pattern, next, patternLen);

     int index = 0, i = 0, j = 0;
     while (text[i] != _T('\0') && pattern[j] != _T('\0'))
diff --git a/src/plugins/codecompletion/parser/tokenizer.h b/src/plugins/codecompletion/parser/tokenizer.h
index a5ea3bf..911835f 100644
--- a/src/plugins/codecompletion/parser/tokenizer.h
+++ b/src/plugins/codecompletion/parser/tokenizer.h
@@ -489,7 +489,7 @@ private:
     bool GetMacroExpandedText(const Token* tk, wxString& expandedText);

     /** used in the KMP find function */
-    void KMP_GetNextVal(const wxChar* pattern, int next[]);
+    void KMP_GetNextVal(const wxChar* pattern, int next[], const int patternLen);

     /** Tokenizer options specify the token reading option */
     TokenizerOptions     m_TokenizerOptions;

To find the offenders remove the two +1...

There are at least there more:
1. access to next[k] is not guaranteed to be within bounds
2. the use of dynamic arrays is a GCC extension which I am not sure how well works in C++ and also it is not really portable. It should be replaced with an alloca or static sized array. The size is guarded already, so I don't see a reason to use a dynamic size here. It should be possible to statically size the array.
3. These functions should probably be made global functions and not part of the class.

I won't make any changes, because I don't understand the code here. @ollydbg would you be able to fix the issue now that we know what is causing it?
Title: Re: The 30 December 2018 build (11543) is out.
Post by: ollydbg on January 03, 2019, 03:53:39 pm
Here is patch which fixes one of the issues with this function....
...
I won't make any changes, because I don't understand the code here. @ollydbg would you be able to fix the issue now that we know what is causing it?

The KMP search related codes are added long times ago by Loaden, which try to locate an argument when we do macro expansion.
For example: If we have:
Code: [Select]
#define M(a,b)  2*a+b
Then we have a usage like:
Code: [Select]
M(x,y)
We have to search to search "a" in the string "2*a+b", and replace "a" with actual argument "x", so it becomes "2*x+b".
I hope I will take some time on this issue this weekend. Thanks.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: ollydbg on January 05, 2019, 06:31:53 am
funny:

Code: [Select]
> info locals
next = <error reading variable next (Cannot access memory at address 0x0)>
index = 0
i = 0
j = 0

I just build the wx3.1.1 under MinGW-W64's 64bit gcc8.1 compiler(mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z). The final log-release.txt is more than 20M, too many warnings with the below command.
Code: [Select]
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-Wno-unused-local-typedefs -Wno-deprecated-declarations -fno-keep-inline-dllexport" >log-release.txt 2>&1
Also, I have to this patch applied:Fix invalid cast in wxMSW AutoHANDLE::InvalidHandle() wxWidgets/wxWidgets@424f64f (https://github.com/wxWidgets/wxWidgets/commit/424f64f27d94f83ed946ebfcf9b9543c828f9f25), otherwise, the build will fall.

Then build C::B, I see the same crash.
This means the "int next[patternLen];" is corrupt.  :(
Title: Re: The 30 December 2018 build (11543) is out.
Post by: ollydbg on January 05, 2019, 08:04:38 am
run the CCTest project on the file "cc_macro_expansion_stringize.cpp"
(note, you need to copy this source file, and rename to ccc_macro_expansion_stringize.cpp, so that CCTest only run the test for this single file)

Set two breakpoints here:

Code: [Select]
int Tokenizer::KMP_Find(const wxChar* text, const wxChar* pattern, const int patternLen)
{
    if (!text || !pattern || pattern[0] == _T('\0') || text[0] == _T('\0'))
        return -1;

    if (patternLen > 1024)
    {
        if (patternLen < 5012)
            TRACE(_T("KMP_Find() : %s - %s"), text, pattern);
        else
        {
            TRACE(_T("KMP_Find: The plan buffer is too big, %d"), patternLen);
            return -2;
        }
    }

    int next[patternLen];
    KMP_GetNextVal(pattern, next);  //bp1

    int index = 0, i = 0, j = 0;    //bp2
   
This the the value before we call the function KMP_GetNextVal
Code: [Select]
> info locals

[debug]> info locals
[debug]next = {2283936, 0, 1875784749, 0}
[debug]index = 0
[debug]i = 14
[debug]j = 0
[debug]>>>>>>cb_gdb:

next = {2283936, 0, 1875784749, 0}
index = 0
i = 14
j = 0

And after the function call

Code: [Select]
> info locals

[debug]> info locals
[debug]next = <error reading variable next (Cannot access memory at address 0x1)>
[debug]index = 0
[debug]i = 14
[debug]j = 0
[debug]>>>>>>cb_gdb:

next = <error reading variable next (Cannot access memory at address 0x1)>
index = 0
i = 14
j = 0

This means this function has some errors.
Note, the "next" array is the lps array stated in
https://www.geeksforgeeks.org/kmp-algorithm-for-pattern-searching/
or
KMP Algorithm | Searching for Patterns | GeeksforGeeks - YouTube (https://www.youtube.com/watch?v=cH-5KcgUcOE)

EDIT1:
For a pattern "text", when step into the function:
Code: [Select]
void Tokenizer::KMP_GetNextVal(const wxChar* pattern, int next[])
{
    int j = 0, k = -1;
    next[0] = -1;
    while (pattern[j] != _T('\0'))
    {
        if (k == -1 || pattern[j] == pattern[k])
        {
            ++j;
            ++k;
            if (pattern[j] != pattern[k])
                next[j] = k;  // error
            else
                next[j] = next[k];
        }
        else
            k = next[k];
    }
}
I do see that the line "//error", has j=4, which means next[j] is beyond the next (since next array only have four elements). :(
But I still need some time to see how the KMP algorithm works.

EDIT2:
To simplify the issue, you only need to debug this function:
Code: [Select]
int Tokenizer::GetFirstTokenPosition(const wxChar* buffer, const size_t bufferLen,
                                     const wxChar* key, const size_t keyLen)
{
    int pos = -1;
    wxChar* p = const_cast<wxChar*>(buffer);
    const wxChar* endBuffer = buffer + bufferLen;
    for (;;)
    {
        const int ret = KMP_Find(p, key, keyLen);
        if (ret == -1)
            break;

        // check previous char
        p += ret;
        if (p > buffer)
        {
            const wxChar ch = *(p - 1);
            if (ch == _T('_') || wxIsalnum(ch))
            {
                p += keyLen;
                continue;
            }
        }

        // check next char
        p += keyLen;
        if (p < endBuffer)
        {
            const wxChar ch = *p;
            if (ch == _T('_') || wxIsalnum(ch))
                continue;
        }

        // got it
        pos = p - buffer - keyLen;
        break;
    }

    return pos;
}
Where, the arguments are:
Code: [Select]
[debug]> info args
[debug]this = 0x41d4200
[debug]buffer = 0x41d7bf0 L"text ## line"
[debug]bufferLen = 12
[debug]key = 0x41d7868 L"text"
[debug]keyLen = 4
[debug]>>>>>>cb_gdb:

this = 0x41d4200
buffer = 0x41d7bf0 L"text ## line"
bufferLen = 12
key = 0x41d7868 L"text"
keyLen = 4
Title: Re: The 30 December 2018 build (11543) is out.
Post by: Miguel Gimenez on January 05, 2019, 11:46:45 am
You can check this code adapted from your link:

Code: [Select]
void Tokenizer::KMP_GetNextVal(const wxChar* pattern, int next[])
{
    int len = 0;

    next[0] = 0;  // CB code uses -1

    int i = 1;
    while (pattern[i] != _T('\0'))
    {
        if (pattern[i] == pattern[len])
        {
            len++;
            next[i] = len;
            i++;
        }
        else
        {
            if (len)
            {
                len = next[len - 1];
            }
            else
            {
                next[i] = 0;
                i++;
            }
        }
    }
}

Also, I would try using a std::vector or new[] instead of a dynamic array for next.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 05, 2019, 11:52:36 am
Also, I would try using a std::vector or new[] instead of a dynamic array for next.
And you'll make the parser slow... There is already a known limit on the number of elements in this array. It can be used. But this won't solve the problem.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: ollydbg on January 06, 2019, 05:00:50 pm
The crash issue of the KMP algorithm is fixed in trunk now. The "next" array should have the same length as the "pattern" array, so access beyond the array is not allowed.
@Miguel Gimenez  @oBFusCATed
Thanks for the help.

EDIT:
However, there are still some performance issue. For example, for a fixed "pattern" string, we will generate the "next" array many times. :(
Title: Re: The 30 December 2018 build (11543) is out.
Post by: Miguel Gimenez on January 09, 2019, 01:49:01 pm
There is a new crash in KMP_Find() with revision 11547 and wxwidgets 3.1.1. To reproduce, just open CodeBlocks_wx31.workspace and wait (it happens sometimes, specially when you start compiling just after loading).

Code: [Select]
codeblocks.exe caused an Access Violation at location 0CAC57FA in module codecompletion.dll Reading from location 2A13C000.

Registers:
eax=2a13c000 ebx=2523b6f0 ecx=00000000 edx=00001390 esi=2523c740 edi=77de22b0
eip=0cac57fa esp=2523b6e0 ebp=2523b728 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010206

AddrPC   Params
0CAC57FA 2A13AC70 00001022 2A17F5D4  codecompletion.dll!KMP_Find  [G:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 1716]
  1714:     while ( i < textLen && j < patternLen)
  1715:     {
> 1716:         if (j == -1 || text[i] == pattern[j])
  1717:         {
  1718:             ++i;
0CAC61CB 2A139C94 00001022 2A17F5D4  codecompletion.dll!GetFirstTokenPosition  [G:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 1928]
  1926:     for (;;)
  1927:     {
> 1928:         const int ret = KMP_Find(p, bufferLen, key, keyLen);
  1929:         if (ret == -1)
  1930:             break;
0CAC5C30 25F51558 2523B92C 2523B8F8  codecompletion.dll!GetMacroExpandedText  [G:/Codeblocks/src/plugins/codecompletion/parser/tokenizer.cpp @ 1843]
  1841:         {
  1842:             // find the first exist of formal arg from data to dataEnd
> 1843:             const int pos = GetFirstTokenPosition(data, dataEnd - data, key, keyLen);
  1844:             if (pos != -1)
  1845:             {

Full report is attached.

Windows 7 64 bits

EDIT: running with GDB (previous attempts didn't crash) I get:

text = L")"
textLen = 43
pattern = L"T"
patternLen = 1

textLen seems incorrect.

Code: [Select]
0x0c7c57fa in Tokenizer::KMP_Find (this=0x228ce570, text=0x2bfc5fc2 L")", textLen=43, pattern=0x2bfc56ec L"T", patternLen=1)
    at G:\Codeblocks\src\plugins\codecompletion\parser\tokenizer.cpp:1716
1716            if (j == -1 || text[i] == pattern[j])
(gdb) bt
#0  0x0c7c57fa in Tokenizer::KMP_Find (this=0x228ce570, text=0x2bfc5fc2 L")", textLen=43, pattern=0x2bfc56ec L"T", patternLen=1)
    at G:\Codeblocks\src\plugins\codecompletion\parser\tokenizer.cpp:1716
#1  0x0c7c61cb in Tokenizer::GetFirstTokenPosition (this=0x228ce570,
    buffer=0x2bfc5f6e L", name, base, class wxARRAY_DEFAULT_EXPORT)", bufferLen=43, key=0x2bfc56ec L"T", keyLen=1)
    at G:\Codeblocks\src\plugins\codecompletion\parser\tokenizer.cpp:1928
#2  0x0c7c5c30 in Tokenizer::GetMacroExpandedText (this=0x228ce570, tk=0x2569fc30, expandedText=...)
    at G:\Codeblocks\src\plugins\codecompletion\parser\tokenizer.cpp:1843
#3  0x0c7c55a6 in Tokenizer::ReplaceMacroUsage (this=0x228ce570, tk=0x2569fc30)
    at G:\Codeblocks\src\plugins\codecompletion\parser\tokenizer.cpp:1665
#4  0x0c7c38ee in Tokenizer::CheckMacroUsageAndReplace (this=0x228ce570)
    at G:\Codeblocks\src\plugins\codecompletion\parser\tokenizer.cpp:1089
#5  0x0c7c30c2 in Tokenizer::DoGetToken (this=0x228ce570) at G:\Codeblocks\src\plugins\codecompletion\parser\tokenizer.cpp:966
#6  0x0c7c2e88 in Tokenizer::PeekToken (this=0x228ce570) at G:\Codeblocks\src\plugins\codecompletion\parser\tokenizer.cpp:904
#7  0x0c7b060d in ParserThread::HandleFunction (this=0x228ce568, name=..., isOperator=false, isPointer=false)
    at G:\Codeblocks\src\plugins\codecompletion\parser\parserthread.cpp:2463
#8  0x0c7aa705 in ParserThread::DoParse (this=0x228ce568) at G:\Codeblocks\src\plugins\codecompletion\parser\parserthread.cpp:1188
#9  0x0c7ad146 in ParserThread::HandleNamespace (this=0x228ce568)
    at G:\Codeblocks\src\plugins\codecompletion\parser\parserthread.cpp:1755
#10 0x0c7aa0aa in ParserThread::DoParse (this=0x228ce568) at G:\Codeblocks\src\plugins\codecompletion\parser\parserthread.cpp:1043
#11 0x0c7a8295 in ParserThread::Parse (this=0x228ce568) at G:\Codeblocks\src\plugins\codecompletion\parser\parserthread.cpp:533
#12 0x0c7d37e2 in ParserThread::Execute (this=0x228ce568) at G:/Codeblocks/src/plugins/codecompletion/parser/parserthread.h:192
#13 0x020264d8 in cbThreadPool::cbWorkerThread::Entry (this=0x226f3e88) at G:\Codeblocks\src\sdk\cbthreadpool.cpp:228
#14 0x645d34d0 in wxThread::CallEntry() () from C:\Windows\system32\wxmsw311u_gcc_custom.dll
#15 0x645d4cc2 in wxThreadInternal::DoThreadStart(wxThread*) () from C:\Windows\system32\wxmsw311u_gcc_custom.dll
#16 0x645d54c3 in wxThreadInternal::WinThreadStart(void*)@4 () from C:\Windows\system32\wxmsw311u_gcc_custom.dll
#17 0x00000000 in ?? ()
Title: Re: The 30 December 2018 build (11543) is out.
Post by: ollydbg on January 09, 2019, 02:54:06 pm
There is a new crash in KMP_Find() with revision 11547 and wxwidgets 3.1.1. To reproduce, just open CodeBlocks_wx31.workspace and wait (it happens sometimes, specially when you start compiling just after loading).
...
Thanks for the report, I will try to reproduce this crash tonight.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: ollydbg on January 09, 2019, 04:30:42 pm
There is a new crash in KMP_Find() with revision 11547 and wxwidgets 3.1.1. To reproduce, just open CodeBlocks_wx31.workspace and wait (it happens sometimes, specially when you start compiling just after loading).
...
Thanks for the report, I will try to reproduce this crash tonight.
OK, I fixed this bug in trunk r11548. The bug is introduced in rev11545. Though I can't reproduce a crash in my PC, but I think the fix is quite obvious.
You can see the commit message of r11548. Thanks!
Title: Re: The 30 December 2018 build (11543) is out.
Post by: Miguel Gimenez on January 09, 2019, 04:56:59 pm
It works now, thank you for the quick fix.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: UberNewb2 on January 11, 2019, 05:27:39 am
Can't say this is related to CodeBlocks but I was running 11543 at the time, and this is a pretty serious error and problem.

My Windows 10 pc running my project Blue Screened right when I ran my project's executable from within CodeBlocks using Build->Run. It started up and immediately died. Now I can't tell whether my program caused the blue screen, or Code Blocks, or some other process, but I lost a file in the process. It was open in the Code Blocks editor, and after Windows recovered from the blue screen and restarted, the file was empty. I opened it with a hex editor and discovered it was a bunch of zeros. The entire file contents were wiped out. And I probably had several hundred lines of code that were three days old since the last commit.

I am in the process of recovery right now. I am going to attempt to disassemble the .o file and get the source back that way. If that fails, I don't know what else to try. I can't attach any  kind of crash report because there wasn't one. I will attempt to find the memory dump created by the crash recovery thing a ma jiggie and see what I can dredge up.

Wish me luck.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 11, 2019, 08:23:27 am
Can't say this is related to CodeBlocks but I was running 11543 at the time, and this is a pretty serious error and problem.
No, it is not codeblocks.

My Windows 10 pc running my project Blue Screened right when I ran my project's executable from within CodeBlocks using Build->Run.
You have hardware or OS/driver problem! User software cannot cause a BSOD on a well working computer! I doubt you're using Windows 98.

..., but I lost a file in the process. It was open in the Code Blocks editor, and after Windows recovered from the blue screen and restarted, the file was empty....

For these cases we use backup solutions. In the software development world these are called version control systems. The one which won the battle is called git. Start using it, even for personal projects and you won't have problems like these in the future.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: BlueHazzard on January 11, 2019, 12:39:51 pm
Quote
It was open in the Code Blocks editor, and after Windows recovered from the blue screen and restarted, the file was empty. I opened it with a hex editor and discovered it was a bunch of zeros. The entire file contents were wiped out.
Also codeblocks uses some special save procedure to prevent exactly this. It saves the file first in a temporary file, copies the temporary file over the old file and then removes the temp file after the copy process was successful. So there is always a valid file with your content on the system if something bad is happening
Title: Re: The 30 December 2018 build (11543) is out.
Post by: Miguel Gimenez on January 11, 2019, 01:04:52 pm
An useful feature can be warn the user if one of those .temp files is found when loading the project or, if a file fails to load, look for an associated  .temp file and restore it.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 11, 2019, 07:14:54 pm
Doing the save-to-temp-and-move prevents problems only if cb crashes. If the os crashes the file could be in the write caches of the os and it could be lost. In theory the journal should handle such cases, but there is always a chance of total failure.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: UberNewb2 on January 11, 2019, 11:29:31 pm
..., but I lost a file in the process. It was open in the Code Blocks editor, and after Windows recovered from the blue screen and restarted, the file was empty....

For these cases we use backup solutions. In the software development world these are called version control systems. The one which won the battle is called git. Start using it, even for personal projects and you won't have problems like these in the future.

If you're going to chastise me, at least read what I said.
And I probably had several hundred lines of code that were three days old since the last commit.

Quote
It was open in the Code Blocks editor, and after Windows recovered from the blue screen and restarted, the file was empty. I opened it with a hex editor and discovered it was a bunch of zeros. The entire file contents were wiped out.
Also codeblocks uses some special save procedure to prevent exactly this. It saves the file first in a temporary file, copies the temporary file over the old file and then removes the temp file after the copy process was successful. So there is always a valid file with your content on the system if something bad is happening
The file had already been saved I believe, as I was in the process of running the project right after building it.

Something happened during the crash that overwrote the file.

However, if you say CB creates temporary files, perhaps I could recover one of those. Are they stored in the same directory as the source file in question?

Doing the save-to-temp-and-move prevents problems only if cb crashes. If the os crashes the file could be in the write caches of the os and it could be lost. In theory the journal should handle such cases, but there is always a chance of total failure.
I read that the change journal of NTFS is not able to recover old versions of the file.

The problem is not that the file was ever deleted, it was physically overwritten during the blue screen.

Like I said, my latest commit for that file is like three days old, and I lost a lot of changes since then.


Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 12, 2019, 12:16:11 am
The problem is not that the file was ever deleted, it was physically overwritten during the blue screen.
There are multiple levels of caches, both software and hardware. If the file hasn't been flushed fully to the storage media, there is nothing that would prevent a corruption.

C::B deletes the original with a move operation. So after a successful save there is no trace of the temporary file.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: UberNewb2 on January 12, 2019, 12:56:59 am
The problem is not that the file was ever deleted, it was physically overwritten during the blue screen.
There are multiple levels of caches, both software and hardware. If the file hasn't been flushed fully to the storage media, there is nothing that would prevent a corruption.

C::B deletes the original with a move operation. So after a successful save there is no trace of the temporary file.
Well I'm screwed then. :/ No temporary file to undelete means no back up copy. Dang. I'd honestly prefer you litter my source directory with temporary deleted files then make it as if they never existed. :/

Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 12, 2019, 11:44:32 am
Well I'm screwed then. :/ No temporary file to undelete means no back up copy. Dang. I'd honestly prefer you litter my source directory with temporary deleted files then make it as if they never existed. :/
Sorry, we're not making a backup software. For such purposes there are better alternatives (like using git and commit every small change you make every hour or two; this have other benefits which a backup solution won't provide).

You can look at the auto save plugin, it has such features, but very limited.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: UberNewb2 on January 12, 2019, 06:33:23 pm
Well the autosave plugin might be what I'm looking for, but I can't tell what it does or where it saves things. The wiki page ;

http://wiki.codeblocks.org/index.php/Autosave_plugin

doesn't say much...

I can tell from the settings in the environment settings that I can make a .save file every X minutes, which works.

That would at least save my butt in the case of another BSOD.

And yes, I'll try to commit more often.

Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 21, 2019, 09:18:58 pm
Doesn't seem like working 100% reliably:

Code: [Select]
=================================================================
==27797==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6100011229fc at pc 0x7fffe061e899 bp 0x7fffccd7f070 sp 0x7fffccd7f060
READ of size 4 at 0x6100011229fc thread T11
    #0 0x7fffe061e898 in Tokenizer::KMP_Find(wchar_t const*, int, wchar_t const*, int) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/tokenizer.cpp:1716
    #1 0x7fffe061f5ee in Tokenizer::GetFirstTokenPosition(wchar_t const*, unsigned long, wchar_t const*, unsigned long) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/tokenizer.cpp:1929
    #2 0x7fffe061ef1d in Tokenizer::GetMacroExpandedText(Token const*, wxString&) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/tokenizer.cpp:1843
    #3 0x7fffe061e2a6 in Tokenizer::ReplaceMacroUsage(Token const*) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/tokenizer.cpp:1665
    #4 0x7fffe061aeb4 in Tokenizer::CheckMacroUsageAndReplace() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/tokenizer.cpp:1089
    #5 0x7fffe061a404 in Tokenizer::DoGetToken() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/tokenizer.cpp:966
    #6 0x7fffe0619c55 in Tokenizer::PeekToken() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/tokenizer.cpp:904
    #7 0x7fffe05eb56a in ParserThread::HandleFunction(wxString&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:2463
    #8 0x7fffe05e3630 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1188
    #9 0x7fffe05e93ce in ParserThread::HandleClass(ParserThread::EClassType) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:2112
    #10 0x7fffe05e25c6 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:882
    #11 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #12 0x7fffe05c369c in Parser::Parse(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:345
    #13 0x7fffe05c8a45 in Parser::ParseFile(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:670
    #14 0x7fffe05e6f08 in ParserThread::HandleIncludes() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1738
    #15 0x7fffe05e14e2 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:653
    #16 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #17 0x7fffe05c369c in Parser::Parse(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:345
    #18 0x7fffe05c8a45 in Parser::ParseFile(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:670
    #19 0x7fffe05e6f08 in ParserThread::HandleIncludes() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1738
    #20 0x7fffe05e14e2 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:653
    #21 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #22 0x7fffe05c369c in Parser::Parse(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:345
    #23 0x7fffe05c8a45 in Parser::ParseFile(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:670
    #24 0x7fffe05e6f08 in ParserThread::HandleIncludes() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1738
    #25 0x7fffe05e14e2 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:653
    #26 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #27 0x7fffe05c369c in Parser::Parse(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:345
    #28 0x7fffe05c8a45 in Parser::ParseFile(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:670
    #29 0x7fffe05e6f08 in ParserThread::HandleIncludes() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1738
    #30 0x7fffe05e14e2 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:653
    #31 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #32 0x7fffe05c369c in Parser::Parse(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:345
    #33 0x7fffe05c8a45 in Parser::ParseFile(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:670
    #34 0x7fffe05e6f08 in ParserThread::HandleIncludes() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1738
    #35 0x7fffe05e14e2 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:653
    #36 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #37 0x7fffe05c369c in Parser::Parse(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:345
    #38 0x7fffe05c8a45 in Parser::ParseFile(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:670
    #39 0x7fffe05e6f08 in ParserThread::HandleIncludes() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1738
    #40 0x7fffe05e14e2 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:653
    #41 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #42 0x7fffe05c369c in Parser::Parse(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:345
    #43 0x7fffe05c8a45 in Parser::ParseFile(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:670
    #44 0x7fffe05e6f08 in ParserThread::HandleIncludes() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1738
    #45 0x7fffe05e14e2 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:653
    #46 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #47 0x7fffe05c369c in Parser::Parse(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:345
    #48 0x7fffe05c8a45 in Parser::ParseFile(wxString const&, bool, bool) /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parser.cpp:670
    #49 0x7fffe05e6f08 in ParserThread::HandleIncludes() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:1738
    #50 0x7fffe05e14e2 in ParserThread::DoParse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:653
    #51 0x7fffe05e0961 in ParserThread::Parse() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.cpp:533
    #52 0x7fffe05f595c in ParserThread::Execute() /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/parserthread.h:192
    #53 0x7ffff1aa05cf  (libcodeblocks.so+0x6b35cf)
    #54 0x7ffff2978642 in wxThread::CallEntry() ../git/include/wx/thrimpl.cpp:356
    #55 0x7ffff2982d55 in wxThreadInternal::PthreadStart(wxThread*) ../git/src/unix/threadpsx.cpp:869
    #56 0x7ffff29831d1 in wxPthreadStart ../git/src/unix/threadpsx.cpp:819
    #57 0x7ffff083215b  (/lib64/libpthread.so.0+0x815b)
    #58 0x7ffff05650ae in clone (/lib64/libc.so.6+0x1040ae)

0x6100011229fc is located 0 bytes to the right of 188-byte region [0x610001122940,0x6100011229fc)
allocated by thread T11 here:
    #0 0x7ffff6efde60 in operator new(unsigned long) /var/tmp/portage/sys-devel/gcc-6.4.0-r5/work/gcc-6.4.0/libsanitizer/asan/asan_new_delete.cc:60
    #1 0x7ffff114e3ae in std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_assign(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:265

Thread T11 created by T0 here:
    #0 0x7ffff6e67448 in __interceptor_pthread_create /var/tmp/portage/sys-devel/gcc-6.4.0-r5/work/gcc-6.4.0/libsanitizer/asan/asan_interceptors.cc:236
    #1 0x7ffff297d739 in wxThreadInternal::Create(wxThread*, unsigned int) ../git/src/unix/threadpsx.cpp:1121

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/obfuscated/projects/codeblocks/git/src/plugins/codecompletion/parser/tokenizer.cpp:1716 in Tokenizer::KMP_Find(wchar_t const*, int, wchar_t const*, int)
Shadow bytes around the buggy address:
  0x0c208021c4e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c208021c4f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c208021c500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c208021c510: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c208021c520: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
=>0x0c208021c530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00[04]
  0x0c208021c540: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x0c208021c550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04
  0x0c208021c560: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c208021c570: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c208021c580: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==27797==ABORTING

This from a minimlal wxwidgets type of project...
Title: Re: The 30 December 2018 build (11543) is out.
Post by: Miguel Gimenez on January 22, 2019, 10:32:30 am
Is this report from revision 11543? KMP-related routines were fixed in revisions 11544 to 11548.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: ollydbg on January 22, 2019, 04:17:53 pm
Is this report from revision 11543? KMP-related routines were fixed in revisions 11544 to 11548.

Hi, OBF, as Miguel Gimenez said, it should be fixed in trunk already. Are you using an old svn revision?
Title: Re: The 30 December 2018 build (11543) is out.
Post by: oBFusCATed on January 22, 2019, 07:34:35 pm
I am at 11552...  8) It fails parsing some unichar.h file from wx 3.0.4...
Title: Re: The 30 December 2018 build (11543) is out.
Post by: Miguel Gimenez on January 22, 2019, 08:50:52 pm
Got it, revision 11548 corrected the issue in all lines but one. Patch is attached.
Title: Re: The 30 December 2018 build (11543) is out.
Post by: ollydbg on January 23, 2019, 01:12:26 am
Got it, revision 11548 corrected the issue in all lines but one. Patch is attached.
Fixed in trunk now, thanks!