Can only crop one small area of the screen

Bug #1733123 reported by Virgens Kamikazes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
basket
New
Undecided
Unassigned

Bug Description

When I select insert --> photograph screen monitor, only the top-right 960x432px area is available for selection. It's like the software detects a 960x432px monitor.

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

I'm using Ubuntu 17.10. But I also had this problem when using Ubuntu 17.04.

Revision history for this message
gl.bars (gl-bars) wrote :

I cannot reproduce this on Ubuntu 17.04. Can you specify more details?
- is it possible to resize the area selection frame (make it less than 960x432)?
- are you using Gnome desktop environment (default) or something different?
- what Basket version are you using?

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote : Re: [Bug 1733123] Re: Can only crop one small area of the screen

- the dark area (960 X 432) in itself in unchangeable, but I can crop any area within this area.

- yes, I'm using Gnome, but I also had this problem with Ubuntu 17.04, which I was using before October 2017.

- I'm using version 2.10-beta (KDE Development Platform 4.14.34)

Em 21/11/2017 13:57, gl.bars escreveu:

I cannot reproduce this on Ubuntu 17.04. Can you specify more details?
- is it possible to resize the area selection frame (make it less than 960x432)?
- are you using Gnome desktop environment (default) or something different?
- what Basket version are you using?

Revision history for this message
gl.bars (gl-bars) wrote :

Selection is limited by screen size and it seems screen size is determined incorrectly.

It could help to understand this better if you run attached regiongrabber_dbg, "Take screenshot" and copy log from the main window.
Ready-made 64-bit binary is included, but you can also build it from source:
1. Open Software & Updates and enable "Source code"
2. Run in terminal:
sudo apt-get build-dep basket
cd regiongrabber_dbg
qmake && make

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

This?

g++ -c -m64 -pipe -std=c++11 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
g++ -c -m64 -pipe -std=c++11 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o mainwindow.o
mainwindow.cpp
g++ -c -m64 -pipe -std=c++11 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o regiongrabber.o
regiongrabber.cpp
g++ -c -m64 -pipe -std=c++11 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o moc_mainwindow.o
moc_mainwindow.cpp
g++ -c -m64 -pipe -std=c++11 -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o
moc_regiongrabber.o moc_regiongrabber.cpp
g++ -m64 -Wl,-O1 -o regiongrabber_dbg main.o mainwindow.o
regiongrabber.o moc_mainwindow.o moc_regiongrabber.o
-L/usr/lib/x86_64-linux-gnu -lkdecore -lkdeui -lQtGui -lQtCore -lpthread

Em 30/11/2017 18:53, gl.bars escreveu:
> Selection is limited by screen size and it seems screen size is
> determined incorrectly.
>
> It could help to understand this better if you run attached regiongrabber_dbg, "Take screenshot" and copy log from the main window.
> Ready-made 64-bit binary is included, but you can also build it from source:
> 1. Open Software & Updates and enable "Source code"
> 2. Run in terminal:
> sudo apt-get build-dep basket
> cd regiongrabber_dbg
> qmake && make
>
> ** Attachment added: "regiongrabber test application"
> https://bugs.launchpad.net/basket/+bug/1733123/+attachment/5016711/+files/regiongrabber_dbg.zip
>

Revision history for this message
gl.bars (gl-bars) wrote :

You compiled the test app, now please run it
./regiongrabber_dbg
then press "Take screenshot", select an area and hit Enter
then copy log from main window of regiongrabber_dbg (not from terminal)

Thanks

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :
Download full text (17.7 KiB)

RG::RegionGrabber initial size 640x480

RG::init desktop()->size=1920x1080

RG::init pixmap size 1920x1080, resize to 1920x1080

RG::limitPointToRect((0,0), 1920x1080) = (0,0)

RG::mouseMoveEvent newSelection selection=1x1

RG::limitPointToRect((6,4), 1920x1080) = (6,4)

RG::mouseMoveEvent newSelection selection=7x5

RG::limitPointToRect((13,8), 1920x1080) = (13,8)

RG::mouseMoveEvent newSelection selection=14x9

RG::limitPointToRect((32,21), 1920x1080) = (32,21)

RG::mouseMoveEvent newSelection selection=33x22

RG::limitPointToRect((49,32), 1920x1080) = (49,32)

RG::mouseMoveEvent newSelection selection=50x33

RG::limitPointToRect((92,57), 1920x1080) = (92,57)

RG::mouseMoveEvent newSelection selection=93x58

RG::limitPointToRect((118,70), 1920x1080) = (118,70)

RG::mouseMoveEvent newSelection selection=119x71

RG::limitPointToRect((210,116), 1920x1080) = (210,116)

RG::mouseMoveEvent newSelection selection=211x117

RG::limitPointToRect((237,129), 1920x1080) = (237,129)

RG::mouseMoveEvent newSelection selection=238x130

RG::limitPointToRect((290,154), 1920x1080) = (290,154)

RG::mouseMoveEvent newSelection selection=291x155

RG::limitPointToRect((327,171), 1920x1080) = (327,171)

RG::mouseMoveEvent newSelection selection=328x172

RG::limitPointToRect((349,185), 1920x1080) = (349,185)

RG::mouseMoveEvent newSelection selection=350x186

RG::limitPointToRect((360,193), 1920x1080) = (360,193)

RG::mouseMoveEvent newSelection selection=361x194

RG::limitPointToRect((365,198), 1920x1080) = (365,198)

RG::mouseMoveEvent newSelection selection=366x199

RG::limitPointToRect((368,200), 1920x1080) = (368,200)

RG::mouseMoveEvent newSelection selection=369x201

RG::limitPointToRect((376,204), 1920x1080) = (376,204)

RG::mouseMoveEvent newSelection selection=377x205

RG::limitPointToRect((382,209), 1920x1080) = (382,209)

RG::mouseMoveEvent newSelection selection=383x210

RG::limitPointToRect((387,211), 1920x1080) = (387,211)

RG::mouseMoveEvent newSelection selection=388x212

RG::limitPointToRect((388,213), 1920x1080) = (388,213)

RG::mouseMoveEvent newSelection selection=389x214

RG::limitPointToRect((393,216), 1920x1080) = (393,216)

RG::mouseMoveEvent newSelection selection=394x217

RG::limitPointToRect((398,219), 1920x1080) = (398,219)

RG::mouseMoveEvent newSelection selection=399x220

RG::limitPointToRect((404,223), 1920x1080) = (404,223)

RG::mouseMoveEvent newSelection selection=405x224

RG::limitPointToRect((409,228), 1920x1080) = (409,228)

RG::mouseMoveEvent newSelection selection=410x229

RG::limitPointToRect((415,233), 1920x1080) = (415,233)

RG::mouseMoveEvent newSelection selection=416x234

RG::limitPointToRect((418,235), 1920x1080) = (418,235)

RG::mouseMoveEvent newSelection selection=419x236

RG::limitPointToRect((421,236), 1920x1080) = (421,236)

RG::mouseMoveEvent newSelection selection=422x237

RG::limitPointToRect((427,241), 1920x1080) = (427,241)

RG::mouseMoveEvent newSelection selection=428x242

RG::limitPointToRect((431,243), 1920x1080) = (431,243)

RG::mouseMoveEvent newSelection selection=432x244

RG::limitPo...

Revision history for this message
gl.bars (gl-bars) wrote :

So you were able to select area bigger than 960x432 this time, right? It seems screen size is actually determined correctly.

Are you using Xorg or Wayland? (can be checked using this terminal command: echo $XDG_SESSION_TYPE)

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

Yes, there was no problem selecting the whole screen with the
regiongrabber_dbg, however, the problem persists with Basket itself.

I'm using X11 (that's what in the terminal when I write the command echo
$XDG_SESSION_TYPE).

Em 04/12/2017 13:28, gl.bars escreveu:
> echo $XDG_SESSION_TYPE

Revision history for this message
gl.bars (gl-bars) wrote :

Hmm, interesting.
Yes, it makes sence that you have X11. Actually Wayland is not supported at the moment - it would grab a black screen.

I've prepared a KDE5 test build of Basket, could you try it too?

0. Please backup basket data before starting - copy or archive ~/.kde/share/apps/basket folder

1. You'll need to install KDE and Qt dependencies, remove Basket 2.10 and install Basket 2.49 from attached deb:

sudo apt install libkf5activities5 libkf5crash5 libkf5dbusaddons5 libkf5service5 libkf5kiocore5 libkf5completion5 libkf5jobwidgets5 libkf5kiowidgets5 libkf5kiontlm5 libkf5notifications5 libkf5solid5 libkf5sonnetui5 libkf5textwidgets5 libkf5wallet5 libkf5globalaccel5 libkf5attica5 libkf5xmlgui5 libkf5bookmarks5 libkf5kiofilewidgets5 libkf5kiogui5 libkf5package5 libkf5declarative5 libkf5calendarevents5 libkf5newstuff5 libkf5notifyconfig5 libkf5plasma5 libkf5quickaddons5 libkf5plasmaquick5 libkf5plotting5 libkf5filemetadata3 libkf5kcmutils5 libkf5parts5 libkf5kdelibs4support5 kactivities-bin phonon4qt5

sudo apt remove basket basket-data

sudo dpkg -i ./basket_2.49~alpha+git20170813.26e8fe5-1_amd64.deb

2. I suggest NOT to start Basket 2.49 from your current account (because KDE5 migration module will move your basket data folder), but instead create a second account for now. You could use this guide: https://help.ubuntu.com/stable/ubuntu-help/user-add.html. Then you can start basket like this (substitute the new user name for "secondusername"):

sudo -u secondusername basket

It might fail with libraries error if I missed some dependency in the first step. Then you'll need to find a package providing that library, or just post the error text here and I'll help.

3. To return back to version 2.10, do

apt remove basket
apt install basket

Please let me know if anything is not clear in the steps above.

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

It was successfully installed, but doesn't start.

Em 08/12/2017 18:07, gl.bars escreveu:
> Hmm, interesting.
> Yes, it makes sence that you have X11. Actually Wayland is not supported at the moment - it would grab a black screen.
>
>
> I've prepared a KDE5 test build of Basket, could you try it too?
>
> 0. Please backup basket data before starting - copy or archive
> ~/.kde/share/apps/basket folder
>
> 1. You'll need to install KDE and Qt dependencies, remove Basket 2.10
> and install Basket 2.49 from attached deb:
>
> sudo apt install libkf5activities5 libkf5crash5 libkf5dbusaddons5
> libkf5service5 libkf5kiocore5 libkf5completion5 libkf5jobwidgets5
> libkf5kiowidgets5 libkf5kiontlm5 libkf5notifications5 libkf5solid5
> libkf5sonnetui5 libkf5textwidgets5 libkf5wallet5 libkf5globalaccel5
> libkf5attica5 libkf5xmlgui5 libkf5bookmarks5 libkf5kiofilewidgets5
> libkf5kiogui5 libkf5package5 libkf5declarative5 libkf5calendarevents5
> libkf5newstuff5 libkf5notifyconfig5 libkf5plasma5 libkf5quickaddons5
> libkf5plasmaquick5 libkf5plotting5 libkf5filemetadata3 libkf5kcmutils5
> libkf5parts5 libkf5kdelibs4support5 kactivities-bin phonon4qt5
>
> sudo apt remove basket basket-data
>
> sudo dpkg -i ./basket_2.49~alpha+git20170813.26e8fe5-1_amd64.deb
>
>
> 2. I suggest NOT to start Basket 2.49 from your current account (because KDE5 migration module will move your basket data folder), but instead create a second account for now. You could use this guide: https://help.ubuntu.com/stable/ubuntu-help/user-add.html. Then you can start basket like this (substitute the new user name for "secondusername"):
>
> sudo -u secondusername basket
>
> It might fail with libraries error if I missed some dependency in the
> first step. Then you'll need to find a package providing that library,
> or just post the error text here and I'll help.
>
>
> 3. To return back to version 2.10, do
>
> apt remove basket
> apt install basket
>
>
> Please let me know if anything is not clear in the steps above.
>
> ** Attachment added: "kde5 build from git"
> https://bugs.launchpad.net/basket/+bug/1733123/+attachment/5020357/+files/basket_2.49~alpha+git20170813.26e8fe5-1_amd64.deb
>

Revision history for this message
gl.bars (gl-bars) wrote :

If you try to start basket from terminal, does it print any errors?

> sudo -u secondusername basket

(or you could log in as the second user and run just 'basket')

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

This is the error that shows in the terminal:

basket: error while loading shared libraries: libKF5FileMetaData.so.3:
cannot open shared object file: No such file or directory

Em 09/12/2017 10:10, gl.bars escreveu:
> If you try to start basket from terminal, does it print any errors?
>
>> sudo -u secondusername basket
> (or you could log in as the second user and run just 'basket')
>

Revision history for this message
gl.bars (gl-bars) wrote :

Did you install that package? Try

sudo apt install libkf5filemetadata3

(Can be found out via https://packages.ubuntu.com/search?searchon=contents&keywords=libKF5FileMetaData.so.3&mode=exactfilename&suite=artful&arch=any)

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

I got it to start (there were still three packages missing).

Screen crop works fullscreen in this version, but with a very strange
problem: the part of the screen that becomes dark is still only a
top-left fraction of my monitor (the size of the dark rectangle is now
640x480px). But, if I press the cursor from outside this rectangle, and
proceed with the selection as if it was functioning properly, I get to
crop this selected area. But if I begin to select from the dark
rectangle (it is always in the same coordinates -- the top-left corner
of my monitor -- so I will always know where it will be before I select)
I cannot go beyond it.

The only occasion when I can crop my screen properly (i.e. with a full
darkened monitor) is when, after I select the screen crop option,
there's a split second where I can spread all my open windows by
touching one of the corners of my screen before it activates. When it
activates by the time the windows are spread, all the monitor screen
gets dark and I can select an area freely, as it should be.

Em 09/12/2017 22:57, gl.bars escreveu:
> install libkf5filemetadata3

Revision history for this message
gl.bars (gl-bars) wrote :

Thanks for the test, this is quite strange indeed.
I'll probably make another test build with code from regiongrabber_dbg.

For now you can return to the standard version if needed:
sudo apt remove basket
sudo apt install basket

Revision history for this message
gl.bars (gl-bars) wrote :

Please try this new build

sudo apt remove basket
sudo apt remove basket-data
sudo dpkg -i basket_2.11~beta-2_amd64.deb

basket --debug

This way second debug window will appear. If something is wrong with screenshot grabbing, copy lines starting from "RG::" in the debug window and paste here.

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

It worked.

Thank you for the patience.

VK

Em 15/12/2017 17:32, gl.bars escreveu:
> Please try this new build
>
> sudo apt remove basket
> sudo apt remove basket-data
> sudo dpkg -i basket_2.11~beta-2_amd64.deb
>
> basket --debug
>
> This way second debug window will appear. If something is wrong with
> screenshot grabbing, copy lines starting from "RG::" in the debug window
> and paste here.
>
> ** Attachment added: "kde4 build: v2.11 + RG debug"
> https://bugs.launchpad.net/basket/+bug/1733123/+attachment/5023155/+files/basket_2.11~beta-2_amd64.deb
>

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

The problem returned. I closed and opened it again, and then it happened.

Em 15/12/2017 17:32, gl.bars escreveu:
> Please try this new build
>
> sudo apt remove basket
> sudo apt remove basket-data
> sudo dpkg -i basket_2.11~beta-2_amd64.deb
>
> basket --debug
>
> This way second debug window will appear. If something is wrong with
> screenshot grabbing, copy lines starting from "RG::" in the debug window
> and paste here.
>
> ** Attachment added: "kde4 build: v2.11 + RG debug"
> https://bugs.launchpad.net/basket/+bug/1733123/+attachment/5023155/+files/basket_2.11~beta-2_amd64.deb
>

Revision history for this message
gl.bars (gl-bars) wrote :

How often does it work correctly and incorrectly? Can you post log from debug window for incorrect case?

Also if you retry regiongrabber_dbg, does it always work normally?

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :

It worked only when I opened it for the first time after I installed it. Then, when I close it and open it again, it goes back to the old stage.

The very first time I open it, it shows in the terminal the error:

Gtk-Message: Failed to load module "overlay-scrollbar"

QDBusConnection: name 'org.kde.kglobalaccel' had owner '' but we thought it was ':1.134'

vk@vk:~$ QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

Gtk-Message: Failed to load module "overlay-scrollbar"

X Error: BadWindow (invalid Window parameter) 3

Major opcode: 20 (X_GetProperty)

Resource id: 0x3800073

X Error: BadWindow (invalid Window parameter) 3

Major opcode: 20 (X_GetProperty)

Resource id: 0x3800073

libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

X Error: BadWindow (invalid Window parameter) 3

Major opcode: 20 (X_GetProperty)

Resource id: 0x3800073

X Error: BadWindow (invalid Window parameter) 3

Major opcode: 20 (X_GetProperty)

Resource id: 0x3800073

X Error: BadWindow (invalid Window parameter) 3

Major opcode: 18 (X_ChangeProperty)

Resource id: 0x3800073

When I open for the second time and beyond, no error shows.

Em 18/12/2017 19:49, gl.bars escreveu:

How often does it work correctly and incorrectly? Can you post log from
debug window for incorrect case?

Also if you retry regiongrabber_dbg, does it always work normally?

Revision history for this message
gl.bars (gl-bars) wrote :

How did you close Basket? If you used Close button, try menu Basket -> Quit instead (or press Ctrl+Q). Then run 'basket --debug' from the terminal, so that debug window is displayed. I'd like to see debug window log too, so please copy it here (grab an image from Basket and copy lines starting with "RG" from that window).

Revision history for this message
Virgens Kamikazes (virgenskamikazes) wrote :
Download full text (18.8 KiB)

This is when I open Basket 2.11 beta:

Baskets are loaded from /home/vk/.kde/share/apps/basket/baskets/

Basket[basket8-180603/]: Loading...

Basket Tree: Saving...

Loading HtmlContent From basket8-180603/note2-181841.html

When I choose 'crop screen' (when I go from a region outside the dark rectangle):

RG::RegionGrabber initial size 640x480

RG::init desktop()->size=1920x1080

RG::init pixmap size 1920x1080, resize to 1920x1080

RG::limitPointToRect((1918,1078), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1916,1078), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1907,1072), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1897,1066), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1886,1060), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1871,1052), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1856,1044), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1805,1016), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1773,994), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1711,953), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1688,938), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1668,926), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1621,899), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1599,883), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1543,849), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1513,831), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1459,795), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1431,779), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1385,749), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1365,737), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1329,713), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1313,701), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1284,684), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1273,678), 960x432) = (959,431)

RG::mouseMoveEvent newSelection selection=961x649

RG::limitPointToRect((1259,669), 960x432) = (959,431)

RG::mouseMoveEvent newSelection sele...

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.