[SOLVED]AV when dropping a component(3rd party) on a form in Linux lazarus / 1-Linux ---------------------------------------------------------------------- snorkel · 2014-02-24 17:37 Hi, I have a 3rd party component I use that works fine on win32, but when I install it in Linux 64 bit and drop the component on a form it causes a AV and the IDE crashes.  If the component is already in a project that I bring over from a windows PC I can compile the project fine. On a exisiting project if I click the component on the form, it again causes the AV. Any ideas on how to debug this?  I am not sure where to even look. ---------------------------------------------------------------------- zeljko · 2014-02-24 17:52 What lazarus version ? ---------------------------------------------------------------------- snorkel · 2014-02-24 18:43 it's in my signature. But I have tried it on the Trunk version, 1.2rc2, and 1.0.14 and the AV happens on all of them. Just not sure how to go about debugging it.  I have posted the error on the 3rd party web site, but it takes them awhile to get back to me. Hence why I wanted to fix it myself. ---------------------------------------------------------------------- Cyrax · 2014-02-24 19:21 Run Lazarus under GDB so you can see location where it crashes. ---------------------------------------------------------------------- snorkel · 2014-02-24 19:26 how do I do that? ---------------------------------------------------------------------- Cyrax · 2014-02-24 19:34 Open terminal and type:Code: [Select]gdb /path/to/lazarus And when these lines shows up:Code: [Select]GNU gdb (GDB) 7.6.1-ubuntu Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". For bug reporting instructions, please see: . (gdb) type Code: [Select]run in gdb prompt. When Lazarus does crash, then type Code: [Select]bt into gdb prompt to dump stack trace starting from location where crash happened. ---------------------------------------------------------------------- snorkel · 2014-02-24 20:04 Thanks, Got this: program received signal SIGSEGV, Segmentation fault. 0x0000000000431dd4 in fpc_do_is () (gdb) bt #0  0x0000000000431dd4 in fpc_do_is () #1  0x00007fffffffaf60 in ?? () #2  0x0000000001327a51 in SCCOLLECTIONEDITOR_TSCCOLLECTIONEDITOR_$__GETVALUE$$ANSISTRING () #3  0x00007fffffffaf80 in ?? () #4  0x00007fffe19ebb40 in ?? () #5  0x00007fffffffaf60 in ?? () #6  0x000000000084c3fe in GETVISUALVALUE (this=0x7fffdca24980) at propedits.pp:2618 #7  0x000000000084d774 in PROPDRAWVALUE (this=0x7fffdca24980, ACANVAS=0x7fffdce9b940, ARECT=..., ASTATE=0) at propedits.pp:2952 #8  0x000000000083ab8d in PAINTROW (this=0x7fffdd0a8330, AROW=1) at objectinspector.pp:2790 #9  0x000000000083b29f in DOPAINT (this=0x7fffdd0a8330, PAINTONLYCHANGEDVALUES=false) at objectinspector.pp:2896 #10 0x000000000083b5cb in PAINT (this=0x7fffdd0a8330) at objectinspector.pp:2940 #11 0x00000000006522b7 in PAINTWINDOW (this=0x7fffdd0a8330, DC=140736893303808) at include/customcontrol.inc:126 #12 0x0000000000635d90 in PAINTHANDLER (this=0x7fffdd0a8330, THEMESSAGE=...) at include/wincontrol.inc:4763 #13 0x000000000063a3bf in WMPAINT (this=0x7fffdd0a8330, MSG=...) at include/wincontrol.inc:6637 #14 0x00000000006521ed in WMPAINT (this=0x7fffdd0a8330, MESSAGE=...) at include/customcontrol.inc:106 #15 0x0000000000432b11 in SYSTEM_TOBJECT_$__DISPATCH$formal () #16 0x00000000006521a8 in ?? () #17 0x00007fffdd0a8330 in ?? () #18 0x0000000000000001 in ?? () #19 0x000000000000000f in ?? () #20 0x00007fffffffb788 in ?? () #21 0x00007fffdd0a8330 in ?? () #22 0x00007fffdd6e5aa0 in ?? () #23 0x00007fffffffbcc0 in ?? () #24 0x00000000024b5ce0 in ?? () #25 0x00007fffffffbcc0 in ?? () #26 0x0000000002a6f050 in ?? () #27 0x000000000064671d in WNDPROC (this=0x7fffdd0a8330, THEMESSAGE=...) at include/control.inc:2094 #28 0x00000000006378b6 in WNDPROC (this=0x7fffdd0a8330, MESSAGE=...) at include/wincontrol.inc:5327 #29 0x00000000006f0b43 in SLOTPAINT (this=0x7fffdd6e5a40, SENDER=0x2a6f050, EVENT=0x7fffffffbcc0) at qt/qtwidgets.pas:3808 #30 0x00000000006edd5c in EVENTFILTER (this=0x7fffdd6e5a40, SENDER=0x2a6f050, EVENT=0x7fffffffbcc0) at qt/qtwidgets.pas:2449 #31 0x000000000070b384 in EVENTFILTER (this=0x7fffdd6e5a40, SENDER=0x2a6f050, EVENT=0x7fffffffbcc0) at qt/qtwidgets.pas:15218 #32 0x000000000070c4d4 in VIEWPORTEVENTFILTER (this=0x7fffdd0b5550, EVENT=0x7fffffffbcc0, RETVAL=0x7fffffffb9bf) at qt/qtwidgets.pas:15690 #33 0x00007ffff76e4ebd in QLCLAbstractScrollArea::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt4Pas.so.5 #34 0x00007ffff37858a6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #35 0x00007ffff3fffe5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #36 0x00007ffff40064f0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #37 0x00007ffff378573d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 ---------------------------------------------------------------------- snorkel · 2014-02-24 20:08 Lot of QT lines in there, going to rebuild IDE with gtk2 and see if it works with that widget set. ---------------------------------------------------------------------- Fred vS · 2014-02-24 20:24 Hello. Are you using cmem in your uses section of yourapplication.dpr ? ---------------------------------------------------------------------- snorkel · 2014-02-24 21:16 yes, but I also tried to to put the component on a new project and it does the same thing.  Don't think it's related to using cmem. ---------------------------------------------------------------------- Fred vS · 2014-02-24 21:32 QuoteDon't think it's related to using cmem. Have you try to remove cmem from unit, close Lazarus and re-load it ? [EDIT] Does your component use cmem ? If yes, try to remove it too... ---------------------------------------------------------------------- snorkel · 2014-02-25 16:06 yep, it does it on a new empty project that does not have cmem in it. ---------------------------------------------------------------------- engkin · 2014-02-25 21:44 My suggestion is to comment out all RegisterPropertyEditor one by one and see which one is causing the problem related to the component. When you find it, check its GetValue function. According to the Call Stack dump you posted that's where the problem occurred. I'm not sure if "fpc_do_is" refers to type casting or something else. ---------------------------------------------------------------------- snorkel · 2014-03-25 14:37 Quote from: engkin on February 25, 2014, 10:44:36 pmMy suggestion is to comment out all RegisterPropertyEditor one by one and see which one is causing the problem related to the component. When you find it, check its GetValue function. According to the Call Stack dump you posted that's where the problem occurred. I'm not sure if "fpc_do_is" refers to type casting or something else. That worked.  The odd part is the property editors still seem to work in the IDE.