Bug 504812 - Something wrong with a parent window
Summary: Something wrong with a parent window
Status: RESOLVED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Backend (other bugs)
Version First Reported In: GIT master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-26 12:58 UTC by willem
Modified: 2025-06-19 17:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description willem 2025-05-26 12:58:31 UTC
SUMMARY
Something wrong with a parent window

STEPS TO REPRODUCE
1. start kphotoalbum from cli
2. see output in terminal
3. 

OBSERVED RESULT
Message: 
"qt.qpa.wayland: Creating a popup with a parent, QWidgetWindow(0x5af9b0a977a0, name="AnnotationDialog::DialogClassWindow") which does not match the current topmost grabbing popup, QWidgetWindow(0x5af9b0cdd760, name="QMenuClassWindow") With some shell surface protocols, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly. Please fix the transient parent of the popup.¨

EXPECTED RESULT
Fixed transient parent

SOFTWARE/OS VERSIONS
MESA-INTEL: warning: Haswell Vulkan support is incomplete
Operating System: EndeavourOS 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.12.30-1-lts (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-4570R CPU @ 2.70GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Intel® Iris® Pro Graphics 5200


ADDITIONAL INFORMATION
Built this version yesteray
Comment 1 Johannes Zarl-Zierl 2025-05-26 19:40:53 UTC
Hi,

Is this a KDE plasma session or a different environment?

Looking at the message, it seems like there are additional steps to recreating the situation? It seems like you opened the annotation dialog and maybe did something afterwards to trigger this message. Maybe if you keep the terminal window visible on the side you can pinpoint the exact action that led to this message...

Cheers,
  Johannes
Comment 2 willem 2025-05-27 06:41:09 UTC
(In reply to Johannes Zarl-Zierl from comment #1)
> Hi,
> 
> Is this a KDE plasma session or a different environment?
> 
> Looking at the message, it seems like there are additional steps to
> recreating the situation? It seems like you opened the annotation dialog and
> maybe did something afterwards to trigger this message. Maybe if you keep
> the terminal window visible on the side you can pinpoint the exact action
> that led to this message...
> 
> Cheers,
>   Johannes

Hello Johannes,

Thanks for helping me!
I'm new to kphotoalbum and I would really like to use it.

It's KDE Plasma.
I was annotating photo's at that time, choosing to annotate several photo's at once. I had also used/opened the maps-page.

Did the same again just now to see if I could reproduce the message.
So far that message did not appear again.

Recurring messages in cli are:

kphotoalbum.AnnotationDialog: No annotation dialog layout data found. Checking for a KPA 5 layout.dat file ...
kphotoalbum.AnnotationDialog: Could not find a KPA 5 layout.dat file

Ignoring to load the following file since it doesn't look like a valid Marble plugin: "/usr/lib/marble/plugins/AprsPlugin.so" 
Reason: "Kan bibliotheek /usr/lib/marble/plugins/AprsPlugin.so niet laden: libQt6SerialPort.so.6: kan gedeeld objectbestand niet openen: Bestand of map bestaat niet"

Opening the maps page, gives a lot of "marble_lib: Invalid parent size" messages.
And also 
dataChanged() called with an invalid index range:
    topleft: QModelIndex(-1,-1,0x0,QObject(0x0))
    bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0))

So far I've not been able to reproduce the message ""qt.qpa.wayland: Creating a popup with a parent,..."

Is any of this useful?
Comment 3 Tobias Leupold 2025-05-27 09:14:50 UTC
Those are simply because you didn't save the annotation dialog layout yet, and we check if there's a legacy layout file:

> kphotoalbum.AnnotationDialog: No annotation dialog layout data found. Checking for a KPA 5 layout.dat file ...
> kphotoalbum.AnnotationDialog: Could not find a KPA 5 layout.dat file

So nothing to worry about here, this is intended behavior. This here:

> Ignoring to load the following file since it doesn't look like a valid Marble plugin: "/usr/lib/marble/plugins/AprsPlugin.so" 
> Reason: "Kan bibliotheek /usr/lib/marble/plugins/AprsPlugin.so niet laden: libQt6SerialPort.so.6: kan gedeeld objectbestand niet openen: estand of map bestaat niet"

is some Marble stuff that appears when opening the map window and Marble is loading. So nothing to worry about either.

> Opening the maps page, gives a lot of "marble_lib: Invalid parent size" messages.
>
> dataChanged() called with an invalid index range:
>     topleft: QModelIndex(-1,-1,0x0,QObject(0x0))
>     bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0))

This may be worth investigating. The second one could originate from the model we use to display the images' positions on the map.

However, none of this should cause weird Wayland behavior imo …
Comment 4 willem 2025-05-27 12:02:18 UTC
Thank you for your quick replies! 

I must say "marble" is very verbose in cli. Not problem though.

Do you need more info on this message:

dataChanged() called with an invalid index range:
    topleft: QModelIndex(-1,-1,0x0,QObject(0x0))
    bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0))

to be able to investigate?

Do you want me to make a separate ticket for this message/error?
Comment 5 willem 2025-05-27 12:07:30 UTC
This message

dataChanged() called with an invalid index range:
    topleft: QModelIndex(-1,-1,0x0,QObject(0x0))
    bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0))

just happened again. I think it was when I double clicked on a thumbnail of a photo in the map. In stead of opening that photo I was thrown back to the home page.

I'll see of I can reproduce reliably.
Comment 6 willem 2025-05-27 12:18:58 UTC
To get this message:

dataChanged() called with an invalid index range:
    topleft: QModelIndex(-1,-1,0x0,QObject(0x0))
    bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0))

This seems to be the scenario:
- double click the Map Position (not sure what this should be in English)
- map opens, showing grey squares where several photo's are clustered
- double click on a grey square
- the homepage appeares
- double click on Map Position again
- only then the map is shown zoomed in on the area of the grey square
- then click on one of the grey squares in the zoomed area
- then the photo's are shown which are located in that square, and one of these photo's is then automatically opened in its own window.
- at times at that moment the message dataChanged() called with an invalid index range:     topleft: QModelIndex(-1,-1,0x0,QObject(0x0))
    bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0)) seems to appear.
-
Comment 7 willem 2025-05-27 14:35:08 UTC
I can now reliably get this message in cli:

qt.qpa.wayland: Creating a popup with a parent, QWidgetWindow(0x586d890b84d0, name="AnnotationDialog::DialogClassWindow") which does not match the current topmost grabbing popup, QWidgetWindow(0x586d88d0f1b0, name="QMenuClassWindow") With some shell surface protocols, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly. Please fix the transient parent of the popup.

It happens when I'm in the annotate window, click on options... then hover above the option "Configure window layout". As soon as the submenu opens, the message appears in cli.

I'll see if I can update my opening post to add his info
Comment 8 Johannes Zarl-Zierl 2025-05-27 21:08:07 UTC
(In reply to willem from comment #6)
> To get this message:
> 
> dataChanged() called with an invalid index range:
>     topleft: QModelIndex(-1,-1,0x0,QObject(0x0))
>     bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0))
> 
> This seems to be the scenario:
> - double click the Map Position (not sure what this should be in English)
> - map opens, showing grey squares where several photo's are clustered
> - double click on a grey square
> - the homepage appeares
> - double click on Map Position again
> - only then the map is shown zoomed in on the area of the grey square
> - then click on one of the grey squares in the zoomed area
> - then the photo's are shown which are located in that square, and one of
> these photo's is then automatically opened in its own window.
> - at times at that moment the message dataChanged() called with an invalid
> index range:     topleft: QModelIndex(-1,-1,0x0,QObject(0x0))
>     bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0)) seems to appear.
> -

I couldn't reproduce this log message, but that's a great step-by-step guide.
The part with "...and one of these photos is then automatically opened in its own window" is actually a bug IMO.
Comment 9 Johannes Zarl-Zierl 2025-05-27 21:09:14 UTC
(In reply to willem from comment #7)
> I can now reliably get this message in cli:
> 
> qt.qpa.wayland: Creating a popup with a parent,
> QWidgetWindow(0x586d890b84d0, name="AnnotationDialog::DialogClassWindow")
> which does not match the current topmost grabbing popup,
> QWidgetWindow(0x586d88d0f1b0, name="QMenuClassWindow") With some shell
> surface protocols, this is not allowed. The wayland QPA plugin is currently
> handling it by setting the parent to the topmost grabbing popup. Note,
> however, that this may cause positioning errors and popups closing
> unxpectedly. Please fix the transient parent of the popup.
> 
> It happens when I'm in the annotate window, click on options... then hover
> above the option "Configure window layout". As soon as the submenu opens,
> the message appears in cli.
> 
> I'll see if I can update my opening post to add his info

Cool, I can reproduce the warning message using these steps. Thank you!
Comment 10 Christoph Cullmann 2025-06-06 20:20:18 UTC
https://bugreports.qt.io/browse/QTBUG-137467 for the Creating a popup with a parent...
Comment 11 Tobias Leupold 2025-06-07 06:29:32 UTC
So this does indeed look like an upstream bug! Thanks for the info :-)
Comment 12 Christoph Cullmann 2025-06-19 15:17:22 UTC
This is now fixed in Qt and will release with 6.9.2 and 6.10.
Comment 13 willem 2025-06-19 17:33:29 UTC
(In reply to Christoph Cullmann from comment #12)
> This is now fixed in Qt and will release with 6.9.2 and 6.10.

Thanks for all your hard work!
Comment 14 Christoph Cullmann 2025-06-19 17:37:46 UTC
Most work was done by Vlad! Thanks a lot!