Bug 169844 - Regression: Uncaught infinite recursion in javascript
Summary: Regression: Uncaught infinite recursion in javascript
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.1.0
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 165668 166781 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-26 12:10 UTC by Allan Sandfeld
Modified: 2010-04-04 23:43 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld 2008-08-26 12:10:36 UTC
Version:            (using KDE 4.1.0)
Installed from:    Compiled From Sources

When entering this page: http://forum.cafeen.org/index.php?showtopic=837&st=1760&start=1760
Konqueror stalls and enters an infinite recursion. This is a regression from 3.5.9, but also existed in KDE 4.0.

I have a few backtraces from the recursion here: 
#0  0xb4475cd1 in DOM::TagNodeListImpl::nodeMatches (this=0x9051ad0, testNode=0x96a04a0)   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2158                          
#1  0xb44734af in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x9423080,    
    start=0x9423150, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2058                          
#2  0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x9422e48,    
    start=0x94228c0, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#3  0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x9421118,    
    start=0x9421460, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#4  0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x941c950,    
    start=0x941ab70, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#5  0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x941bd90,    
    start=0x941c950, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#6  0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x9169d00,    
    start=0x8e63d20, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#7  0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x9098a90,    
---Type <return> to continue, or q <return> to quit---                                     
    start=0x9098b30, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#8  0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x8c8d148,    
    start=0x8c8d5c0, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#9  0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x8cad2e0,    
    start=0x8ce6798, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#10 0xb44734e6 in DOM::NodeListImpl::recursiveItem (this=0x9051ad0, absStart=0x8c625d4,    
    start=0x8b18cb0, offset=@0xbfeb2634)                                                   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2062                          
#11 0xb4473f43 in DOM::NodeListImpl::item (this=0x9051ad0, index=11471)                    
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:1988                          
#12 0xb45f5bd7 in KJS::DOMNodeList::indexGetter (this=0xb25ee1e0, exec=0xbfeb2b20,         
    index=12071) at /home/carewolf/kde/kdelibs/khtml/ecma/kjs_dom.cpp:703                  
#13 0xb428c1b5 in KJS::PropertySlot::getValue (this=0xbfeb26b8, exec=0xbfeb2b20,           
    originalObject=0xb25ee1e0, propertyName=12071)                                         
    at /home/carewolf/kde/kdelibs/kjs/property_slot.h:53                                   
#14 0xb429acff in KJS::JSValue::getByIndex (this=0xb25ee1e0, exec=0xbfeb2b20,              
    propertyName=12071) at /home/carewolf/kde/kdelibs/kjs/value.cpp:228                    
#15 0xb42b4d39 in KJS::Machine::runBlock (exec=0xbfeb2b20, codeBlock=@0x9138004,           
---Type <return> to continue, or q <return> to quit---                                     
    parentExec=0x8c8a420) at codes.def:712                                                 
#16 0xb4297ef1 in KJS::FunctionImp::callAsFunction (this=0xb25e4be0, exec=0x8c8a420,       
    thisObj=0xb25f0000, args=@0xbfeb2c68)                                                  
    at /home/carewolf/kde/kdelibs/kjs/function.cpp:143                                     
#17 0xb429c08d in KJS::JSObject::call (this=0xb25e4be0, exec=0x8c8a420,                    
    thisObj=0xb25f0000, args=@0xbfeb2c68) at /home/carewolf/kde/kdelibs/kjs/object.cpp:99  
#18 0xb4652083 in KJS::JSEventListener::handleEvent (this=0x937c2e0, evt=@0xbfeb2cb0)      
    at /home/carewolf/kde/kdelibs/khtml/ecma/kjs_events.cpp:106                            
#19 0xb445ddf7 in DOM::DocumentImpl::defaultEventHandler (this=0x8c625c8, evt=0x8f97bf8)   
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_docimpl.cpp:2699                           
#20 0xb4479526 in DOM::NodeImpl::dispatchWindowEvent (this=0x8c625d4, _id=16,              
    canBubbleArg=<value optimized out>, cancelableArg=<value optimized out>)               
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:565                           
#21 0xb44c539b in DOM::HTMLDocumentImpl::close (this=0x8c625c8)                            
    at /home/carewolf/kde/kdelibs/khtml/html/html_documentimpl.cpp:252                     
#22 0xb4414fea in KHTMLPart::checkEmitLoadEvent (this=0x8c6f678)                           
    at /home/carewolf/kde/kdelibs/khtml/khtml_part.cpp:2362                                
#23 0xb4415518 in KHTMLPart::checkCompleted (this=0x8c6f678)                               
    at /home/carewolf/kde/kdelibs/khtml/khtml_part.cpp:2283                                
#24 0xb44178a3 in KHTMLPart::slotLoaderRequestDone (this=0x8c6f678, dl=0x8d23d48,          
    obj=0x90f87c0) at /home/carewolf/kde/kdelibs/khtml/khtml_part.cpp:2137                 
---Type <return> to continue, or q <return> to quit---                                     
#25 0xb44221e5 in KHTMLPart::qt_metacall (this=0x8c6f678,                                  
    _c=QMetaObject::InvokeMetaMethod, _id=69, _a=0xbfeb2f98)                               
    at /home/carewolf/kde/kdelibs/build-4.1/khtml/khtml_part.moc:314                       
#26 0xb7570086 in QMetaObject::activate (sender=0x8c1d090,                                 
    from_signal_index=<value optimized out>, to_signal_index=5, argv=0xb47d44e8)           
    at kernel/qobject.cpp:3004                                                             
#27 0xb75704e2 in QMetaObject::activate (sender=0x8c1d090, m=0xb47e4638,                   
    local_signal_index=1, argv=0xbfeb2f98) at kernel/qobject.cpp:3077                      
#28 0xb45c1d49 in khtml::Loader::requestDone (this=0x8c1d090, _t1=0x8d23d48,               
    _t2=0x90f87c0) at /home/carewolf/kde/kdelibs/build-4.1/khtml/loader.moc:150            
#29 0xb45c561e in khtml::Loader::slotFinished (this=0x8c1d090, job=0x8c8d398)              
    at /home/carewolf/kde/kdelibs/khtml/misc/loader.cpp:1404                               
#30 0xb45c5927 in khtml::Loader::qt_metacall (this=0x8c1d090,                              
    _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbfeb311c)                                
    at /home/carewolf/kde/kdelibs/build-4.1/khtml/loader.moc:129                           
#31 0xb7570086 in QMetaObject::activate (sender=0x8c8d398,                                 
    from_signal_index=<value optimized out>, to_signal_index=7, argv=0xb47d44e8)           
    at kernel/qobject.cpp:3004                                                             
#32 0xb75704e2 in QMetaObject::activate (sender=0x8c8d398, m=0xb7824888,                   
    local_signal_index=3, argv=0xbfeb311c) at kernel/qobject.cpp:3077                      
#33 0xb772b583 in KJob::result (this=0x8c8d398, _t1=0x8c8d398)                             
---Type <return> to continue, or q <return> to quit---                                     
    at /home/carewolf/kde/kdelibs/build-4.1/kdecore/kjob.moc:186                           
#34 0xb772ba82 in KJob::emitResult (this=0x8c8d398)                                        
    at /home/carewolf/kde/kdelibs/kdecore/jobs/kjob.cpp:290                                
#35 0xb7cdf93f in KIO::SimpleJob::slotFinished (this=0x8c8d398)                            
    at /home/carewolf/kde/kdelibs/kio/kio/job.cpp:498                                      
#36 0xb7cdfcc3 in KIO::TransferJob::slotFinished (this=0x8c8d398)                          
    at /home/carewolf/kde/kdelibs/kio/kio/job.cpp:967                                      
#37 0xb7ce653b in KIO::TransferJob::qt_metacall (this=0x8c8d398,                           
    _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfeb3368)                                
    at /home/carewolf/kde/kdelibs/build-4.1/kio/jobclasses.moc:336                         
#38 0xb7570086 in QMetaObject::activate (sender=0x91faa50,                                 
    from_signal_index=<value optimized out>, to_signal_index=8, argv=0xb47d44e8)           
    at kernel/qobject.cpp:3004                                                             
#39 0xb75704e2 in QMetaObject::activate (sender=0x91faa50, m=0xb7e47664,                   
    local_signal_index=4, argv=0x0) at kernel/qobject.cpp:3077                             
#40 0xb7d82077 in KIO::SlaveInterface::finished (this=0x91faa50)                           
    at /home/carewolf/kde/kdelibs/build-4.1/kio/slaveinterface.moc:161                     
#41 0xb7d83c3f in KIO::SlaveInterface::dispatch (this=0x91faa50, _cmd=104,                 
    rawdata=@0xbfeb3504) at /home/carewolf/kde/kdelibs/kio/kio/slaveinterface.cpp:175      
#42 0xb7d846f8 in KIO::SlaveInterface::dispatch (this=0x91faa50)                           
    at /home/carewolf/kde/kdelibs/kio/kio/slaveinterface.cpp:90                            
---Type <return> to continue, or q <return> to quit---                                     
#43 0xb7d772a7 in KIO::Slave::gotInput (this=0x91faa50)                                    
    at /home/carewolf/kde/kdelibs/kio/kio/slave.cpp:319                                    
#44 0xb7d78673 in KIO::Slave::qt_metacall (this=0x91faa50,                                 
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfeb3618)                                
    at /home/carewolf/kde/kdelibs/build-4.1/kio/slave.moc:75                               
#45 0xb7570086 in QMetaObject::activate (sender=0x91ff518,                                 
    from_signal_index=<value optimized out>, to_signal_index=4, argv=0xb47d44e8)           
    at kernel/qobject.cpp:3004                                                             
#46 0xb75704e2 in QMetaObject::activate (sender=0x91ff518, m=0xb7e442c0,                   
    local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3077                             
#47 0xb7cb28d7 in KIO::Connection::readyRead (this=0x91ff518)                              
    at /home/carewolf/kde/kdelibs/build-4.1/kio/connection.moc:84                          
#48 0xb7cb3736 in KIO::ConnectionPrivate::dequeue (this=0x91ff5d0)                         
    at /home/carewolf/kde/kdelibs/kio/kio/connection.cpp:82                                
#49 0xb7cb4586 in KIO::Connection::qt_metacall (this=0x91ff518,                            
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x8c995f0)                                 
    at /home/carewolf/kde/kdelibs/build-4.1/kio/connection.moc:72                          
#50 0xb7568d2b in QMetaCallEvent::placeMetaCall (this=0x91ffc30, object=0x91ff518)         
    at kernel/qobject.cpp:535                                                              
#51 0xb756aee0 in QObject::event (this=0x91ff518, e=0x91ffc30) at kernel/qobject.cpp:1128  
#52 0xb6ac5a88 in QApplicationPrivate::notify_helper (this=0x87d33f8, receiver=0x91ff518,  
---Type <return> to continue, or q <return> to quit---                                     
    e=0x91ffc30) at kernel/qapplication.cpp:3800                                           
#53 0xb6acc529 in QApplication::notify (this=0xbfeb3edc, receiver=0x91ff518, e=0x91ffc30)  
    at kernel/qapplication.cpp:3392                                                        
#54 0xb7aba141 in KApplication::notify (this=0xbfeb3edc, receiver=0x91ff518,               
    event=0x91ffc30) at /home/carewolf/kde/kdelibs/kdeui/kernel/kapplication.cpp:311       
#55 0xb755b753 in QCoreApplication::notifyInternal (this=0xbfeb3edc, receiver=0x91ff518,   
    event=0x91ffc30) at kernel/qcoreapplication.cpp:587                                    
#56 0xb755ed47 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0,   
    data=0x87c6c40) at kernel/qcoreapplication.h:215                                       
#57 0xb755ef4b in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0)          
    at kernel/qcoreapplication.cpp:1095                                                    
#58 0xb758356d in postEventSourceDispatch (s=0x87d58d8) at kernel/qcoreapplication.h:220   
#59 0xb6596978 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0                

#0  0xb4475cd1 in DOM::TagNodeListImpl::nodeMatches (this=0x9051ad0, testNode=0x9709ec0)
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2158                       
#1  0xb44733f5 in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x96dc2a8)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2012                       
#2  0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x9423080)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#3  0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x9422e48)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#4  0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x9421118)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#5  0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x941c950)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#6  0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x941bd90)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#7  0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x9169d00)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#8  0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x9098a90)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#9  0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x8c8d148)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#10 0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x8cad2e0)       
---Type <return> to continue, or q <return> to quit---                                  
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#11 0xb447340f in DOM::NodeListImpl::calcLength (this=0x9051ad0, start=0x8c625d4)       
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2015                       
#12 0xb4473891 in DOM::NodeListImpl::length (this=0x9051ad0)                            
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:2001                       
#13 0xb4600e1c in KJS::getIndexSlot<KJS::DOMNodeList, DOM::NodeListImpl> (              
    thisObj=0xb25ee1e0, listObj=@0x9051ad0, propertyName=@0xbfeb264c, slot=@0xbfeb26b8) 
    at /home/carewolf/kde/kdelibs/khtml/ecma/kjs_binding.h:225                          
#14 0xb45fa97a in KJS::DOMNodeList::getOwnPropertySlot (this=0xb25ee1e0, exec=0xbfeb2b20, 
    propertyName=@0xbfeb264c, slot=@0xbfeb26b8)                                           
    at /home/carewolf/kde/kdelibs/khtml/ecma/kjs_dom.cpp:750                              
#15 0xb429cd70 in KJS::JSObject::getOwnPropertySlot (this=0xb25ee1e0, exec=0xbfeb2b20,    
    propertyName=17495, slot=@0xbfeb26b8) at /home/carewolf/kde/kdelibs/kjs/object.cpp:200
#16 0xb429ba4a in KJS::JSObject::getPropertySlot (this=0xb25ee1e0, exec=0xbfeb2b20,       
    propertyName=17495, slot=@0xbfeb26b8) at /home/carewolf/kde/kdelibs/kjs/object.cpp:185
#17 0xb429ace1 in KJS::JSValue::getByIndex (this=0xb25ee1e0, exec=0xbfeb2b20,             
    propertyName=17495) at /home/carewolf/kde/kdelibs/kjs/value.cpp:227                   
#18 0xb42b4d39 in KJS::Machine::runBlock (exec=0xbfeb2b20, codeBlock=@0x9138004,          
    parentExec=0x8c8a420) at codes.def:712                                                
#19 0xb4297ef1 in KJS::FunctionImp::callAsFunction (this=0xb25e4be0, exec=0x8c8a420,      
    thisObj=0xb25f0000, args=@0xbfeb2c68)                                                 
---Type <return> to continue, or q <return> to quit---                                    
    at /home/carewolf/kde/kdelibs/kjs/function.cpp:143                                    
#20 0xb429c08d in KJS::JSObject::call (this=0xb25e4be0, exec=0x8c8a420,                   
    thisObj=0xb25f0000, args=@0xbfeb2c68) at /home/carewolf/kde/kdelibs/kjs/object.cpp:99 
#21 0xb4652083 in KJS::JSEventListener::handleEvent (this=0x937c2e0, evt=@0xbfeb2cb0)     
    at /home/carewolf/kde/kdelibs/khtml/ecma/kjs_events.cpp:106                           
#22 0xb445ddf7 in DOM::DocumentImpl::defaultEventHandler (this=0x8c625c8, evt=0x8f97bf8)  
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_docimpl.cpp:2699                          
#23 0xb4479526 in DOM::NodeImpl::dispatchWindowEvent (this=0x8c625d4, _id=16,             
    canBubbleArg=<value optimized out>, cancelableArg=<value optimized out>)              
    at /home/carewolf/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp:565                          
#24 0xb44c539b in DOM::HTMLDocumentImpl::close (this=0x8c625c8)                           
    at /home/carewolf/kde/kdelibs/khtml/html/html_documentimpl.cpp:252                    
#25 0xb4414fea in KHTMLPart::checkEmitLoadEvent (this=0x8c6f678)                          
    at /home/carewolf/kde/kdelibs/khtml/khtml_part.cpp:2362                               
#26 0xb4415518 in KHTMLPart::checkCompleted (this=0x8c6f678)                              
    at /home/carewolf/kde/kdelibs/khtml/khtml_part.cpp:2283                               
#27 0xb44178a3 in KHTMLPart::slotLoaderRequestDone (this=0x8c6f678, dl=0x8d23d48,         
    obj=0x90f87c0) at /home/carewolf/kde/kdelibs/khtml/khtml_part.cpp:2137                
#28 0xb44221e5 in KHTMLPart::qt_metacall (this=0x8c6f678,                                 
    _c=QMetaObject::InvokeMetaMethod, _id=69, _a=0xbfeb2f98)                              
    at /home/carewolf/kde/kdelibs/build-4.1/khtml/khtml_part.moc:314                      
---Type <return> to continue, or q <return> to quit---                                    
#29 0xb7570086 in QMetaObject::activate (sender=0x8c1d090,                                
    from_signal_index=<value optimized out>, to_signal_index=5, argv=0xb47d5f08)          
    at kernel/qobject.cpp:3004                                                            
#30 0xb75704e2 in QMetaObject::activate (sender=0x8c1d090, m=0xb47e4638,                  
    local_signal_index=1, argv=0xbfeb2f98) at kernel/qobject.cpp:3077                     
#31 0xb45c1d49 in khtml::Loader::requestDone (this=0x8c1d090, _t1=0x8d23d48,              
    _t2=0x90f87c0) at /home/carewolf/kde/kdelibs/build-4.1/khtml/loader.moc:150           
#32 0xb45c561e in khtml::Loader::slotFinished (this=0x8c1d090, job=0x8c8d398)             
    at /home/carewolf/kde/kdelibs/khtml/misc/loader.cpp:1404                              
#33 0xb45c5927 in khtml::Loader::qt_metacall (this=0x8c1d090,                             
    _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbfeb311c)                               
    at /home/carewolf/kde/kdelibs/build-4.1/khtml/loader.moc:129                          
#34 0xb7570086 in QMetaObject::activate (sender=0x8c8d398,                                
    from_signal_index=<value optimized out>, to_signal_index=7, argv=0xb47d5f08)          
    at kernel/qobject.cpp:3004                                                            
#35 0xb75704e2 in QMetaObject::activate (sender=0x8c8d398, m=0xb7824888,                  
    local_signal_index=3, argv=0xbfeb311c) at kernel/qobject.cpp:3077                     
#36 0xb772b583 in KJob::result (this=0x8c8d398, _t1=0x8c8d398)                            
    at /home/carewolf/kde/kdelibs/build-4.1/kdecore/kjob.moc:186                          
#37 0xb772ba82 in KJob::emitResult (this=0x8c8d398)                                       
    at /home/carewolf/kde/kdelibs/kdecore/jobs/kjob.cpp:290                               
---Type <return> to continue, or q <return> to quit---                                    
#38 0xb7cdf93f in KIO::SimpleJob::slotFinished (this=0x8c8d398)                           
    at /home/carewolf/kde/kdelibs/kio/kio/job.cpp:498                                     
#39 0xb7cdfcc3 in KIO::TransferJob::slotFinished (this=0x8c8d398)                         
    at /home/carewolf/kde/kdelibs/kio/kio/job.cpp:967                                     
#40 0xb7ce653b in KIO::TransferJob::qt_metacall (this=0x8c8d398,                          
    _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfeb3368)                               
    at /home/carewolf/kde/kdelibs/build-4.1/kio/jobclasses.moc:336                        
#41 0xb7570086 in QMetaObject::activate (sender=0x91faa50,                                
    from_signal_index=<value optimized out>, to_signal_index=8, argv=0xb47d5f08)          
    at kernel/qobject.cpp:3004                                                            
#42 0xb75704e2 in QMetaObject::activate (sender=0x91faa50, m=0xb7e47664,                  
    local_signal_index=4, argv=0x0) at kernel/qobject.cpp:3077                            
#43 0xb7d82077 in KIO::SlaveInterface::finished (this=0x91faa50)                          
    at /home/carewolf/kde/kdelibs/build-4.1/kio/slaveinterface.moc:161                    
#44 0xb7d83c3f in KIO::SlaveInterface::dispatch (this=0x91faa50, _cmd=104,                
    rawdata=@0xbfeb3504) at /home/carewolf/kde/kdelibs/kio/kio/slaveinterface.cpp:175     
#45 0xb7d846f8 in KIO::SlaveInterface::dispatch (this=0x91faa50)                          
    at /home/carewolf/kde/kdelibs/kio/kio/slaveinterface.cpp:90                           
#46 0xb7d772a7 in KIO::Slave::gotInput (this=0x91faa50)                                   
    at /home/carewolf/kde/kdelibs/kio/kio/slave.cpp:319                                   
#47 0xb7d78673 in KIO::Slave::qt_metacall (this=0x91faa50,                                
---Type <return> to continue, or q <return> to quit---                                    
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfeb3618)                               
    at /home/carewolf/kde/kdelibs/build-4.1/kio/slave.moc:75                              
#48 0xb7570086 in QMetaObject::activate (sender=0x91ff518,                                
    from_signal_index=<value optimized out>, to_signal_index=4, argv=0xb47d5f08)          
    at kernel/qobject.cpp:3004                                                            
#49 0xb75704e2 in QMetaObject::activate (sender=0x91ff518, m=0xb7e442c0,                  
    local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3077                            
#50 0xb7cb28d7 in KIO::Connection::readyRead (this=0x91ff518)                             
    at /home/carewolf/kde/kdelibs/build-4.1/kio/connection.moc:84                         
#51 0xb7cb3736 in KIO::ConnectionPrivate::dequeue (this=0x91ff5d0)                        
    at /home/carewolf/kde/kdelibs/kio/kio/connection.cpp:82                               
#52 0xb7cb4586 in KIO::Connection::qt_metacall (this=0x91ff518,                           
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x8c995f0)                                
    at /home/carewolf/kde/kdelibs/build-4.1/kio/connection.moc:72                         
#53 0xb7568d2b in QMetaCallEvent::placeMetaCall (this=0x91ffc30, object=0x91ff518)        
    at kernel/qobject.cpp:535                                                             
#54 0xb756aee0 in QObject::event (this=0x91ff518, e=0x91ffc30) at kernel/qobject.cpp:1128 
#55 0xb6ac5a88 in QApplicationPrivate::notify_helper (this=0x87d33f8, receiver=0x91ff518, 
    e=0x91ffc30) at kernel/qapplication.cpp:3800                                          
#56 0xb6acc529 in QApplication::notify (this=0xbfeb3edc, receiver=0x91ff518, e=0x91ffc30) 
    at kernel/qapplication.cpp:3392                                                       
---Type <return> to continue, or q <return> to quit---                                    
#57 0xb7aba141 in KApplication::notify (this=0xbfeb3edc, receiver=0x91ff518,              
    event=0x91ffc30) at /home/carewolf/kde/kdelibs/kdeui/kernel/kapplication.cpp:311      
#58 0xb755b753 in QCoreApplication::notifyInternal (this=0xbfeb3edc, receiver=0x91ff518,  
    event=0x91ffc30) at kernel/qcoreapplication.cpp:587
#59 0xb755ed47 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0,
    data=0x87c6c40) at kernel/qcoreapplication.h:215
#60 0xb755ef4b in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0)
    at kernel/qcoreapplication.cpp:1095
#61 0xb758356d in postEventSourceDispatch (s=0x87d58d8) at kernel/qcoreapplication.h:220
#62 0xb6596978 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0


While the code does seems to enter the slow path of uncached indexes it doesn't seem like the loop is here, but instead seems to originate from JavaScript.
Comment 1 Maksim Orlovich 2008-08-26 18:03:27 UTC
IRC discussion summary:
it loops infinitely because it keeps revisiting the same node, as it should 
since the collection is live.

Further analysis:
After debugging a bit w/Opera, it also revisits the image, but skips over it the next time it visits. Something is wrong with out ::width, I guess.

Comment 2 Maksim Orlovich 2008-08-26 18:41:01 UTC
Well, it's getting it from m_renderer->contentWidth(), after doing 
updateRendering(), but it still gets the stale value, not what it set.

Actually, even the below fails, returning 0:
<img src="http://www.kde.org/media/images/top-kde.jpg" id="img">

<script>
function test() {
  var i = document.getElementById("img");
  //alert(i);
  alert(i.width);
}

</script>
<body onload="test()">
Comment 3 Maksim Orlovich 2008-08-26 20:09:06 UTC
Allan: Q: how is the size of the image supposed to be recomputed from updateRendering/recalcStyle? It does the new style computation, then diffs them, and returns NoInherit the first time it's changed. Then only recalcStyle gets called and that's it --- how should some sort of a relayout/recompute size method be invoked? I can see that RenderObject::setStyle will call setNeedsLayoutAndMinMaxRecalc, as well as dirtyFormattingContext, but that just sets bits, doesn't it?

It seems like this ought to be synchronous for things like offsetWidth, etc., too. Oh. That calls updateLayout and not updateRendering.

How about this:
--- html/html_imageimpl.cpp     (revision 847547)
+++ html/html_imageimpl.cpp     (working copy)
@@ -286,7 +286,7 @@
             return 0;
     }

-    document()->updateRendering();
+    document()->updateLayout();

     return m_render ? m_render->contentWidth() :
                       getAttribute(ATTR_WIDTH).toInt();
@@ -304,7 +304,7 @@
             return 0;
     }

-    document()->updateRendering();
+    document()->updateLayout();

     return m_render ? m_render->contentHeight() :
                       getAttribute(ATTR_HEIGHT).toInt();
Comment 4 Maksim Orlovich 2008-08-27 18:58:33 UTC
Committed the above.
Comment 5 Maksim Orlovich 2008-08-27 18:59:24 UTC
*** Bug 165668 has been marked as a duplicate of this bug. ***
Comment 6 Maksim Orlovich 2008-08-27 19:00:25 UTC
*** Bug 166781 has been marked as a duplicate of this bug. ***
Comment 7 Nicolas L. 2010-04-04 23:29:19 UTC
*** Bug 233246 has been marked as a duplicate of this bug. ***
Comment 8 Allan Sandfeld 2010-04-04 23:43:38 UTC
Should note: The original reported case was solved by patch by Maksim. A test-case is now needed, and the duplicates may be unrelated but similar issue.