We're updating the issue view to help you get more done. 

Speechbubble can't be used after copy/paste

Description

When I insert a speeachbubble element and then select, copy it and paste it (i.e. to clone it), only the element is copied but the text is lost. Trying to edit the text results in a Nullpointer exception. See attached image.

Reproduce

0. printscreen - dialog choose to open w Editor
1. new speechbubble w text
2. press ESC key twice to unfocus
3. select this speechbuble with mouse
4. copy element w ctrl-c or right-click copy
5. paste to editor with ctrl-v or Edit>paste
6. empty speechbubble element is created
7. click inside new empty element to edit
8. Nullpointer exception

Affected versions

I started seeing this error since I downloaded 1.2.9.112 (stable/build 98/64) because I wanted to get the new canvas resizing which is a feature I like a lot. I went back and reinstalled 1.2.8.14 and the issue disappeared. Reproduced on two different PCs.

Logs

Here is the data logged in log file after trying to edit text inside the new speechbubble element:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Configuration dump: 2017-01-08 10:32:07,236 [Greenshot] INFO - [GreenshotPlugin.Controls.GreenshotForm] Form was closed with OK: storing field values. 2017-01-08 10:32:07,245 [Greenshot] INFO - [Greenshot.Helpers.CaptureHelper] Calling processor TitleFix 2017-01-08 10:32:08,414 [Greenshot] INFO - [GreenshotPlugin.Core.AbstractDestination] Export to Copy to clipboard success, closing menu 2017-01-08 10:37:28,502 [Greenshot] WARN - [GreenshotPlugin.Controls.GreenshotForm] Wrong language key 'about_translation' configured for control 'lblTranslation' 2017-01-08 10:40:50,653 [Greenshot] WARN - [Greenshot.Forms.CaptureForm] Found currentForm, Closing already opened CaptureForm 2017-01-08 10:48:06,166 [Greenshot] ERROR - [Greenshot.MainForm] Exception caught in the ThreadException handler. 2017-01-08 10:48:06,166 [Greenshot] ERROR - [Greenshot.MainForm] Software version: 1.2.9.112-RELEASE-9bc62ac42bd37d7ba2b19946b70d40a599332b75 (64 bit) .NET runtime version: 4.0.30319.42000+ Time: 2017-01-08 10:48:06 +01:00 OS: unknown (x64) 6.1 build 7601 revision 10000 GDI object count: 111 User object count: 96 Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. Stack: at Greenshot.Drawing.TextContainer.EnsureTextBoxContrast() at Greenshot.Drawing.TextContainer.ShowTextBox() at Greenshot.Drawing.DrawableContainerList.OnDoubleClick() at Greenshot.Drawing.Surface.SurfaceDoubleClick(Object sender, MouseEventArgs e) at System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Workaround

Current workaround is to not clone speechbubble elements and instead create new ones.

Environment

Reproduced on Windows 7 64 bit and Windows 10 on version 1.2.9 build 98 and 112
Install w all plugins but no additional languages, default install dir on windows using windows installer.

Status

Assignee

Unassigned

Reporter

Joel H

Affects versions

1.2.9

Components

Priority

Major

Sprint

None