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

BEWARE! Can't paste PHOTOS into KeyNote NF (after June 14, 2017 Win10 update) #568

Open
ch123123 opened this Issue Jun 14, 2017 · 21 comments

Comments

Projects
None yet
2 participants
@ch123123

ch123123 commented Jun 14, 2017

Can't paste PHOTOS into KeyNote NF v1.7.9 Beta 7. This occurred after June 14, 2017 Win10 update. Tried several different things, including different image extensions (jpeg, bmp, tiff, etc). Hence, I believe its the Win10 update.

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jun 15, 2017

Owner

I will take a look. I have no applied that update yet in Win10

Owner

dpradov commented Jun 15, 2017

I will take a look. I have no applied that update yet in Win10

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jun 15, 2017

Owner

Several days ago I received an email from a KN user in Germany:

[...] I recently made the update to 1703 at work and since then I have the following problem:

When doing a screenshot and pasting the image into keynote, or when marking a picture already in keynote and copy/paste that into another node, say in the middle of text, save the file, close it, open it again, then not only is the picture not there, but all text and other content after where the image is supposed to be is gone. I guess that the clipboard has some new control characters in the stream, that break keynote. I could easily reproduce it. I had the new beta 8 on. Went back to beta 6, to see if it’s still there. It is.

Then I went to one colleague who is also using Keynote since a few days back (my recommendation) and at his place it works just fine – his PC is still on 1607.

Came home today from work and tried it here. Also still everything works, also still 1607 on here.

Did you get any other notifications about this? Can you find what’s in the stream from the clipboard?

Ceirtanly, there must be something with that update that is breaking that behaviour in KN.

Owner

dpradov commented Jun 15, 2017

Several days ago I received an email from a KN user in Germany:

[...] I recently made the update to 1703 at work and since then I have the following problem:

When doing a screenshot and pasting the image into keynote, or when marking a picture already in keynote and copy/paste that into another node, say in the middle of text, save the file, close it, open it again, then not only is the picture not there, but all text and other content after where the image is supposed to be is gone. I guess that the clipboard has some new control characters in the stream, that break keynote. I could easily reproduce it. I had the new beta 8 on. Went back to beta 6, to see if it’s still there. It is.

Then I went to one colleague who is also using Keynote since a few days back (my recommendation) and at his place it works just fine – his PC is still on 1607.

Came home today from work and tried it here. Also still everything works, also still 1607 on here.

Did you get any other notifications about this? Can you find what’s in the stream from the clipboard?

Ceirtanly, there must be something with that update that is breaking that behaviour in KN.

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Jun 16, 2017

Thanks dpradov!

ch123123 commented Jun 16, 2017

Thanks dpradov!

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Jun 28, 2017

The KeyNote NF Help > Search > picture > "Hints and Tips" states, "You can insert .BMP and .GIF images into the note text..." This can still be done. You can drag the .BMP or .GIF image into the text, and it will display and remain there after you save and close the KeyNote file.

BEFORE the Windows 10 update, you could do likewise with other graphics formats, like JPG--but not any longer. I hope someone can fix this issue soon, so it isn't necessary to convert JPG, TIFF, PNG, etc to .BMP or .GIF formats. Thanks in advance!

ch123123 commented Jun 28, 2017

The KeyNote NF Help > Search > picture > "Hints and Tips" states, "You can insert .BMP and .GIF images into the note text..." This can still be done. You can drag the .BMP or .GIF image into the text, and it will display and remain there after you save and close the KeyNote file.

BEFORE the Windows 10 update, you could do likewise with other graphics formats, like JPG--but not any longer. I hope someone can fix this issue soon, so it isn't necessary to convert JPG, TIFF, PNG, etc to .BMP or .GIF formats. Thanks in advance!

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jul 5, 2017

Owner

For now it seems that it is possible to use the RichEdit DLL included in Windows XP SP3. I have tried to paste and resize images and It works ok.
See #530 Allow the use of newer versions of RichEdit

It corresponds to:
Rich Text Edit Control, v4.1
Product version: 4.1
XP SP3: File version: 5.41.15.1515
(539.136 bytes)

It is only necessary to fill the path to that DLL (msftedit.dll) in the following option, in Keynote.ini:
[KeyOptions]
RichEditLibraryPath=\msftedit.dll

(I have tried also to use the DLLs of W10 prior to version 1703, W8 or W7 but they cannot be loaded. An error 193, ERROR_BAD_EXE_FORMAT, is received)

Owner

dpradov commented Jul 5, 2017

For now it seems that it is possible to use the RichEdit DLL included in Windows XP SP3. I have tried to paste and resize images and It works ok.
See #530 Allow the use of newer versions of RichEdit

It corresponds to:
Rich Text Edit Control, v4.1
Product version: 4.1
XP SP3: File version: 5.41.15.1515
(539.136 bytes)

It is only necessary to fill the path to that DLL (msftedit.dll) in the following option, in Keynote.ini:
[KeyOptions]
RichEditLibraryPath=\msftedit.dll

(I have tried also to use the DLLs of W10 prior to version 1703, W8 or W7 but they cannot be loaded. An error 193, ERROR_BAD_EXE_FORMAT, is received)

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jul 5, 2017

Owner

Another observation: you can use Edit -> Paste Other -> Paste Special... with the DLL included in W10 v1703

Owner

dpradov commented Jul 5, 2017

Another observation: you can use Edit -> Paste Other -> Paste Special... with the DLL included in W10 v1703

@dpradov dpradov closed this in c71e877 Jul 7, 2017

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jul 7, 2017

Owner

From version 10.0.15063.0 of MSFTEDIT.DLL (Windows 10 version 1703) it doesn't work WM_PASTE
or IRichEditOle::ImportDataObject(lpdataobj, cf, hMetaPict) with cf=0 when trying to import an image from the clipboard into
a rich edit control. It seems to be necessary to explicitily indicate the format CF_BITMAP

(IRichEditOle::ImportDataObject. A value of zero in clipboard format should use the best available format)

Owner

dpradov commented Jul 7, 2017

From version 10.0.15063.0 of MSFTEDIT.DLL (Windows 10 version 1703) it doesn't work WM_PASTE
or IRichEditOle::ImportDataObject(lpdataobj, cf, hMetaPict) with cf=0 when trying to import an image from the clipboard into
a rich edit control. It seems to be necessary to explicitily indicate the format CF_BITMAP

(IRichEditOle::ImportDataObject. A value of zero in clipboard format should use the best available format)

@dpradov dpradov added this to the 1.7.9 milestone Jul 7, 2017

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jul 7, 2017

Owner

I have attached a new executable (1.7.9 Beta 9 Test.2) with the patch. Could you test it and tell me if it is ok?
It also includes the new functionality described in #11 (New button: Copy Format)

keynote_1.7.9.Beta9_Test.2.zip

Regards
Daniel

Owner

dpradov commented Jul 7, 2017

I have attached a new executable (1.7.9 Beta 9 Test.2) with the patch. Could you test it and tell me if it is ok?
It also includes the new functionality described in #11 (New button: Copy Format)

keynote_1.7.9.Beta9_Test.2.zip

Regards
Daniel

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Jul 11, 2017

ch123123 commented Jul 11, 2017

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Jul 14, 2017

ch123123 commented Jul 14, 2017

@ch123123 ch123123 changed the title from Can't paste PHOTOS into KeyNote NF (after June 14, 2017 Win10 update) to BEWARE! Can't paste PHOTOS into KeyNote NF (after June 14, 2017 Win10 update) Jul 14, 2017

@dpradov dpradov reopened this Jul 14, 2017

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Jul 14, 2017

ch123123 commented Jul 14, 2017

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jul 14, 2017

Owner

The behaviour you are describing is very strange. In fact, it sound as if you were using the old KN version again and were pasting a new image with that version. Because that was the wrong behavior and problem to resolve: the images pasted dissapeared (just selecting another node) and also all the text beneath it .

The node that contained that image and the text you losed, was it been modified when you realized the problem? Did you insert or modify something related to hyperlinks just before the image?

PS: Old photos pasted in prior to the Windows 10 recent update are completely unaffected. Just new ones after the update! That includes the GIF and PIC images.

All the new images have suddendly dissapeared, not only the one in that node??

If it has affected just that node, I think that perhaps it could be another incompatiblity arised with the new version of RichEdit. Somehow it reminds me the problem I reported (and corrected) in issue #564 (Modified nodes could be truncated (content partially losted) on saving (with RichText 4.1, in XP and W7) ). It was a problem caused by the replacement of hyperlinks in certain circumstances, and affected only the 4.1 version of RichEdit.

the JPG photo was gone, and so was all the text beneath it (a good 10 hours or so worth)

I hope you had the backups enabled. Personally, I always have many backups (in KN and in the majority of applications I use, specially if I dedicate many time to create or elaborate something).
In KN I have enabled the option to keep backups at regular intervals (#544). That way, in the worst case you could lose (if not using cyclic backups or other manual or custom backup) the changes made from the beginning of the day:

With the first save on a new day, a backup of the file before saving will be created (if it is'nt available as a weekly or monthly backup) as a distinguished file.

Owner

dpradov commented Jul 14, 2017

The behaviour you are describing is very strange. In fact, it sound as if you were using the old KN version again and were pasting a new image with that version. Because that was the wrong behavior and problem to resolve: the images pasted dissapeared (just selecting another node) and also all the text beneath it .

The node that contained that image and the text you losed, was it been modified when you realized the problem? Did you insert or modify something related to hyperlinks just before the image?

PS: Old photos pasted in prior to the Windows 10 recent update are completely unaffected. Just new ones after the update! That includes the GIF and PIC images.

All the new images have suddendly dissapeared, not only the one in that node??

If it has affected just that node, I think that perhaps it could be another incompatiblity arised with the new version of RichEdit. Somehow it reminds me the problem I reported (and corrected) in issue #564 (Modified nodes could be truncated (content partially losted) on saving (with RichText 4.1, in XP and W7) ). It was a problem caused by the replacement of hyperlinks in certain circumstances, and affected only the 4.1 version of RichEdit.

the JPG photo was gone, and so was all the text beneath it (a good 10 hours or so worth)

I hope you had the backups enabled. Personally, I always have many backups (in KN and in the majority of applications I use, specially if I dedicate many time to create or elaborate something).
In KN I have enabled the option to keep backups at regular intervals (#544). That way, in the worst case you could lose (if not using cyclic backups or other manual or custom backup) the changes made from the beginning of the day:

With the first save on a new day, a backup of the file before saving will be created (if it is'nt available as a weekly or monthly backup) as a distinguished file.

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jul 14, 2017

Owner

Before my last coment I have done severla tests again and obtained the same behaviour before and after the fixes of the new version of KN. Before the patch the images pasted and text beneath it dissapear when saving (or simply after selecting another node).
But the images I pasted with the new version, from W10 1703 were still there. I have done new changes and pasted new photos and all keeps ok.

Sorry for the inconvenience, I hope we can discover what happened to you and so I can fix it.

Owner

dpradov commented Jul 14, 2017

Before my last coment I have done severla tests again and obtained the same behaviour before and after the fixes of the new version of KN. Before the patch the images pasted and text beneath it dissapear when saving (or simply after selecting another node).
But the images I pasted with the new version, from W10 1703 were still there. I have done new changes and pasted new photos and all keeps ok.

Sorry for the inconvenience, I hope we can discover what happened to you and so I can fix it.

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jul 14, 2017

Owner

I note that your OS is
Windows 10: Version 1703, Build 15063.483

I have verified the new KN version in a virtual machine with a different build:
Windows 10: Version 1703, Build 15063.0

I'll try to update it to be sure that it is not a problem with the new compilation.
Have you updated your OS recently just before this new problem? Did you remember the compilation of W10 that you had when this new KN version seemed to work ok?

The version or RichEdit I have in that compilation corresponds to:
C:\Windows\System32\MSFTEDIT.DLL
Rich Text Edit Control, v8.5
Product/file version: 10.0.15063.0
Modification Date : 18/03/2017 21:58

Do you have a different version of that DLL?

Owner

dpradov commented Jul 14, 2017

I note that your OS is
Windows 10: Version 1703, Build 15063.483

I have verified the new KN version in a virtual machine with a different build:
Windows 10: Version 1703, Build 15063.0

I'll try to update it to be sure that it is not a problem with the new compilation.
Have you updated your OS recently just before this new problem? Did you remember the compilation of W10 that you had when this new KN version seemed to work ok?

The version or RichEdit I have in that compilation corresponds to:
C:\Windows\System32\MSFTEDIT.DLL
Rich Text Edit Control, v8.5
Product/file version: 10.0.15063.0
Modification Date : 18/03/2017 21:58

Do you have a different version of that DLL?

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Jul 17, 2017

ch123123 commented Jul 17, 2017

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Jul 17, 2017

ch123123 commented Jul 17, 2017

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Jul 18, 2017

Owner

«Perhaps you've already done this: Using a code editor to examine the code of a KeyNote file node»
Of course I do it. Take into account that the content of a node is RTF (Rich Text Format), code that is not directly created by KN, but by the RichEditor, implemented in the MSFTEDIT.DLL.
What KN does is to interact with that component. The problem is that the behavior of the component can be slightly different with newer versions, and that explains, for example, that KN could simply send a paste command to paste an image and now it doesn't work and it is necessary to make it in a different way.

Owner

dpradov commented Jul 18, 2017

«Perhaps you've already done this: Using a code editor to examine the code of a KeyNote file node»
Of course I do it. Take into account that the content of a node is RTF (Rich Text Format), code that is not directly created by KN, but by the RichEditor, implemented in the MSFTEDIT.DLL.
What KN does is to interact with that component. The problem is that the behavior of the component can be slightly different with newer versions, and that explains, for example, that KN could simply send a paste command to paste an image and now it doesn't work and it is necessary to make it in a different way.

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Jul 19, 2017

ch123123 commented Jul 19, 2017

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Aug 6, 2017

Owner

Hi ch123123
??, I did not feel offended in any way

Yesterday, after a vacation, my personal PC updated to version 1703, build 15063.502.
I did new tests and Beta 9 Test.2 still worked ok for me. Images are pasted without no problem and they are not lost when saving. Images that were pasted several days ago continued there and ok.

Could you try that version again and tell me if you still have problems pasting the images? You could do your tests with a new file, not with your personal knt file, so that if a problem arises you don't loose anything.
You could modify and save many times, and also close and reopen KN from time to time too, to mimic your last behaviour. Keep several backups (use "Backup options" / "Max backup level"). If you can reproduce the problem again and mantain the previous version and know what did you do to force the problem, it would be great.

Thanks

Owner

dpradov commented Aug 6, 2017

Hi ch123123
??, I did not feel offended in any way

Yesterday, after a vacation, my personal PC updated to version 1703, build 15063.502.
I did new tests and Beta 9 Test.2 still worked ok for me. Images are pasted without no problem and they are not lost when saving. Images that were pasted several days ago continued there and ok.

Could you try that version again and tell me if you still have problems pasting the images? You could do your tests with a new file, not with your personal knt file, so that if a problem arises you don't loose anything.
You could modify and save many times, and also close and reopen KN from time to time too, to mimic your last behaviour. Keep several backups (use "Backup options" / "Max backup level"). If you can reproduce the problem again and mantain the previous version and know what did you do to force the problem, it would be great.

Thanks

@dpradov

This comment has been minimized.

Show comment
Hide comment
@dpradov

dpradov Aug 18, 2017

Owner

Hello, finally I have reproduced the error with a file of a close relative, who suffered the same problem just after updating to W10 1703, just a few days ago.
I have not encountered the cause of the problem, yet. Although it seems to be related to certain kind of images, and the way the RichEdit control included in W10 1703 is managing them.

What I have discovered is that (at least in the situation I have reproduced) the RichEdit control is returning a RTF malformed, where the code of the image ( "{\pict .... }") is replaced wrongly with just the "}" character. If you continue editing the node/note you can see that all seems to be ok, because the control behaves ok and all the text and images remains there. But the first time you save the file after the problem have arised, KNT will save the incorrect RTF inside the node/note. NOTE: If you have backups, it is possible that if you open one of that files with an ASCII editor like Notepad, you'll see all the text beneath the image. Just look for a word contained in that node to locate it in the file.
That text with that incorrect RTF is invisible when you open that file with KNT because when the program passes the RTF to the control to show it, the wrong "}" will stop the parsing of that RTF. The problem is that if you modify that node/note and save it again, then the new file in disk will not contain that text. The RTF definitely will not contain the text after the "}". Thats why it is important to maintain several backups and, besides, to maintain active the "Backup at regular intervals" option.

As I said before in this issue, this problem is very similar to the [very annoying] problem that I reported and corrected in issue #564 : Modified nodes could be truncated (content partially losted) on saving (with RichText 4.1, in XP and W7) ).

Now that I have a file which one I can reproduce (not easily..) the problem, I hope to resolve the problem soon.

Owner

dpradov commented Aug 18, 2017

Hello, finally I have reproduced the error with a file of a close relative, who suffered the same problem just after updating to W10 1703, just a few days ago.
I have not encountered the cause of the problem, yet. Although it seems to be related to certain kind of images, and the way the RichEdit control included in W10 1703 is managing them.

What I have discovered is that (at least in the situation I have reproduced) the RichEdit control is returning a RTF malformed, where the code of the image ( "{\pict .... }") is replaced wrongly with just the "}" character. If you continue editing the node/note you can see that all seems to be ok, because the control behaves ok and all the text and images remains there. But the first time you save the file after the problem have arised, KNT will save the incorrect RTF inside the node/note. NOTE: If you have backups, it is possible that if you open one of that files with an ASCII editor like Notepad, you'll see all the text beneath the image. Just look for a word contained in that node to locate it in the file.
That text with that incorrect RTF is invisible when you open that file with KNT because when the program passes the RTF to the control to show it, the wrong "}" will stop the parsing of that RTF. The problem is that if you modify that node/note and save it again, then the new file in disk will not contain that text. The RTF definitely will not contain the text after the "}". Thats why it is important to maintain several backups and, besides, to maintain active the "Backup at regular intervals" option.

As I said before in this issue, this problem is very similar to the [very annoying] problem that I reported and corrected in issue #564 : Modified nodes could be truncated (content partially losted) on saving (with RichText 4.1, in XP and W7) ).

Now that I have a file which one I can reproduce (not easily..) the problem, I hope to resolve the problem soon.

@ch123123

This comment has been minimized.

Show comment
Hide comment
@ch123123

ch123123 Sep 22, 2017

ch123123 commented Sep 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment