GNOME Bugzilla – Bug 668759
Glom crashes when a related choice shows a field other than the primary key
Last modified: 2012-01-30 21:26:46 UTC
Every time I try to open a table that has relation choice to another time glom just exit. The console shows the following messages. This doesn't allow to make relations. Glom::DbTreeModel::DbTreeModel(const Glom::FoundSet&, const type_vec_const_layout_items&, bool, bool, Glom::Base_DB::type_vecConstLayoutFields&): no primary key field found in the list of items: field: description Glom::DbTreeModelWithExtraText::DbTreeModelWithExtraText(const Glom::FoundSet&, const type_vec_const_layout_items&, bool, bool, Glom::Base_DB::type_vecConstLayoutFields&): m_column_index_key is not set, or is out of range. m_column_index_key=-1, size=1 virtual void Glom::DbTreeModelWithExtraText::get_value_vfunc(const iterator&, int, Glib::ValueBase&) const: m_column_index_key is not set. virtual void Glom::DbTreeModelWithExtraText::get_value_vfunc(const iterator&, int, Glib::ValueBase&) const: m_column_index_key is not set.
Thanks for taking the time to report this bug. Without a stack trace from the crash it's very hard to determine what caused it. Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Before even doing that, I would like to know the exact version number. For instance, see the About box, or run "glom --version" in the terminal. And what distro is this, and how did you install Glom?
(In reply to comment #2) > Before even doing that, I would like to know the exact version number. For > instance, see the About box, or run "glom --version" in the terminal. > > And what distro is this, and how did you install Glom? Hi The version is Glom 1.21.2. This version was compiled from svn on Fedora 16. The last version from svn from 25th i can not compile it yet because error on libgda. Regarding the backtrace, because I have compiled dont have the debug information, and also cannot compile due to libgba dependecy which cannot be compiled also. lol
Created attachment 206223 [details] stack frame from kdevelop
Thanks. Could you try a) Fixing the libgda build problem by using the --disable-introspection option. b) Bulding the latest tarball version, or the code from git master. You might also try a stable 1.20.x release. Or could you tell me exactly how to reproduce this? However, I suspect that this crash won't happen with the latest code.
Going to try to compile the lastest. To reproduce: Developer mode for example, Table A and B, create a table relationship AB between field A.field1 and B.field_id. Select table A Fields, select field1, click open. On choice tab select the relationship AB, select the field to show and confirm. After this steps if you try to open again the field1 the application crash. The same thing happens when you close the field window and glom tries to draw the table form. I have some ideas that I would like to add to glom, some of them I emailed to Murray I don't know if he get it. So I intend to contribute my specially need is to compile for windows because we are trying to use glom in a company for a temporary solution before have an erp. Thanks for the hint regarding libgda. Regards
Can you reproduce this with any of the examples? That would be simpler. > I have some ideas that I would like to add to glom, some of them I emailed to > Murray I don't know if he get it. Probably not. You are welcome to suggest them on the mailing list or bugzilla. > So I intend to contribute my specially need > is to compile for windows because we are trying to use glom in a company for a > temporary solution before have an erp. That would be interesting. I don't know how close the new Windows support is to being ready in GTK+ 3. But it would be great if someone tried.
glibmm-2.31.2 Tried to compile and now gives me: In file included from /usr/include/glibmm-2.4/glibmm.h:87:0, from /usr/include/gtkmm-3.0/gtkmm/notebook.h:9, from glom/utility_widgets/notebookglom.h:24, from glom/utility_widgets/notebooklabelglom.h:24, from glom/utility_widgets/notebooklabelglom.cc:21: /usr/include/glibmm-2.4/glibmm/thread.h: In member function ‘T* Glib::StaticPrivate<T>::get()’: /usr/include/glibmm-2.4/glibmm/thread.h:1067:26: warning: ‘void* g_static_private_get(GStaticPrivate*)’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:245): Use 'g_private_get' instead [-Wdeprecated-declarations] /usr/include/glibmm-2.4/glibmm/thread.h: In member function ‘void Glib::StaticPrivate<T>::set(T*, Glib::StaticPrivate<T>::DestroyNotifyFunc)’: /usr/include/glibmm-2.4/glibmm/thread.h:1073:3: warning: ‘void g_static_private_set(GStaticPrivate*, gpointer, GDestroyNotify)’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:248): Use 'g_private_set' instead [-Wdeprecated-declarations] /usr/include/glibmm-2.4/glibmm/thread.h: In constructor ‘Glib::Private<T>::Private(Glib::Private<T>::DestructorFunc)’: /usr/include/glibmm-2.4/glibmm/thread.h:1089:13: warning: ‘GPrivate* g_private_new(GDestroyNotify)’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:231) [-Wdeprecated-declarations] CXX glom/navigation/glom_glom-box_tables.o In file included from /usr/include/glibmm-2.4/glibmm.h:87:0, from /usr/include/gtkmm-3.0/gtkmm/box.h:7, from ./glom/box_withbuttons.h:24, from ./glom/navigation/box_tables.h:24, from glom/navigation/box_tables.cc:21: /usr/include/glibmm-2.4/glibmm/thread.h: In member function ‘T* Glib::StaticPrivate<T>::get()’: /usr/include/glibmm-2.4/glibmm/thread.h:1067:26: warning: ‘void* g_static_private_get(GStaticPrivate*)’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:245): Use 'g_private_get' instead [-Wdeprecated-declarations] /usr/include/glibmm-2.4/glibmm/thread.h: In member function ‘void Glib::StaticPrivate<T>::set(T*, Glib::StaticPrivate<T>::DestroyNotifyFunc)’: /usr/include/glibmm-2.4/glibmm/thread.h:1073:3: warning: ‘void g_static_private_set(GStaticPrivate*, gpointer, GDestroyNotify)’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:248): Use 'g_private_set' instead [-Wdeprecated-declarations] /usr/include/glibmm-2.4/glibmm/thread.h: In constructor ‘Glib::Private<T>::Private(Glib::Private<T>::DestructorFunc)’: /usr/include/glibmm-2.4/glibmm/thread.h:1089:13: warning: ‘GPrivate* g_private_new(GDestroyNotify)’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:231) [-Wdeprecated-declarations] CXXLD glom/glom /usr/bin/ld: /usr/local/lib/libepc-1.0.a(libepc_libepc_1_0_la-tls.o): undefined reference to symbol 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4' /usr/bin/ld: note: 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4' is defined in DSO /usr/lib/libgnutls.so.26 so try adding it to the linker command line /usr/lib/libgnutls.so.26: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [glom/glom] Error 1 make[2]: Leaving directory `/home/alien/Projects/glom' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/alien/Projects/glom' make: *** [all] Error 2 *** Failed ***
> /usr/bin/ld: /usr/local/lib/libepc-1.0.a(libepc_libepc_1_0_la-tls.o): undefined > reference to symbol 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4' > /usr/bin/ld: note: 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4' is defined > in DSO /usr/lib/libgnutls.so.26 so try adding it to the linker command line > /usr/lib/libgnutls.so.26: could not read symbols: Invalid operation I have not noticed that myself, but I don't use gentoo. I guess you could try mentioning gnutls in the libepc .pc.in file.
Well I'm using fedora 16. I tried but didn't work. I think is a link problem from liepc.
Ah, sorry for my confusion. Have you built libepc from source? That might be necessary. I would like to create packages for Fedora but I miss something like Ubuntu's PPAs.
yes built libepc from source, using the last version.
compile problem resolve by --enable-static ./configure --prefix=/usr --enable-static
When building libepc?
Note that if you really want to build from source, and keep working with the source, jhbuild makes this much easier. I build Glom regularly on Fedora 16 with jbhuild.
Created attachment 206264 [details] test case which glom exits this is my my file with all tables, saved as an example to test there problem when open the invoice table.
could you supply the jhbuild configuration file for me? I built the lastest version with the same problem, so i submitted my glom file. Maybe i'm doing something wrong.
(In reply to comment #17) > could you supply the jhbuild configuration file for me? I'm just using the regular GNOME 3.4 moduleset. > > I built the lastest version with the same problem, so i submitted my glom file. Thanks. I'll take a look at that later.
I assume that you mean the "Vendas" table. This was triggered by your area (Área emissora) field there having a related choice that showed just the departamentos:description field rather than the departamentos's table's primary key, as is more common. I am working on the correct fix. Note that you probably did want that drop-down to show the ID and also the description, with the ID being the main field that would be used for the field's value. I also need to fix this crash when clicking in the "Invoices Lines: Reference Month" field in the Vendas table's Details view: Program received signal SIGSEGV, Segmentation fault. 0x081bdc70 in Gtk::CellRenderer::gobj (this=0x0) at /opt/gnome/include/gtkmm-3.0/gtkmm/cellrenderer.h:194 194 GtkCellRenderer* gobj() { return reinterpret_cast<GtkCellRenderer*>(gobject_); } Missing separate debuginfos, use: debuginfo-install boost-python-1.47.0-6.fc16.i686 cyrus-sasl-lib-2.1.23-27.fc16.i686 freetype-2.4.6-4.fc16.i686 gettext-libs-0.18.1.1-8.fc16.i686 glibc-2.14.90-24.fc16.4.i686 keyutils-libs-1.5.2-1.fc16.i686 krb5-libs-1.9.2-4.fc16.i686 libX11-1.4.3-1.fc16.i686 libXau-1.0.6-2.fc15.i686 libXcomposite-0.4.3-2.fc15.i686 libXcursor-1.1.11-3.fc15.i686 libXdamage-1.1.3-2.fc15.i686 libXext-1.3.0-1.fc16.i686 libXfixes-5.0-1.fc16.i686 libXi-1.4.5-1.fc16.i686 libXinerama-1.1.1-2.fc15.i686 libXrandr-1.3.1-2.fc15.i686 libXrender-0.9.6-2.fc15.i686 libffi-3.0.10-1.fc16.i686 libgcc-4.6.2-1.fc16.i686 libpng-1.2.46-1.fc16.i686 libselinux-2.1.6-5.fc16.i686 libstdc++-4.6.2-1.fc16.i686 libudev-173-3.fc16.i686 libunistring-0.9.3-2.fc15.i686 libuuid-2.20.1-2.1.fc16.i686 libxcb-1.7-3.fc16.i686 nss-3.13.1-10.fc16.i686 nss-softokn-freebl-3.13.1-15.fc16.i686 nss-util-3.13.1-3.fc16.i686 openldap-2.4.26-5.fc16.i686 openssl-1.0.0g-1.fc16.i686 postgresql-libs-9.1.2-2.fc16.i686 python-libs-2.7.2-5.2.fc16.i686 zlib-1.2.5-6.fc16.i686 (gdb) bt
+ Trace 229549
> I also need to fix this crash when clicking in the "Invoices Lines: Reference > Month" field in the Vendas table's Details view Note that that field has a similar problem, though it's made worse there by you naming the Relationship (used in the choice) "Months ID" rather than Months. Here too you use Description as the main field, though it's really the ID that you want, with Description just being an "Also show" field. Anyway it should not crash, so I will work on that too.
(In reply to comment #20) > > I also need to fix this crash when clicking in the "Invoices Lines: Reference > > Month" field in the Vendas table's Details view > > Note that that field has a similar problem, though it's made worse there by you > naming the Relationship (used in the choice) "Months ID" rather than Months. > Here too you use Description as the main field, though it's really the ID that > you want, with Description just being an "Also show" field. > > Anyway it should not crash, so I will work on that too. Thanks you, It was my mistake then, I will correct this. I was studding also the small business example, and notice that first it has a choice with id relationship and the other related fields were lookup value based on change value of relationship. Regards
This first crash is fixed by this commit: http://git.gnome.org/browse/glom/commit/?id=ca6854063a2561bea3379b7d08caee8542f6bfe8 I'm working on the second crash ( comment #19 ).
That second crash is fixed by this commit: http://git.gnome.org/browse/glom/commit/?id=0d7acedc2162617dd91cdfde051d45a885c8736e
(In reply to comment #21) > I was studding also the small > business example, and notice that first it has a choice with id relationship > and the other related fields were lookup value based on change value of > relationship. Or you can just show the related field instead of copying its value (looking it up) into a field in the parent table. For instance, you would want to look up (copy) the current price of a product rather than show its price at the time that you are looking at the UI. This commit should help you by automatically choosing the field that you probably want for a related choice: http://git.gnome.org/browse/glom/commit/?id=5eb8d49384a917c61f7bb5fd3d24db30ff08184d By the way, your test case in comment #4 has lots of "column_width=" attributes. I guess that they were added when you created the file with an older version of Glom. They should not be created now, because Glom now does a better job of guessing the right width for TreeView (list) columns in the UI. You should probably remove those attributes from the XML. If they come back without you manually entering a number for the column width, please let me know. Thanks again for reporting these problems.
Ok updated. Just an apart, did anyone compiled this last version on windows? I have being struggle to create a new windows version. Regarding the column-width, I started to use the glom 1.18 version from my fedora 16 repo, but then I had problem because I need to open the file on Windows computers and there were only 1.14 version available, so there is a bit of mixture in XML that I need to clean up. As soon I start to understand the code I will start developing some features. Thanks
> did anyone compiled this last version on windows? Not that I know of. I am waiting to hear if the Windows support in GTK+ 3 has been updated. I believe that it is in progress and that it should be a great improvement. > Regarding the column-width, I started to use the glom 1.18 version from my fedora 16 repo Yes, that explains it.
(In reply to comment #8) > /usr/bin/ld: /usr/local/lib/libepc-1.0.a(libepc_libepc_1_0_la-tls.o): undefined > reference to symbol 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4' > /usr/bin/ld: note: 'gnutls_x509_crt_set_activation_time@@GNUTLS_1_4' is defined > in DSO /usr/lib/libgnutls.so.26 so try adding it to the linker command line > /usr/lib/libgnutls.so.26: could not read symbols: Invalid operation > collect2: ld returned 1 exit status This is apparently now fixed. See bug #668882 .