wxGTK GUI utilities do not start

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

wxGTK GUI utilities do not start

2,072 Views
demidrol
Contributor I

I've cloned a github repo (commit 9b451ed5cfd9e03791145da9ce8230a3c622cc98 of repo usbdm-eclipse-makefiles-build). All dependecies including JDK and wxGTK-3.0 are installed, build seems OK on my gentoo desktop (same applies to qemu VM with cleanly installed debian jessie) after minor changes in Common.mk (i've replaced USBDM_LIBDIR64="$(PWD)/PackageFiles/lib/x86_64-linux-gnu").

However, when I try to launch ./MemoryDump/UsbdmMemoryDump-debug.x86_64/UsbdmMemoryDump-debug, I only get the following messages:

(usbdm:29848): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()

20:05:13: Debug: Adding duplicate image handler for 'Windows bitmap file'

If I run it in gdb, I have the following stack trace after Ctrl-C:

(gdb) bt

#0 0x00007ffff489ff20 in poll () from /lib64/libc.so.6

#1 0x00007ffff341cb6c in ?? () from /usr/lib64/libglib-2.0.so.0

#2 0x00007ffff341cef2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0

#3 0x00007ffff42220bc in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0

#4 0x00007ffff6a638c5 in wxGUIEventLoop::DoRun (this=0x700eb0) at /usr/src/debug/x11-libs/wxGTK-3.0.2.0-r1/wxPython-src-3.0.2.0/src/gtk/evtloop.cpp:65

#5 0x00007ffff5f55a60 in wxEventLoopBase::Run (this=0x700eb0) at /usr/src/debug/x11-libs/wxGTK-3.0.2.0-r1/wxPython-src-3.0.2.0/src/common/evtloopcmn.cpp:78

#6 0x00007ffff5f110e6 in wxAppConsoleBase::MainLoop (this=0x6ac9a0) at /usr/src/debug/x11-libs/wxGTK-3.0.2.0-r1/wxPython-src-3.0.2.0/src/common/appbase.cpp:334

#7 0x00007ffff5fae4c0 in wxEntry (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/x11-libs/wxGTK-3.0.2.0-r1/wxPython-src-3.0.2.0/src/common/init.cpp:495

#8 0x0000000000412675 in main (argc=1, argv=0x7fffffffd758) at src/MemoryDumpApp.cpp:86

Could you please help me with this issue?

P.S. Sorry for asking the same question here (already tried on sourceforge.net, but got no reply)

0 Kudos
6 Replies

1,096 Views
pgo
Senior Contributor V

Hi Ralph,

I'm sorry but the Linux version is a bit of a poor cousin.  I do most of my work on Windows.

I have pushed some changes to GitHub that should solve the ASSERT error  you have reported.  I have only tested this under Ubuntu and it didn't report the error (at least not visibly) in any case but the changes should address the error - They might introduce others :smileyhappy:.

The way the USBDM plugins work I can't guarantee that they will work without installation - I would have to check how I implemented it.

bye

0 Kudos

1,095 Views
ralphcorderoy
Contributor I

Hi pgo, thanks for your time.

I've git pull'd and got commit 4bc668a8f7686085149e283f7ee288ce4890b9f6, then re-built after a "make -f Makefile.mk clean", and observe the same behaviour.  I also stuck a "DEBUG := Y" at the top of Common.mk and re-built, and that gave me lots of ...-debug executables with debug symbols, but no logging?  Is there logging that can be enabled?  No ~/.usbdm directory is being created.

The output from either version is still

(usbdm:29198): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()

12:32:27: Debug: Adding duplicate image handler for 'Windows bitmap file'

I can see with strace(8) that it's sitting in poll(2) waiting for input on file descriptors 3 and 4.  3 is a connection to the local X server, 4 is for events with eventfd(2).  It never gets anything, and there is no timeout set.  A stack backtrace at that point:

#0  0x00007f5f2eab7c20 in __poll_nocancel () from /usr/lib/libc.so.6

#1  0x00007f5f2de80f7c in ?? () from /usr/lib/libglib-2.0.so.0

#2  0x00007f5f2de81302 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0

#3  0x00007f5f2e4c64e7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0

#4  0x00007f5f30c39165 in wxGUIEventLoop::DoRun() () from /usr/lib/libwx_gtk2u_core-3.0.so.0

#5  0x00007f5f30171223 in wxEventLoopBase::Run() () from /usr/lib/libwx_baseu-3.0.so.0

#6  0x00007f5f30136306 in wxAppConsoleBase::MainLoop() () from /usr/lib/libwx_baseu-3.0.so.0

#7  0x00007f5f301c31e0 in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-3.0.so.0

#8  0x000000000045378a in main (argc=1, argv=0x7fffb0f2a2d8) at src/FlashProgrammerApp.cpp:107

I'm a bit stuck how to debug this.  I know C, not C++, X Windows, but not wxWidgets, and really just want a command-line programmer for the MCF51AC256.  :-)  How do I go about forming a simple UsbdmScript Tcl script to do that?

Cheers, Ralph.

0 Kudos

1,095 Views
ralphcorderoy
Contributor I

The published deb file's executables aren't compatible with Arch Linux;  the C++ ABI number diffs, thus I've built from GitHub - podonoghue/usbdm-eclipse-makefiles-build: Current USBDM builds on Arch Linux, and on trying to run ./PackageFiles/bin/x86_64-linux-gnu/UsbdmFlashProgrammer it also complains

(usbdm:8877): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()

20:18:33: Debug: Adding duplicate image handler for 'Windows bitmap file'

No X windows open.  The process sits polling file descriptor 3, its connection to the X server, for events, but none arrive, not surprisingly.  I suspect the reason Gentoo and Arch Linux are seeing this problem is because they have later versions of libraries than Ubuntu or Debian.  So expect this to arrive on those in the next months.  :-)

Should I be able to run UsbdmFlashProgrammer like that from the source/build directory?  I'm setting LD_LIBRARY_PATH so it's happily finding the libraries it requires.

Running ./PackageFiles/bin/x86_64-linux-gnu/TestWx-debug doesn't give this complaint.  It pops up a small yes/no window and exits after four button presses.

Running ./PackageFiles/bin/x86_64-linux-gnu/TestGdiDialogueApp-debug pops up a dialogue and on clicking Open BDM a new window appears saying

ASSERT INFO:

./src/common/object.cpp(251): assert "classTable->Get(m_className) == NULL" failed in Register(): Class "wxPluginApp" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?

BACKTRACE:

[1] wxClassInfo::Register()

[2] dlopen

[3] __libc_start_main

Hope this is somehow helpful.

To be honest, I'm very happy staying at the command line, so UsbdmScript looks appealing, and I see MCF51AC256 is mentioned in PackageFiles/DeviceData, but its man page just lists the commands, so I've no idea how to go about putting together an "erase and reprogram flash with this S19".

Cheers, Ralph.

0 Kudos

1,096 Views
pgo
Senior Contributor V

Hi Dmitriy,

The Linux versions  were developed on Unbuntu or Mint both of which are Debian derivatives (I think).  Gentoo looks very unattractive to me - The installation looks complicated for starters.

The trace you provided seems to be deep in wxWidgets so I have no idea what the root cause would be .

There are some issues with the Linux version which I am currently looking at but I have had no problems similar to the ones you are having.

I have just tested Memory dump in a virtual machine with the latest version of Ubuntu and it worked OK.  I will do some more testing on a real Linux box with mint tonight.

Could you try the usbdm TCL script program which doesn't use wxWidgets (directly) and see if it is any more successful.

bye

0 Kudos

1,096 Views
demidrol
Contributor I

Hello pgo,

UsbdmScript seems to work as needed (i.e. problem is in wxGtk). Could you be more specific about versions of Ubuntu and all the dependencies used to build the package? I'm asking because Debian Jessie also fails to run GUI programs.

Thank you.

0 Kudos

1,096 Views
pgo
Senior Contributor V

There are three latest releases:

64-bit GCC V5

I don't have access at the moment but it was the latest version of Ubuntu I believe 15.1 (non LTS) - hence the GCC V5

64-bit non GCCv5 usbdm_4.12.1.70-1-amd64.deb

peter@peter-VirtualBox ~ $ cat /etc/*-release

DISTRIB_ID=LinuxMint

DISTRIB_RELEASE=17.2

DISTRIB_CODENAME=rafaela

DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"

NAME="Ubuntu"

VERSION="14.04.2 LTS, Trusty Tahr"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 14.04.2 LTS"

VERSION_ID="14.04"

HOME_URL="http://www.ubuntu.com/"

SUPPORT_URL="http://help.ubuntu.com/"

BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

32-bit non GCCv5 usbdm_4.12.1.70-1-i386.deb

DISTRIB_ID=LinuxMint

DISTRIB_RELEASE=17.2

DISTRIB_CODENAME=rafaela

DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"

NAME="Ubuntu"

VERSION="14.04.2 LTS, Trusty Tahr"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 14.04.2 LTS"

VERSION_ID="14.04"

HOME_URL="http://www.ubuntu.com/"

SUPPORT_URL="http://help.ubuntu.com/"

BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

The dependencies for building (should be) taken care of by the LinuxPackages script.

These were built without any changes to the GITHUB download.

bye

0 Kudos