After a Yocto upgrade to warrior and with this an qt upgrade from 5.9.7 to 5.12.8 our qt qml application crashes on the device if the user scrolls (keyboard event) through a listview. It crashes in QV4::MarkStack::drain (QmlEngine GarbageCollector) and we have no idea where the problem could be.
Any advise how to find such an error?
Here is a backtrace:
Thread 1 (LWP 516):
#0 0x0000001c in ?? ()
No symbol table info available.
#1 0xb695a9d0 in QV4::MarkStack::drain (this=this#entry=0xbee86804) at ../../include/QtQml/5.12.8/QtQml/private/../../../../../../git/src/qml/memory/qv4heap_p.h:73
h = <optimized out>
#2 0xb69b9904 in QV4::PersistentValueStorage::mark (this=<optimized out>, markStack=markStack#entry=0xbee86804) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/jsruntime/qv4persistent.cpp:243
p = 0xb0078000
#3 0xb695b4fe in QV4::MemoryManager::collectRoots (this=this#entry=0x1099c68, markStack=markStack#entry=0xbee86804) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/memory/qv4mm.cpp:871
No locals.
#4 0xb695b678 in QV4::MemoryManager::mark (this=this#entry=0x1099c68) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/memory/qv4mm.cpp:912
markStack = {top = 0xaa8b7084, base = 0xaa8b7000, limit = 0xaaa37000, engine = 0x158efb8}
#5 0xb695cbb0 in QV4::MemoryManager::runGC (this=0x1099c68) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/memory/qv4mm.cpp:1047
gcBlocker = {varRef = #0x1099d2c, oldValue = false}
#6 0xb695e1e6 in QV4::MemoryManager::allocate (size=32, allocator=0x1099c70, this=0x1099c68) at ../../include/QtQml/5.12.8/QtQml/private/../../../../../../git/src/qml/memory/qv4mm_p.h:328
didGCRun = false
didGCRun = <optimized out>
m = <optimized out>
#7 QV4::MemoryManager::allocData (this=0x1099c68, size=32) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/memory/qv4mm.cpp:797
m = <optimized out>
#8 0xb695e284 in QV4::MemoryManager::allocObjectWithMemberData (this=this#entry=0x1099c68, vtable=vtable#entry=0xb6be4358 <QV4::Object::static_vtbl>, nMembers=<optimized out>) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/memory/qv4mm.cpp:809
size = <optimized out>
o = <optimized out>
#9 0xb6a690de in QV4::MemoryManager::allocateObject<QV4::Object> (ic=<optimized out>, this=<optimized out>) at ../../include/QtQml/5.12.8/QtQml/private/../../../../../../git/src/qml/jsruntime/qv4object_p.h:142
o = <optimized out>
o = <optimized out>
#10 QV4::MemoryManager::allocateObject<QV4::Object> (ic=0xaaab80a8, this=<optimized out>) at ../../include/QtQml/5.12.8/QtQml/private/../../../../../../git/src/qml/memory/qv4mm_p.h:201
No locals.
#11 QV4::MemoryManager::allocateObject<QV4::Object> (this=<optimized out>) at ../../include/QtQml/5.12.8/QtQml/private/../../../../../../git/src/qml/memory/qv4mm_p.h:211
scope = <optimized out>
ic = <optimized out>
scope = <optimized out>
ic = <optimized out>
#12 QV4::MemoryManager::allocate<QV4::Object> (this=<optimized out>) at ../../include/QtQml/5.12.8/QtQml/private/../../../../../../git/src/qml/memory/qv4mm_p.h:244
scope = <optimized out>
t = <optimized out>
scope = <optimized out>
t = <optimized out>
#13 QV4::ExecutionEngine::newObject (this=this#entry=0x158efb8) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/jsruntime/qv4engine.cpp:720
No locals.
#14 0xb69b8bf8 in QV4::ExecutionContext::createMutableBinding (this=<optimized out>, name=0xaaab8090, deletable=<optimized out>) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/jsruntime/qv4context.cpp:163
c = 0xaa5029c0
scope = {engine = 0x158efb8, mark = 0xaaab8098}
activation = {ptr = 0xaaab8098}
ctx = {ptr = 0xaaab80a0}
id = <optimized out>
desc = <optimized out>
attrs = {{m_all = 112 'p', {m_flags = 0 '\000', m_mask = 7 '\a'}, {m_type = 0 '\000', m_writable = 0 '\000', m_enumerable = 0 '\000', m_configurable = 0 '\000', type_set = 1 '\001', writable_set = 1 '\001', enumerable_set = 1 '\001', configurable_set = 0 '\000'}}}
#15 0xb6a74aae in QV4::Runtime::method_declareVar (engine=0x158efb8, deletable=<optimized out>, nameIndex=<optimized out>) at /usr/src/debug/qtdeclarative/5.12.8+gitAUTOINC+101799f8ac-r0/git/src/qml/jsruntime/qv4value_p.h:186
scope = {engine = 0x158efb8, mark = 0xaaab8090}
name = {ptr = 0xaaab8090}
#16 0xa9b6e47c in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
I would be very thankful if anyone could help me on this.
So, I have the following logs/data:
ORA-Balance-Element () =
ORA-Balance-Element-Id () = 1000
ORA-Balance-Element () =
ORA-Balance-Element-Id () = 1001
ORA-Balance-Element () =
ORA-Balance-Element-Id () = 1002
ORA-Balance-Element () =
ORA-Balance-Element-Id () = 1003
ORA-Balance-Element () =
ORA-Balance-Element-Id () = 1004
ORA-Balance-Element () =
ORA-Balance-Element-Id () = 1005
ORA-Balance-Element () =
ORA-Balance-Element-Id () = 1006
ORA-Balance-Element () =
ORA-Balance-Element-Id () = 1007
I want to find a pattern that will match all the numbers after the equal sign (8 in total)
and get the result in a list (I will handle this list in Logstash conf).
So far I tried:
\s*ORA-Balance-Element %{DATA:tmp} = %{DATA:ora_balance_element}\n\s*ORA-Balance-Element-Id %{DATA:tmp} = %{DATA:ora_balance_element_id}\n
but this will only find me the first match (the first number, 1000).
Also, I tried:
(\s*ORA-Balance-Element %{DATA:tmp} = %{DATA:ora_balance_element}\n\s*ORA-Balance-Element-Id %{DATA:tmp} = %{DATA:ora_balance_element_id}\n)+
but again I could not be able to take all the matches. (This last one pattern returns the last match, number 1007).
The result I want is a list, e.g.
l = [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007]
Please notice that the above sample of logs is a multiline event and not many events. In logstash, it refers to one message and not multiple ones.
Can anyone help me solve this?
Thanks a lot!
The following 3D complex FFT Fortran MPI program runs when the number of processes P = 1, 2, 4, 8, and 16. But, it fails when P = 12 with the following error at the place where function fftw_mpi_plan_dft_3d is called.
"Program received signal SIGSEGV: Segmentation fault - invalid memory reference."
Why does this program fail with P = 12?
PROGRAM test
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
INCLUDE 'mpif.h'
INCLUDE 'fftw3-mpi.f03'
INTEGER :: ier
integer(C_INTPTR_T), parameter :: L = 256
integer(C_INTPTR_T), parameter :: N = 256
integer(C_INTPTR_T), parameter :: M = 48
type(C_PTR) :: plan, cdata
complex(C_DOUBLE_COMPLEX), pointer :: data(:,:,:)
integer(C_INTPTR_T) :: i, j, alloc_local, local_M, local_j_offset
CALL MPI_INIT(ier)
CALL fftw_mpi_init
alloc_local = fftw_mpi_local_size_3d(M, N, L, MPI_COMM_WORLD, local_M, local_j_offset)
cdata = fftw_alloc_complex(alloc_local)
CALL C_F_POINTER(cdata, data, [L, N, local_M])
plan = fftw_mpi_plan_dft_3d(M, N, L, data, data, MPI_COMM_WORLD, FFTW_FORWARD, FFTW_ESTIMATE)
CALL fftw_destroy_plan(plan)
CALL fftw_free(cdata)
CALL MPI_FINALIZE(ier)
STOP
END PROGRAM test
I see the same problem with fftw_mpi_plan_dft_c2r on a Cray XE6 using cray-mpich 7.1.3. It doesn't matter if fftw is compiled with gcc, Cray cc, or Intel icc. The segmentation fault only occurs for certain combinations of array dimensions and number of processors. One combination that results in a segfault is array size 1920,3840,3840 on 128 processes. As with the original post, I used FFTW_ESTIMATE and so no transform is done by the planner. Stack trace follows.
#0 0x00000000008f26f0 in ?? ()
#1 0x00000000004179bb in fftw_plan_destroy_internal (ego=0x8e2af0) at plan.c:49
#2 0x000000000040d755 in mkplan (ego_=0x8def60, p_=0x8f1440, plnr=0x8d6110)
at transpose-pairwise.c:467
#3 0x0000000000418a07 in invoke_solver (ego=0x8d6110, p=0x8f1440, s=0x8def60,
nflags=0x7fffffff4fc0) at planner.c:486
#4 0x0000000000418b9c in search0 (ego=0x8d6110, p=0x8f1440, slvndx=0x7fffffff4fcc,
flagsp=0x7fffffff4fc0) at planner.c:529
#5 0x0000000000418db8 in search (ego=0x8d6110, p=0x8f1440, slvndx=0x7fffffff4fcc,
flagsp=0x7fffffff4fc0) at planner.c:600
#6 0x00000000004191d8 in mkplan (ego=0x8d6110, p=0x8f1440) at planner.c:711
#7 0x0000000000419d35 in fftw_mkplan_d (ego=0x8d6110, p=0x8f1440) at planner.c:970
#8 0x0000000000411d47 in mkplan (ego_=0x8df140, p_=0x8df930, plnr=0x8d6110)
at dft-rank1-bigvec.c:165
#9 0x0000000000418a07 in invoke_solver (ego=0x8d6110, p=0x8df930, s=0x8df140,
nflags=0x7fffffff5290) at planner.c:486
#10 0x0000000000418b9c in search0 (ego=0x8d6110, p=0x8df930, slvndx=0x7fffffff529c,
flagsp=0x7fffffff5290) at planner.c:529
#11 0x0000000000418db8 in search (ego=0x8d6110, p=0x8df930, slvndx=0x7fffffff529c,
flagsp=0x7fffffff5290) at planner.c:600
#12 0x00000000004191d8 in mkplan (ego=0x8d6110, p=0x8df930) at planner.c:711
#13 0x0000000000419d35 in fftw_mkplan_d (ego=0x8d6110, p=0x8df930) at planner.c:970
#14 0x00000000004157b1 in mkplan (ego_=0x8df4a0, p_=0x8df650, plnr=0x8d6110)
at rdft2-rank-geq2.c:179
#15 0x0000000000418a07 in invoke_solver (ego=0x8d6110, p=0x8df650, s=0x8df4a0,
nflags=0x7fffffff5550) at planner.c:486
#16 0x0000000000418b9c in search0 (ego=0x8d6110, p=0x8df650, slvndx=0x7fffffff555c,
flagsp=0x7fffffff5550) at planner.c:529
#17 0x0000000000418db8 in search (ego=0x8d6110, p=0x8df650, slvndx=0x7fffffff555c,
flagsp=0x7fffffff5550) at planner.c:600
#18 0x00000000004191d8 in mkplan (ego=0x8d6110, p=0x8df650) at placner.c:711
#19 0x000000000041d1e2 in mkplan0 (plnr=0x8d6110, flags=64, prb=0x8df650, hash_info=0,
wisdom_state=WISDOM_NORMAL) at apiplan.c:34
#20 0x000000000041d229 in mkplan (plnr=0x8d6110, flags=64, prb=0x8df650, hash_info=0)
at apiplan.c:48
#21 0x000000000041d438 in fftw_mkapiplan (sign=0, flags=0, prb=0x8df650)
at apiplan.c:111
#22 0x000000000040a385 in plan_guru_rdft2 (rnk=3, dims0=0x8df540, howmany=1,
r=0x2aab74c21010, c=0x2aab73000010, comm=1140850688, kind=HC2R00, flags=64)
at api.c:784
#23 0x000000000040a542 in fftw_mpi_plan_many_dft_c2r (rnk=3, n=0x7fffffff5830,
howmany=1, iblock=0, oblock=0, in=0x2aab73000010, out=0x2aab74c21010,
comm=1140850688, flags=64) at api.c:831
This question already has answers here:
Strange code that compiles with g++
(3 answers)
Closed 7 years ago.
Consider this strange program:
int main()
{
int(*){} Is it C++14 or any other language?
}
(See a live demo here & here.)
Even though the comment // is missing, the code compiles fine without any errors & warnings even when I use -pedantic-errorsoptions in g++ 6.0. This seems like a compiler bug to me. Is it really a bug in the compiler?
This looks to be an bug/feature/issue with g++ in all of the versions I can test it on. Running
int main()
{
int(*){} Is it C++14 or any other language?
}
On godbolt.org for all versions of g++ with no compilation flags give the following assembly ouput.
main:
pushq %rbp
movq %rsp, %rbp
movl $0, %eax
leave
ret
The only diagnosis I get is on godbolt.org and that is
!!warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
Clang, ICC and MSVS all fail to compile this.
EDIT:
From the comments zwol filed a bug with gcc on this. The bug report can be found here.
I've run the command on my Fedora VM with g++ version 5.1.1 and found the following:
[user:~] 1 $ g++ -fdump-tree-original-raw tmp.cpp
tmp.cpp: In function ‘int main()’:
tmp.cpp:3:11: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
int(*){} Is it C++14 or any other language?
^
However that still managed to compile... So I've dumped the AST and got this:
$ cat tmp.cpp.003t.original
;; Function int main() (null)
;; enabled by -tree-original
#1 return_expr type: #2 expr: #3
#2 void_type name: #4 algn: 8
#3 init_expr type: #5 op 0: #6 op 1: #7
#4 type_decl name: #8 type: #2 srcp: <built-in>:0
note: artificial
#5 integer_type name: #9 size: #10 algn: 32
prec: 32 sign: signed min : #11
max : #12
#6 result_decl type: #5 scpe: #13 srcp: tmp.cpp:1
note: artificial size: #10
algn: 32
#7 integer_cst type: #5 int: 0
#8 identifier_node strg: void lngt: 4
#9 type_decl name: #14 type: #5 srcp: <built-in>:0
note: artificial
#10 integer_cst type: #15 int: 32
#11 integer_cst type: #5 int: -2147483648
#12 integer_cst type: #5 int: 2147483647
#13 function_decl name: #16 type: #17 scpe: #18
srcp: tmp.cpp:1 lang: C
link: extern
#14 identifier_node strg: int lngt: 3
#15 integer_type name: #19 size: #20 algn: 128
prec: 128 sign: unsigned min : #21
max : #22
#16 identifier_node strg: main lngt: 4
#17 function_type size: #23 algn: 8 retn: #5
prms: #24
#18 translation_unit_decl
#19 identifier_node strg: bitsizetype lngt: 11
#20 integer_cst type: #15 int: 128
#21 integer_cst type: #15 int: 0
#22 integer_cst type: #15 int: -1
#23 integer_cst type: #15 int: 8
#24 tree_list valu: #2
Which is too big to fit inside a comment but should be useful in determining what is going on. I'm still going through this but I'm just posting this information for others to build from.
Which is visualized like this .
$qb = $this->em->createQuery("
SELECT
label.value AS label,
'link' AS productLink,
descr.value AS description,
IF (a.is_new = 1, 'new', NULL) AS 'condition',
....
");
$results = $qb->iterate();
gives the error:
exception 'Doctrine\ORM\Query\QueryException' with message
[Syntax Error] line 0, col 514: Error:
Expected known function, got IF
in /var/www/xxx/library/Doctrine/ORM/Query/QueryException.php:42
When I put the SQL into phpMyAdmin it works,.. is this a bug in Doctrine2 ?
Stacktrace:
Stack trace:
#0 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(380): Doctrine\ORM\Query\QueryException::syntaxError('line 0, col 514...')
#1 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(3001): Doctrine\ORM\Query\Parser->syntaxError('known function', Array)
#2 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(2975): Doctrine\ORM\Query\Parser->CustomFunctionDeclaration()
#3 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(1907): Doctrine\ORM\Query\Parser->FunctionDeclaration()
#4 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(1048): Doctrine\ORM\Query\Parser->SelectExpression()
#5 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(758): Doctrine\ORM\Query\Parser->SelectClause()
#6 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(727): Doctrine\ORM\Query\Parser->SelectStatement()
#7 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(213): Doctrine\ORM\Query\Parser->QueryLanguage()
#8 /var/www/xxx/library/Doctrine/ORM/Query/Parser.php(288): Doctrine\ORM\Query\Parser->getAST()
#9 /var/www/xxx/library/Doctrine/ORM/Query.php(230): Doctrine\ORM\Query\Parser->parse()
#10 /var/www/xxx/library/Doctrine/ORM/Query.php(241): Doctrine\ORM\Query->_parse()
#11 /var/www/xxx/library/Doctrine/ORM/AbstractQuery.php(686): Doctrine\ORM\Query->_doExecute()
#12 /var/www/xxx/library/Doctrine/ORM/Query.php(525): Doctrine\ORM\AbstractQuery->iterate(Array, 1)
No, it's not a bug. Doctrine2 does not support IF statement - same functionality can be achieved by CASE statement:
$qb = $this->em->createQuery("
SELECT
label.value AS label,
'link' AS productLink,
descr.value AS description,
(CASE
WHEN (a.is_new = :val) THEN 'new'
ELSE NULL
END) AS condition,
....
")
->setParameter('val' , 1);
$results = $qb->iterate();