[chirp_devel] Building on OS X and tracking down a bug
Greetings all,
I’ve found what _appears_ to be a bug the latest daily build of Chirp. I can reproduce it by loading memory save for an Icom 880 that had some channels removed from it and then trying to click over to the Banks tab. The banks tab is empty but then the application crashes:
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0: --> __TEXT 0000000000001000-0000000000002000 [ 4K] r-x/rwx SM=COW /opt/kk7ds/*/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 pango-basic-atsui.so 0x0b14adb1 basic_engine_shape + 561 1 libpango-1.0.0.dylib 0x05637315 pango_shape + 85 2 libpango-1.0.0.dylib 0x05628b5e shape_run + 142 3 libpango-1.0.0.dylib 0x0562bf31 process_item + 225 4 libpango-1.0.0.dylib 0x0562c843 pango_layout_check_lines + 1331 5 libpango-1.0.0.dylib 0x0562d90c pango_layout_get_extents_internal + 156 6 libpango-1.0.0.dylib 0x0562ea03 pango_layout_get_pixel_extents + 131 7 libgtk-quartz-2.0.0.dylib 0x04fedb9c get_size + 108 8 libgtk-quartz-2.0.0.dylib 0x051b26ac gtk_tree_view_column_cell_get_size + 444 9 libgtk-quartz-2.0.0.dylib 0x051a92f2 validate_row + 610 10 libgtk-quartz-2.0.0.dylib 0x051a9d96 do_validate_rows + 278 11 libgtk-quartz-2.0.0.dylib 0x051aa172 gtk_tree_view_size_request + 18 12 libgobject-2.0.0.dylib 0x04ba3a39 g_closure_invoke + 313 13 libgobject-2.0.0.dylib 0x04bb62ee signal_emit_unlocked_R + 846 14 libgobject-2.0.0.dylib 0x04bb7ecb g_signal_emit_valist + 1915 15 libgobject-2.0.0.dylib 0x04bbc2ad g_signal_emit_by_name + 189 16 libgtk-quartz-2.0.0.dylib 0x0510a911 do_size_request + 65 17 libgtk-quartz-2.0.0.dylib 0x0510ad57 _gtk_size_group_compute_requisition + 103 18 libgtk-quartz-2.0.0.dylib 0x051ab0d4 validate_visible_area + 2260 19 libgtk-quartz-2.0.0.dylib 0x051ab558 do_presize_handler + 56 20 libgtk-quartz-2.0.0.dylib 0x051ab5ee presize_handler_callback + 14 21 libgdk-quartz-2.0.0.dylib 0x053d526b gdk_threads_dispatch + 91 22 libglib-2.0.0.dylib 0x04c20b6b g_main_context_dispatch + 523 23 libglib-2.0.0.dylib 0x04c258ab g_main_context_iterate + 1131 24 libglib-2.0.0.dylib 0x04c25ca7 g_main_loop_run + 519 25 libgtk-quartz-2.0.0.dylib 0x05091291 gtk_main + 177 26 _gtk.so 0x04e797bd _wrap_gtk_main + 253 27 org.python.python 0x000cad83 PyEval_EvalFrameEx + 20403 28 org.python.python 0x000ccf9a PyEval_EvalCodeEx + 2042 29 org.python.python 0x000cd127 PyEval_EvalCode + 87 30 org.python.python 0x000f15a8 PyRun_FileExFlags + 168 31 org.python.python 0x000f24d3 PyRun_SimpleFileExFlags + 867 32 org.python.python 0x0010b0b3 Py_Main + 3171 33 org.python.python 0x00001fb6 0x1000 + 4022
Anyway, I downloaded the latest source through Mercurial, did a brew install pytgtk and ran ./chirpw… and now the “bug” won’t show up. So I’m wondering if maybe there is a problem with my installed runtime vs. the development libraries?
I can’t find any instructions on how to build for OS X. I tried running python setup.py build, but I get this message:
nvahalik:08:51 PM:~/chirp.hg$ python setup.py build running build cp: /opt/local/etc/pango/pangox.aliases: No such file or directory
So maybe there is something else I need to install? All my Python work has been wxPython so far…
73s
Nick Vahalik KF5ZQE
Anyway, I downloaded the latest source through Mercurial, did a brew install pytgtk and ran ./chirpw… and now the “bug” won’t show up. So I’m wondering if maybe there is a problem with my installed runtime vs. the development libraries?
Entirely possible. The current runtime is built from macports and is getting rather old. There have probably been a lot of fixes (potentially macos specific) since it was built.
When you do that brew build, are you getting quartz-enabled GTK or is it running in X11? The latest (old) runtime is quartz native, which is a significantly better experience for the user, so I'd not want to regress. If your runtime *is* modern, then we should consider doing another revision.
I can’t find any instructions on how to build for OS X. I tried running python setup.py build, but I get this message:
nvahalik:08:51 PM:~/chirp.hg$ python setup.py build running build cp: /opt/local/etc/pango/pangox.aliases: No such file or directory
There is not really anything to build. The runtime is a separate thing. The package installer is created with pkgtool (manually) and it just lays down the runtime tree on their system. From there, the .app is just a shell that gets the latest build tree (the actual python code) copied into it during the automated builds. It's just set up to start the python code with the python binary from the runtime when they click on it.
If you want to work on a new package that lays down a new /opt/kk7ds based on brew with a quartz-enabled GTK, then I'm happy to test it and ultimately promote that as the preferred option if it goes well.
Thanks!
--Dan
participants (2)
-
Dan Smith
-
Nicholas Vahalik