Bug 370181 - partitionmanager crashes while opening and scanning device /dev/sda
Summary: partitionmanager crashes while opening and scanning device /dev/sda
Status: RESOLVED WORKSFORME
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: 1.2.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-06 07:09 UTC by hrvooje
Modified: 2016-11-03 09:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
partitions (77.34 KB, image/png)
2016-10-16 20:57 UTC, hrvooje
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hrvooje 2016-10-06 07:09:32 UTC
When I run 'sudo /usr/bin/partiotionmanager' it opens and throws a message 'scaning device /dev/sda'. After that it crashes with a message in terminal 
'QFileInfo::absolutePath: Constructed with empty filename' and 
'terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted


Reproducible: Always

Steps to Reproduce:
1. run sudo /usr/bin/partiotionmanager
2.opens with a message 'scaning device /dev/sda'
3.crashes with a message 
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted


Actual Results:  
Crashes every time

Expected Results:  
Opening Kpartiotion manager

Kde Mint 18, KDE Plasma 5.6.5
Comment 1 Andrius Štikonas 2016-10-16 20:23:18 UTC
I can't reproduce this crash with Mint 18. 

"QFileInfo::absolutePath: Constructed with empty filename" might be related to swap, there were some fixes for that in latest git version but it wasn't about crashes...

Any more info about partitions and file systems?
Comment 2 hrvooje 2016-10-16 20:57:11 UTC
Created attachment 101592 [details]
partitions
Comment 3 hrvooje 2016-10-16 20:59:53 UTC
I tried in Kubuntu 16.10  Plasma 5.7.5 and it started after waiting a while. But the message si similar. The picture with partitions is attached. There is ntfs, ext4 ..

Loaded backend plugin:  "pmlibpartedbackendplugin"
QLayout: Attempting to add QLayout "" to PartitionManagerWidget "m_PartitionManagerWidget", which already has a layout
QLayout: Attempting to add QLayout "" to ListDevices "m_ListDevices", which already has a layout
QLayout: Attempting to add QLayout "" to ListOperations "m_ListOperations", which already has a layout
QLayout: Attempting to add QLayout "" to QWidget "m_InfoPane", which already has a layout
QLayout: Attempting to add QLayout "" to TreeLog "m_TreeLog", which already has a layout
KXMLGUI file found at deprecated location ("/usr/share/partitionmanager/partitionmanagerui.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
Shortcut for action  "undoOperation" "Undo" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "refreshDevices" "Refresh Devices" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "createNewPartitionTable" "New Partition Table" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "newPartition" "New" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "resizePartition" "Resize/Move" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "deletePartition" "Delete" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "shredPartition" "Shred" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "copyPartition" "Copy" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "pastePartition" "Paste" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
"Using backend plugin: pmlibpartedbackendplugin (1)"
"Scanning devices..."
"Device found: ATA Hitachi HTS72505"
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
blkid: unknown file system type  ""  on  /dev/sda3
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
QFileInfo::absolutePath: Constructed with empty filename
"Partition ‘/dev/sda3’ is not properly aligned (first sector: 890099710, modulo: 2046)."
getting smart status failed for  "/dev/mmcblk0" :  Operation not supported
"Device found: SD SD16G"
"LibParted Exception: Unable to open /dev/mmcblk0 read-write (Read-only file system).  /dev/mmcblk0 has been opened read-only."
"LibParted Exception: Unable to open /dev/mmcblk0 read-write (Read-only file system).  /dev/mmcblk0 has been opened read-only."
"LibParted Exception: Unable to open /dev/mmcblk0 read-write (Read-only file system).  /dev/mmcblk0 has been opened read-only."
QFileInfo::absolutePath: Constructed with empty filename
"Scan finished."
Comment 4 Andrius Štikonas 2016-10-16 22:06:24 UTC
What do you mean it started after waiting a while. Does it take very long? It takes some time to scan partitions and get all required info. So I guess it works for you on Kubuntu.

Unfortunately I have no idea what causes std::bad_alloc. Google says it is usually thrown when you are out of memory but Partition Manager doesn't really use that much memory...
Comment 5 hrvooje 2016-10-17 09:44:59 UTC
Now when you say out of memory, last week I was copying something from webdav to network via samba. My cache folder was full and there were no space left on root partition. Now I have 40 GB free and it's hard to simulate that problem again. Does partitionmanager need disk space also?

It doesn't take too much time, maybe 20 seconds. This is ok now on Kubuntu. I will try later in Mint with no space left in root partiotion.
Comment 6 Andrius Štikonas 2016-10-17 11:49:16 UTC
No, I don't think we need any hard drive space except for tiny bit for storing settings. But I guess running out of space can make system perform unpredictably and something else goes wrong.

I guess 20 seconds is still ok. It depends on the speed of drives. There might be some improvements in newer versions. Both Kubuntu and Mint ship not too new 1.2.1...
Comment 7 hrvooje 2016-11-03 09:34:06 UTC
This problem occurred because I had no free disk space on my root partition.