Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Answerscripts.so makes pidgin crash when startup #9

Open
baongoc124 opened this issue May 3, 2011 · 16 comments
Open

Answerscripts.so makes pidgin crash when startup #9

baongoc124 opened this issue May 3, 2011 · 16 comments

Comments

@baongoc124
Copy link

I'm trying answerscripts with Pidgin 2.7.11 and cannot make it to run. Plugin seems to make Pidgin crash. Here's backtrace: http://pastebin.com/57pd14SV

@baongoc124
Copy link
Author

For more info: Commenting line "setenv(ENV_PREFIX "L_AGENT_VERSION", (char *) purple_core_get_version(), 1); //Version of client" from init_plugin function fixes crashing problem.

Harvie added a commit that referenced this issue May 4, 2011
@Harvie
Copy link
Owner

Harvie commented May 4, 2011

try latest git version pls :)

@baongoc124
Copy link
Author

Still crash with latest git version. Commenting setenv line make it work again.

@Harvie
Copy link
Owner

Harvie commented May 14, 2011

fuck :)

Please let me know what output you will se in console with this debug line:
putchar('['); puts((char *) core_version); putchar(']'); //Debug
setenv(ENV_PREFIX "L_AGENT_VERSION", (char *) core_version, 1); //Version of client

and you can also try this:
setenv(ENV_PREFIX "L_AGENT_VERSION", (const char *) core_version, 1); //Version of client

BTW what operation system (os, [kernel, distro,] version) are you using?

@baongoc124
Copy link
Author

Here it is http://pastebin.com/4MBWa9WM . I'm using ArchLinux kernel 2.6.38.4, Pidgin 2.7.11.
And adding const to char* doesn't help.

@Harvie
Copy link
Owner

Harvie commented May 15, 2011

http://pastebin.com/4MBWa9WM --> Unknown Paste ID!

I have no crash on this (32bit):

[15:39:28] 0 ;) harvie@insomnia ~ $ uname -a
Linux insomnia 2.6.38-ARCH #1 SMP PREEMPT Tue May 10 06:36:08 UTC 2011 i686 Mobile AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux

[15:40:51] 0 ;) harvie@insomnia ~ $ /usr/bin/pacman -Qv kernel26 |tail -n 1
kernel26 2.6.38.6-1
[15:41:00] 0 ;) harvie@insomnia ~ $ /usr/bin/pacman -Qv pidgin |tail -n 1
pidgin 2.7.11-3

@baongoc124
Copy link
Author

Sorry, here it is http://paste2.org/p/1417336 . I'm using the same Pidgin version but on 64bit.

@Harvie
Copy link
Owner

Harvie commented May 15, 2011

It seems to me like some bug in 64b pidgin... I probably returns incorrect address to version string. (It points somewhere else instead which causes SEGV when i try to read string from that address. Can you also try to build pidgin from ABS using latest GCC with all optimalizations disabled?

(I don't have any 64b machine, so i can't make those experiments on myself)

@baongoc124
Copy link
Author

Recompiled and still crashed. These are arguments to ./configure http://paste2.org/p/1417381

@Harvie
Copy link
Owner

Harvie commented May 15, 2011

I can reccomend you to fill upstream libpurple bug at http://developer.pidgin.im/
and ask why purple_core_get_version() is returning crap on 64b...

@Harvie
Copy link
Owner

Harvie commented May 15, 2011

BTW if you will do so, please post here URL of that issue so we can give votes to it and watch status.

@Harvie
Copy link
Owner

Harvie commented Jun 11, 2011

Still issue with latest pidgin? BTW pidgin 2.8 seems buggy to me (but not related to this issue...)

@Mates
Copy link

Mates commented Jan 17, 2012

Issue still persists on Pidgin 2.10.1, x86_64. Commenting both of these lines helped me.

setenv(ENV_PREFIX "L_AGENT", (char *) core_ui, 1);  //ID of IM client used with answerscripts
setenv(ENV_PREFIX "L_AGENT_VERSION", (char *) core_version, 1); //Version of client

also, a little off-topic, scripts don't work within multichats, can anything be done about that?

@Harvie
Copy link
Owner

Harvie commented Jan 18, 2012

Well as workaround i've disabled L_AGENT on 64b.

BTW can you try to move those lines:

    const char * core_ui = purple_core_get_ui() != 0 ? (const char *) purple_core_get_ui() : "";
    const char * core_version = purple_core_get_version() != 0 ? (const char *) purple_core_get_version() : "";
    setenv(ENV_PREFIX "L_AGENT", (char *) core_ui, 1);  //ID of IM client used with answerscripts
    setenv(ENV_PREFIX "L_AGENT_VERSION", (char *) core_version, 1); //Version of client

Just after this line (where all other setenvs are):

setenv(ENV_PREFIX "L_STATUS_MSG", status_msg, 1); //status message set by local user

i think it may help... but i am not sure... let me know please.

@Mates
Copy link

Mates commented Jan 18, 2012

Tried to move those lines, now Pidgin will start normally but crashes with the same error immediately when any message is received.

@Harvie
Copy link
Owner

Harvie commented Aug 21, 2015

After latest system upgrades it started to crash for me on archlinux too. Maybe because i switched to 64b kernel... But i still use 32b userspace... BTW It happens only for ICQ messages, Jabber and IRC are OK. Same backtrace as yours. Maybe pidgin is returning bad pointer somewhere...

Only good part is that i can reproduce it now :-)

However there's upstream ticket:
https://developer.pidgin.im/ticket/15167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants