News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Admin section causes crash in IE6?

Started by MKaprocki, September 03, 2004, 12:48:59 PM

Previous topic - Next topic

MKaprocki

This has happened on 2 different computers now.  If I log in to the forum and go to the admin section, everything is fine.  But as soon as I click a link to go to another page (settings, forum home, etc), I get a crash.  If I disable Active Scripting in IE, I don't get the crash.  It only does it when I go to the main admin page.  If I go to the settings page and turn scripting back on then it's ok.  But when I go back to the main admin page, it'll crash when I leave.  I'm thinking it's caused from when it tries to display news from Simple Machines.  The crash is in an unknown module.  I'm running XP Pro SP2, the other computer was running XP Pro SP1.  Using SMF 1.0 RC1.  Any ideas?  Maybe I can just disable that news thing?

BigJacko

If it helps, I've got the same setup as one of your PCs, and have no problems with this. XP-Pro, SP1 (plus all latest patches except SP2), running IE6 (6.0.2800.1106.xpsp2.030422-1663). My Java version is Sun Java 2 1.4.2_05 not MS-Java (cos that's dead). My forum is also SMF 1.0 RC1.

I don't think it's necessarily a general IE6 problem - perhaps post the full text of the error, and (if you think Scripting/Java is involved) some output from the Java Console window at the time of the crash?
This area zoned for redevelopment. Apply City Planning Dept. Brown envelopes preferred if bringing bribes.

[Unknown]

I've heard of more and more crashes from SP2 :P. (generally, not with SMF..)

First off, Java isn't involved.  JavaScript and Java are completely different, and even if you have Sun, Microsoft's implementation of JavaScript (named JScript) is being used.  So that doesn't matter.

If you try a different browser, such as Mozilla Firefox[url], does it still crash?  Does it crash on other SP1/SP2 computers?

What if you go to admin and then close your browser completely?

-[Unknown]

MKaprocki

#3
I tried FireFox on the SP1 computer as soon as I saw the crash and it worked fine.  I haven't tried it on the SP2 computer.  The other admin of the site has SP1, with no crashes from admin.  It seems that sometimes the crashed module is unknown, but other times it is mshtml.dll.  The offset for the mshtml.dll crash is 7D4F2BD3, which is an internal function (can't tell you the name because it's not exported).  I used Visual C++ to debug the crash that said unknown module, and it brought me into ntdll.dll.  Both of the crashes are a result of an invalid pointer.  If I close IE from the admin screen, I don't get the crash.

[Unknown]

Okay, you seem to know a bit more than the average fellow ;).

In Admin.template.php, can you search for "http://www.simplemachines.org" and whenever you find it replace it with something that won't work? (like http://localhost/fake or something..)

That would give a better idea of whether it's caused by that javascript or not.

-[Unknown]

MKaprocki

Quote from: [Unknown] on September 03, 2004, 02:46:18 PM
Okay, you seem to know a bit more than the average fellow ;).

I'm a programmer, so I've got some experience at tracking down crashes. ;)


I changed the addresses like you said (6 of them), and it made no difference.  The admin page says I was unable to connect, as expected, but it still crashes when I leave that page.  It doesn't matter where I go when I leave, just that I leave.  If I go to admin, then hit the Home button, it'll still crash.

[Unknown]

Are you experienced enough with PHP to try to debug it...?

What I would do is start pruning out javascript left and right until it stopped crashing ;).

-[Unknown]

MKaprocki

ok, I'll start going through and see what I can find.  FWIW, the other admin of the site has SP2 with no crashes, not SP1 like I said before.

MKaprocki

Took out every javascript on that page and it fixed the crash.  Going to add things back in and find what causes it.

[Unknown]


MKaprocki

#10
I've narrowed the crash down to:


if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'])
echo '
if (typeof(smf_codeFix) != "undefined")
window.detachEvent("onload", smf_codeFix);
window.attachEvent("onload",
function ()
{
with (document.all.supportVersionsTable)
style.height = parentNode.offsetHeight;
}
);
if (typeof(smf_codeFix) != "undefined")
window.attachEvent("onload", smf_codeFix);
';


Edit:  To go into it even further, the crash is fixed when I get rid of the window.attachEvent("onload",function ().....

BigJacko

Sounds to me like either a browser patch problem, or the remnants of a screwed-up system. You haven't had any browser-hijacks at all, have you?

The detachEvent and onload stuff resides in MSHTML.DLL, I think - most of the dynamic HTML layer stuff, etc, is in there. What version of that file do you have?

And what exactly was the error/exception that you got? Invalid Page Fault? You can tell via Administrative Tools>>Event Viewer in the Application (or mayb System) event log. Might be worth posting that here. You may also have a mini-dump file saved to disk somewhere too (if so, it'll say so in the event log for that crash)

It might also be worth using system file checker (SFC) to make sure your browser install's not been damaged, but that's really a leap in the dark till we know what the actual error was.
This area zoned for redevelopment. Apply City Planning Dept. Brown envelopes preferred if bringing bribes.

[Unknown]

Try replacing:

with (document.all.supportVersionsTable)
style.height = parentNode.offsetHeight;

With:

document.all.supportVersionsTable.style.height = document.all.supportVersionsTable.parentNode.offsetHeight;

Any change?

-[Unknown]

MKaprocki

[Unknown], no difference.

BigJacko, I reformatted my computer less than a month ago, so I doubt there's anything wrong already.  I run Ad-Aware and PestPatrol 4-5 times a week, with nothing found now.  The Event Viewer does not tell you the exact problem, only that there was a fault.  I know from debugging it, however, that it was caused by an invalid pointer, therefore making it an Access Violation error.

[Unknown]

And, if you take out the one line (or lines) I referenced, it goes away?

-[Unknown]

MKaprocki

I have to take out the entire window.attachEvent call.  Even if I leave function() empty, it still crashes.

[Unknown]

Could it be the anonymous function?  What if you move it to be a defined function and then tell it to attach that?

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/attachevent.asp

Microsoft doesn't seem to offer examples using anonymous functions as often, maybe it's buggy?

-[Unknown]

MKaprocki

That did not help the crash.

However.....I disabled my popup stopper and it fixed it.  Looks like it's just a problem with PopUpCop, rather than the forum code itself. ::)

Advertisement: