Bug 253284 - okular crashes on Windows 7 Pro 64-bit upon File > Open, with more than 10 drive letters mapped
Summary: okular crashes on Windows 7 Pro 64-bit upon File > Open, with more than 10 dr...
Status: RESOLVED FIXED
Alias: None
Product: kde-windows
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: KDE-Windows
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 05:03 UTC by Rand Kmiec
Modified: 2011-11-13 09:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
minimal test app to reproduce bug (847 bytes, application/octet-stream)
2011-03-01 15:53 UTC, Volkmar Wörner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rand Kmiec 2010-10-05 05:03:26 UTC
Version:           0.10.4 (using KDE 4.4.4) 
OS:                MS Windows

Using Windows 7 (professional, 64-bit), okular crashes when I choose File > Open.  No open dialog actually comes up, just get an "okular.exe has stopped working" window with a crash in QtCore4.dll.  Same behavior occurs whether or not I run in administrative mode.  Other Qt-based apps such as Qt Creator do not crash when I try their File > Open dialogs.  

Looking at Process Monitor, it looks like okular does go through my drives and tries to list contents, failing to do so on two USB drives that host TrueCrypt volumes and thus can't be accessed directly (D: and F:, which are mounted as P: and Q:), with result "INVALID PARAMETER".  I'm suspicious that this is the reason for the crash.

  Disabling access to those 2 drives via HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives and HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive prevents them from showing up in the Computer display, but they are still scanned according to Process Monitor, with the "INVALID PARAMTER" message.

Reproducible: Always

Steps to Reproduce:
Choose File > Open

Actual Results:  
okular crashes

Expected Results:  
File open dialog should be displayed

OS: WindowsNT (i686) release Windows 7
Compiler: cl.exe

Crash data:
Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	okular.exe
  Application Version:	0.0.0.0
  Application Timestamp:	4c0dbfc4
  Fault Module Name:	QtCore4.dll
  Fault Module Version:	4.6.2.0
  Fault Module Timestamp:	4c0a29a7
  Exception Code:	c0000005
  Exception Offset:	001009b3
  OS Version:	6.1.7600.2.0.0.256.48
  Locale ID:	1033
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789

In case the call stack is useful (probably isn't), here's what I get from Visual Studio:
==========================================

 	QtCore4.dll!671009b3() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for QtCore4.dll]	
 	QtGui4.dll!652dcca5() 	
 	QtGui4.dll!65446e4f() 	
 	QtGui4.dll!652e3cf1() 	
 	kio.dll!0176bc1a() 	
 	kio.dll!0176c85a() 	
 	kfile.dll!08cd3ca3() 	
	msvcr90.dll!free(void * pBlock=0x08d0e8b5)  Line 110	C
 	00dad33c()	
 	kernel32.dll!_HeapFree@12()  + 0x14 bytes
Comment 1 L Nix 2010-10-06 23:37:53 UTC
Removing the drives via registry settings may not have an effect on KDE/Qt apps.  

Have you tried actually physically removing the USB drives to verify this is the problem?
Comment 2 Rand Kmiec 2010-10-07 02:36:52 UTC
Thanks very much for the suggestions, it helped me get this working; after a bit of rebooting and further testing, it appears that having more than 10 drives mapped is what causes this crash (I normally have the Truecrypt volumes plus a bunch of drives from a card reader and an ISO mounter program, so there are a lot in the Computer display, probably more than many people have)... 10 drives or less and it seems to work fine, regardless of which drives these are or which letters they are.
Comment 3 Volkmar Wörner 2011-03-01 15:53:04 UTC
Created attachment 57590 [details]
minimal test app to reproduce bug

Testcase: minimal program
compile inside kdeenv.bat
When I had less than 13 driveletters, it worked fine.
When I had more than 13 driveletters, it crashed.
backtrace from MSVC2010, testapp compiled against trunk with MSVC2010:

        QtCore4.dll!70ea4f83()  
        [Unten angegebene Rahmen sind möglicherweise nicht korrekt und/oder fehlen, keine Symbole geladen für QtCore4.dll]   
        QtGui4.dll!7085ad53()  
        QtGui4.dll!706dcf72()  
        QtCore4.dll!70dda454()  
>       kio.dll!QMap<int,KUrlComboBox::KUrlComboBoxPrivate::KUrlComboItem const *>::node_create(QMapData * adt, QMapData::Node * * aupdate, const int & akey, const KUrlComboBox::KUrlComboBoxPrivate::KUrlComboItem * const & avalue)  Zeile 452       C++
        kio.dll!KUrlComboBox::KUrlComboBoxPrivate::insertUrlItem(const KUrlComboBox::KUrlComboBoxPrivate::KUrlComboItem * item)  Zeile 324 + 0x29 Bytes C++
        kio.dll!KUrlComboBox::setMaxItems(int max)  Zeile 344 + 0x14 Bytes      C++
        kfile.dll!KFileWidgetPrivate::readConfig(KConfigGroup & configGroup)  Zeile 1814 + 0x7b Bytes   C++
        kfile.dll!KFileWidget::KFileWidget(const KUrl & _startDir, QWidget * parent)  Zeile 586 C++
        kfilemodule.dll!KFileModule::createFileWidget(const KUrl & startDir, QWidget * parent)  Zeile 36 + 0x2c Bytes   C++
        kio.dll!KFileDialog::KFileDialog(const KUrl & startDir, const QString & filter, QWidget * parent, QWidget * customWidget)  Zeile 269 + 0x14 Bytes       C++
        kfiledialogtest.exe!main(int argc, char * * argv)  Zeile 25 + 0x3d Bytes        C++
        kfiledialogtest.exe!_WinMain@16()  + 0x105 Bytes        C++
        kfiledialogtest.exe!__tmainCRTStartup()  Zeile 547 + 0x1c Bytes C
        kernel32.dll!75b333ca()        
        ntdll.dll!76fd9ed2()    
        ntdll.dll!76fd9ea5()
Comment 4 Thomas Friedrichsmeier 2011-11-13 09:10:49 UTC
Git commit bc3bc23cace386d6cd5559336998e674a895deef by Thomas Friedrichsmeier.
Committed on 13/11/2011 at 10:10.
Pushed by tfry into branch 'KDE/4.7'.

Do not crash when setting maximum number of items to something smaller than the number of default items.
BUG: 253284
BUG: 281920

M  +3    -7    kio/kfile/kurlcombobox.cpp

http://commits.kde.org/kdelibs/bc3bc23cace386d6cd5559336998e674a895deef