Bug 8616 - Anjuta (2.28) SDK-Plugin crashes
: Anjuta (2.28) SDK-Plugin crashes
: NEW
: Moblin SDK
Development Environment
: unspecified
: Netbook Moblin Linux
: Undecided normal
: ---
:
:
:
:
 
 
Reported: 2009-12-11 15:26 PST by
Modified: 2009-12-30 22:46 PST (History)


Attachments
Temporary Workaround (hack) for sdk plugin on debian 64bit anjuta 2.28.1.0 (1.88 KB, patch)
2009-12-11 15:26 PST,
Details | Diff




Description From 2009-12-11 15:26:04 PST
[details]
Temporary Workaround (hack) for sdk plugin on debian 64bit anjuta 2.28.1.0

Build Image(2009-12-10):
Hardware Model (on what HW this bug is uncovered): 
(Hp mini 110 -netbook)
The anjuta sdk plugin Itself  is built on an Intel Centrino Duo (64bit) from
latest git repo.
Anjuta version: 2.28.1.0

Bug detailed descriptions(behavior, impact, etc)
===========================================================
When I try to enable the the plugin from the Anjuta Plugin manager, it
segfaults.


Reproduce Steps(steps,current result, reproduce possibility)
===========================================================
(1) Build from sources and Install
(2) Enable plugin in Anjuta plugins
(3) Anjuta Crashes, segfaults -- relevant GDB backtrace is provided below


Expected result:
===========================================================
For the plugin to be active and being able to compile (cross compile ?) using
the SDK in Anjuta


Possible root cause:
===========================================================
This is on a Debian 64 bit machine (and compiled for 64 bit) {using lastest
gnome, anjuta, debian unstable port }

I have managed to find a temporary workaround, I traced it back to the
update_environment function in plugin.c, "update_path (sp); " Commenting this
line out allows the function to work, and build apps as expected with moblin
SDK.

However this is less than ideal, looking into this further.

*** Relevant GDB backtrace ***

(gdb) bt full
#0  0x00007f92c95534e4 in strstr () from /lib/libc.so.6
No symbol table info available.
#1  0x00007f92c9aa5f42 in g_strsplit () from /lib/libglib-2.0.so.0
No symbol table info available.
#2  0x00007f92add26475 in update_path (sp=0x20dd1d0) at plugin.c:1004
        new_path_component = (gchar *) 0x0
        path_array = <value optimized out>
        pathv = <value optimized out>
        i = <value optimized out>
        poky_scripts_dir = (gchar *) 0x0
        poky_host_staging_bin_dir = (gchar *) 0x0
        poky_host_staging_usr_bin_dir = (gchar *) 0x0
        poky_cross_dir = (gchar *) 0x0
#3  0x00007f92add26839 in cleanup_environment (sp=0xffffffffb4393d7f)
    at plugin.c:1077
No locals.
#4  0x00007f92add28fb0 in anjuta_plugin_sdk_activate (plugin=0x20dd1d0)
    at plugin.c:1724
        ui = (AnjutaUI *) 0x20e8ea0
------- Comment #1 From 2009-12-13 18:47:24 PST -------
From your GDB backtrace, it seems that the sigfault is caused by g_strsplit.
Could you give us your PATH environment variable?

Basically if your reset the Moblin SDK toolchain location in the Anjuta Moblin
preference page, the update_path() will remove the old Moblin toolchain from
your PATH environment variable and add new Moblin toolchain into your PATH
environment. So this function should not be commented out. It seems that you
have started the Anjuta from the Moblin bash prompt, your PATH has been set up
correctly by envsetup.sh so that you could build apps as expected with moblin
SDK.
------- Comment #2 From 2009-12-14 16:21:01 PST -------
(In reply to comment #1)
> From your GDB backtrace, it seems that the sigfault is caused by g_strsplit.
> Could you give us your PATH environment variable?
> 

I had tried enabling the anjuta plugin under both $PATH settings, to same
effect. 
I should mention that the sdk itself works fine, I can compile stuff for moblin
as expected.

normal $PATH:
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/lib/oss/bin

with envsetup.sh (moblin sdk)
/home/erle/Workshop/Code/moblin/moblin-sdk-0.8/moblin-cross-toolchain/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/lib/oss/bin

Thanks for the reply, Yeah I had fig exactly that, but unfortunately it was the
only way (quick dirty hack) i could get it to work at short notice.  

I filed it in as a patch just to help indicate which line I commented :). Just
had a quick look at g_strsplit, will debug further from here and get back with
more details. Trying to find the root cause since I guess this should be
reported as a bug in anjuta as well (a plugin should ideally, not be able to
take the application itself down)
------- Comment #3 From 2009-12-15 17:18:30 PST -------
Thanks for your reply and your information. It seems there is nothing wrong in
your PATH.

Currently the 64-bit SDK is not officially released. When the 64-bit SDK is
ready, I will see whether we could re-produce this issue.

Please contract us if your find the root cause and give us your patch to fix
that. I am willing to commit that into our git tree and note it in our
web-site.

Some explanation of this plug-in might help:

The basic principle for this plugin is simple. You set up a build
environment against the sysroot by setting up PATH and a pkg-config path and
then you pass a flag to autogen/configure to tell it to use a
Moblin compiler/linker environment that uses the sysroot.

(In reply to comment #2)
> (In reply to comment #1)
> > From your GDB backtrace, it seems that the sigfault is caused by g_strsplit.
> > Could you give us your PATH environment variable?