Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

GForum::do_func is freezing on me :(

Quote Reply
GForum::do_func is freezing on me :(
Hi guys. Can anyone see a reason as to why this code would freeze on me?

Code:
sub pm_normal {

print $IN->header();
# GForum::Message::sent_messages();

use GForum;
GForum::do_func('message_list');
exit;
}

If I comment out the bits in red, it runs fine, but obviously just gives a blank page.

Basically, all I want to achive, is some way to show the normal PM system front-page (where you can view sent/recieved PM's all on one page).

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] GForum::do_func is freezing on me :( In reply to
Try:

Code:
sub pm_normal {
require GForum;
return GForum::do_func('message_list');
}

The message_list action will print a header on it's own so there's no need to explicitly print one. Also a "require" is better than a "use" as it won't load the module again if it is already in memory.
Quote Reply
Re: [Orbital] GForum::do_func is freezing on me :( In reply to
Thanks for the reply :)

I've tried your suggestion, but it still hangs :(

http://www.ultranerds.com/...unc=pmmanager_normal

This is really starting to hurt my head :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] GForum::do_func is freezing on me :( In reply to
See if a GT::Plugins->action(STOP) before the return line helps.

Remember to import STOP at the top of your module.
Quote Reply
Re: [Orbital] GForum::do_func is freezing on me :( In reply to
I'm kinda getting there. It seems that what this is doing;

Code:
sub pm_normal {
GT::Plugins->action(STOP);
require GForum;
return GForum::do_func('message_list');
#exit;
}

... is actually showing the results several times (10 times, before I stopped it).

I don't quite see why its doing this Unimpressed

Code:
if ($a eq "pmmanager" && !$b) {
&pm_show_front_page; exit;
} elsif ($b eq "pmmanager_normal") {
&pm_normal;
} ... etc

I'm gonna stop for the night now. My head is really hurting now :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Orbital] GForum::do_func is freezing on me :( In reply to
Oh, here is the result of a "ps aux" in SSH;

Quote:
ultrane 23929 99.7 0.4 9944 8296 ? R 09:52 0:10 /usr/bin/perl5 gforum.cgi

99.7% CPU Unimpressed

TIA for any suggestions/help :)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] GForum::do_func is freezing on me :( In reply to
GT? Anyone?

I need to get this going.. as its the final touch to my "PMManager" .. but there is no way I'm releasing it with this large memory issue :(

Pretty please Unsure

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] GForum::do_func is freezing on me :( In reply to
Someone PLEASE PLEASE PLEASE.

This is one of the very few questions I ask... but no-one ever seems to answer my questions ... are they too hard? Unsure Otherwise I'm just gonna have to leave this feature out. Its frozen my computer 6 times now, and crashed it 5 (this is 2.4Ghz machine, with 1Gb RAM, so its pretty hard to crash).

It seems that do_func() is just looping, and giving an endless list of PM's over-and-over again .. which in the end just topples the computer, as it get to 2-3mb in vrutally no time Frown (which IE can't handle very well, and thus crashes).

Someone must know why this isn't working Unimpressed

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] GForum::do_func is freezing on me :( In reply to
Finally got it fixed :)

I ended up just using my own code to grab the message list ... Its a bit more long winded than I was hoping... but I was just getting a bit fed up with trying to get it all working with the current routines :(

Should have a beta release later today/tomorrow :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!