Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exporting selection doesn't work #1199

Open
ashish111333 opened this issue Sep 1, 2024 · 11 comments · May be fixed by #1201
Open

exporting selection doesn't work #1199

ashish111333 opened this issue Sep 1, 2024 · 11 comments · May be fixed by #1201
Labels
bug Something isn't working

Comments

@ashish111333
Copy link

ashish111333 commented Sep 1, 2024

Describe the bug
made a sketch and tried exporting it to png,svg using selection tool but it fails and doesn't export ...no error is show in the UI like "exporting failed" it just doesn't export.

To Reproduce
Steps to reproduce the behavior:
simply select your sketch using all strokes and try to export it in png,svg it doesn'k work,fails without warning.

Expected behavior
I should be able to export the selected area of my sketch using selection tool to the formats png,svg.

Console Output
(rnote:2): Gtk-WARNING **: 00:31:33.440: No IM module matching GTK_IM_MODULE=cedilla found

(rnote:2): Gtk-CRITICAL **: 00:33:14.868: The layout manager of type GtkBoxLayout 0x5593ecd63090 does not create GtkLayoutChild instances

Screenshots
ksnip_20240902-003943

selected this whole sketch and tried to export it to png,svg it fails.

ksnip_20240902-003948

selected this whole sketch and tried to export it to png,svg it fails.

Desktop (please complete the following information):

  • OS: [suse tumbleweed]
  • App Version: [ Rnote v0.11.0]
  • Installation Source: [Flatpak]
  • Desktop Environment: [kde 6.1.4]
  • Display Server: [ X11]
  • Input Source: [ External Graphics Tablet,Huion]
@Doublonmousse
Copy link
Collaborator

Is it only that mode or all export modes (export document or export document page) that don't work with any file ?
Is this on all or some file types (for selections there is svg, png and jpeg export type) ?
Did you choose a file to save to (as of now you always have to select a file first in the export file option) ? (If you don't the export button is greyed out so it won't trigger the export)
Normally there should always be either a confirmation or error message on all export options.

Could that be a flatpak file permission issue ?

@ashish111333
Copy link
Author

Is it only that mode or all export modes (export document or export document page) that don't work with any file ? Is this on all or some file types (for selections there is svg, png and jpeg export type) ? Did you choose a file to save to (as of now you always have to select a file first in the export file option) ? (If you don't the export button is greyed out so it won't trigger the export) Normally there should always be either a confirmation or error message on all export options.

Could that be a flatpak file permission issue ?

yes I am able to export documents but not selection and no error message is show in UI it just doesn't do anything...when I eport document by selecting a file a message is shown "exported successfully" but while exporting selection it shows nothing no error message nothing.

@Doublonmousse
Copy link
Collaborator

So it says "exported successfully" but there is no file when you do "open in file manager" (though that currently opens the parent folder, not highlight the exported file) ?

@ashish111333
Copy link
Author

ashish111333 commented Sep 2, 2024

So it says "exported successfully" but there is no file when you do "open in file manager" (though that currently opens the parent folder, not highlight the exported file) ?

It says "exported successfully" Only when I export document or document pages and I am able to view it generates after "exported sucessfull" Message. But when I try to export a selection of my sketch by selecting the file no message is shown and no file is generated... Basically export selection doesn't work for my sketch.

Ran it with command line , when I try to export selection by selecting file a critical warning is given.

@Doublonmousse
Copy link
Collaborator

Doublonmousse commented Sep 2, 2024

After you clicked on the export selection could you see the dialog box, choose the file, click export and see the dialog window close ?

(this would mean the export.rs:854 line to close the dialog did run, and the issue is the block just after, that actually does the saving part)

Did you run it with flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote ?
Or flatpak --env=RUST_LOG=rnote=error --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote
I want to check if you get a message like this

Did not export selection (Error or dialog dismissed by user), Err: {e:?}

with the first command and

Exporting selection failed, Err: {e:?}

for the second one

(or any other errors that could be of interest)

@ashish111333
Copy link
Author

After you clicked on the export selection could you see the dialog box, choose the file, click export and see the dialog window close ?

(this would mean the export.rs:854 line to close the dialog did run, and the issue is the block just after, that actually does the saving part)

Did you run it with flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote ? Or flatpak --env=RUST_LOG=rnote=error --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote I want to check if you get a message like this

Did not export selection (Error or dialog dismissed by user), Err: {e:?}

with the first command and

Exporting selection failed, Err: {e:?}

for the second one

(or any other errors that could be of interest)

yeah I ran it in command line using "flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote"

and it shows this error:

(rnote:2): Gtk-CRITICAL **: 18:06:35.641: The layout manager of type GtkBoxLayout 0x55dbce144e10 does not create GtkLayoutChild instances

this error is shown when i try to export a selection ,exporting document or document pages works fine ...but when i export selection I select the file then click on export and nothing happens.

@ashish111333
Copy link
Author

@Doublonmousse

2024-09-02.18-14-21.mp4

see in this video I try to export selection but nothing happens no message is shown nothing the application doesnt crash ,but if i Run it from cli it shows this error :
(rnote:2): Gtk-CRITICAL **: 18:06:35.641: The layout manager of type GtkBoxLayout 0x55dbce144e10 does not create GtkLayoutChild instances

I am able to export selection in windows but not in linux.

Doublonmousse added a commit to Doublonmousse/rnote that referenced this issue Sep 2, 2024
There is a minute difference.
On the two other modes we have
`if let Some(file)`
then we call `span_future_local`

This was the reverse for the selection export.
Trying to see if this fixes flxzt#1199 (will only be a style PR otherwise)
@Doublonmousse Doublonmousse linked a pull request Sep 2, 2024 that will close this issue
@Doublonmousse
Copy link
Collaborator

So there was a (seemingly) minor difference between the export selection mode and the other two. I've opened a PR that makes this homogeneous between all three modes.

Not sure if this will fix the issue, but I'm at a loss if this doesn't (if this doesn't, this will be a style PR)

This might have to do with glib::clone failing for some reason and returning () instead of the function that would export the document.

I've added a few debug trace as well to have a little more detail on what's happening

@Doublonmousse Doublonmousse added the bug Something isn't working label Sep 2, 2024
@ashish111333
Copy link
Author

ashish111333 commented Sep 2, 2024

So there was a (seemingly) minor difference between the export selection mode and the other two. I've opened a PR that makes this homogeneous between all three modes.

Not sure if this will fix the issue, but I'm at a loss if this doesn't (if this doesn't, this will be a style PR)

This might have to do with glib::clone failing for some reason and returning () instead of the function that would export the document.

I've added a few debug trace as well to have a little more detail on what's happening

Thanks, It doesn't work with linux only, in windows I was able export selection.

@Doublonmousse
Copy link
Collaborator

Doublonmousse commented Sep 14, 2024

@ashish111333 Can you install the nightly flatpak following https://github.com/flxzt/rnote/blob/fbd056cde41a24c1d0b25dbeebc06893611661f5/BUILDING.md#nighties
But with the nightly found here :

https://github.com/Doublonmousse/rnote/actions/runs/10860824536

And check whether this version works or not ?

@ashish111333
Copy link
Author

ashish111333 commented Sep 18, 2024

@Doublonmousse hey thanks a lot. It's working now ,now when i export a selection I see a popup and I also get the file
(png,svg,jpeg). curious to know what was the problem ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants