adept_batch crashes if target package does not exist

Bug #153710 reported by Alexey Alexandrov
2
Affects Status Importance Assigned to Milestone
adept (Ubuntu)
Fix Released
Medium
Michael D. Stemle, Jr.

Bug Description

Binary package hint: adept-batch

`kdesu adept_batch install inexistent` crashes
adept-batch version is 2.1.3ubuntu17

Revision history for this message
Michael D. Stemle, Jr. (manchicken) wrote :

This thing doesn't do much in the way of useful dumps here, so I'll put up the output I'm getting.

manchicken@thepea:~$ sudo adept-batch install blablatoto
[sudo] password for manchicken:
sudo: adept-batch: command not found
manchicken@thepea:~$ sudo adept_batch install blablatoto
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode: 146
  Minor opcode: 3
  Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode: 146
  Minor opcode: 3
  Resource id: 0x0
Failed to open device
kapture::PkgSystem::PkgSystem()
terminate called after throwing an instance of 'std::out_of_range'
  what(): Tried to use invalid Entity
KCrash: Application 'adept_batch' crashing...

Changed in adept:
assignee: nobody → manchicken
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
F7205 2610539 54B8BD49D49D (krugerk) wrote :

$ sudo adept_batch install blablatoto
kapture::PkgSystem::PkgSystem()
terminate called after throwing an instance of 'std::out_of_range'
  what(): Tried to use invalid Entity
KCrash: Application 'adept_batch' crashing...
krugerk@WaltzingAlong:~$ sudo adept_batch install blablatoto
kapture::PkgSystem::PkgSystem()
terminate called after throwing an instance of 'std::out_of_range'
  what(): Tried to use invalid Entity
KCrash: Application 'adept_batch' crashing...

and from the crash handler:
This backtrace appears to be of no use.
This is probably because your packages are built in a way which prevents creation of proper backtraces, or the stack frame was seriously corrupted in the crash.

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

Changed in adept:
status: Confirmed → In Progress
Revision history for this message
Michael D. Stemle, Jr. (manchicken) wrote :

Here, have a patch. This was being caused by markInstall and markRemove being called on invalid packages. The simple fix is to add a conditional around the calls to markInstall and markRemove to determine whether or not the package is valid so that the mark* methods aren't being called on invalid packages.

In this fix, if package "ABC123" isn't found, a dialog pops up informing the user of the problem and then exits.

Revision history for this message
Anthony Mercatante (tonio) wrote :

adept (2.1.3ubuntu21) hardy; urgency=low

  * Added kubuntu_29_batch_check_pkgname.diff
    Closes LP: #153710

 -- Anthony Mercatante <email address hidden> Mon, 19 Nov 2007 21:04:54 +0100

Changed in adept:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.