Opened 13 years ago
Closed 13 years ago
#9683 closed defect (fixed)
Images are empty on Windows (linux works fine)
Reported by: | anonymous | Owned by: | Roberto Longobardi |
---|---|---|---|
Priority: | normal | Component: | ScreenshotPastePlugin |
Severity: | normal | Keywords: | |
Cc: | Ryan J Ollos | Trac Release: | 0.12 |
Description
I can paste images and see them in the little preview window. To send the screenshot is also no problem, but if i want to open it again, i see always an empty picture like the attached screenshot. I do not see any errors in my Trac logfile.
Attachments (5)
Change History (27)
Changed 13 years ago by
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Hi, please, could you describe your environment:
- Operating system
- Java version
- Apache or tracd?
Could you take a look inside your Trac environment directory: at the same level as "plugins" and "conf", etc. there should be a directory named "tmpscreenshots". What is there inside it? Also, there should be a directory "attachments" with subdirectories "Ticket" and "Wiki" (if you attached files to both types of objects). What is there inside them?
Let me know. Ciao, Roberto
comment:3 Changed 13 years ago by
Also, could you set debug on Trac, restart the server, reproduce the problem and attach the full trac.log ti this ticket?
comment:4 Changed 13 years ago by
Operating System: Windows XP Java Version: 1.6.0_29 Server: Windows Server 2003 with Apache
tmpscreenshots is there but it contains only the empty images (e.g. tmp_screen1326211056490000.jpg). The directory attachments is there also. Inside the ticket directory are png files (screen1326211056490000.jpg) all with the size 6 byte.
Changed 13 years ago by
Attachment: | tmp_screen1326211056490000.jpg added |
---|
Changed 13 years ago by
Attachment: | screen1326211056490000.jpg added |
---|
Changed 13 years ago by
comment:5 Changed 13 years ago by
This warning: WARNING: HTTPInternalError: 500 Trac Error (No file uploaded)
was produced by pressing "Add attachment" instead of "Send the Screenshot". It has nothing to do with the problem.
comment:6 Changed 13 years ago by
The log shows nothing wrong... Could you take a look at the Java log console available on the client machine, to see if there's anything wrong:
- Right-click the java tray icon (bottom-right corner on Win XP) and click "Java debug console" (or something like that)
- Copy and paste the contents of the log into a text file to be attached here
Ciao, Roberto
comment:7 Changed 13 years ago by
BTW, the java console is only available when the applet is displayed on the page.
comment:8 Changed 13 years ago by
Cc: | Ryan J Ollos added; anonymous removed |
---|
comment:9 Changed 13 years ago by
Hmm nothing to see:
wanted format:png: supported format:BMP: supported format:bmp: supported format:jpg: supported format:JPG: supported format:wbmp: supported format:jpeg: supported format:png: supported format:PNG: supported format:JPEG: supported format:WBMP: supported format:GIF: supported format:gif: basic: Starting applet teardown basic: Finished applet teardown
But can it be that something is wrong with the format of the images? I ask because the temp images in tmpscreenshots ends with .jpg but the content seems to be a PNG header and no JPG header.
comment:10 Changed 13 years ago by
Status: | new → assigned |
---|
I could reproduce it on windows (I only tested on linux and it everything works smooth).
You're right about the format, it is actually a png but it's sved with .jpg extension. Linux doesn't seem to bother, but windows does.
I patched the code to use .png extension, but with no luck either.
Patching the code to actually send JPG images gives better luck. The files in tmpscreenshots are almost correct images, but are anyway somewhat corrupted. The files in the attachments directory are anyway ridicolously small. So there's something wrong with the copy process too.
Still digging into the problem.
comment:11 Changed 13 years ago by
I'm going to be installing this plugin soon. Is the issue you guys are working on caused by the Windows client or the Windows server? I'm running CentOS server and Windows 7 and XP clients.
comment:12 Changed 13 years ago by
I do not know. I'm running Windows Server 2003 and Windows Clients (Win7 and WinXP).
comment:13 Changed 13 years ago by
I'll try to find out something during this w/e, including whether the problem is observed with only a Windows server or client.
Ciao, Roberto
comment:15 Changed 13 years ago by
Replying to anonymous:
Any news?
I second that, but at the same time I've watched what excellent work seccanj has done with the TestManagerForTracPlugin, and realize he might be slightly busy ;)
comment:16 Changed 13 years ago by
Hi all, thanks for your patience... I couldn't find any more time to digg into this problem yet, my real job is very demanding these days :D
I think there's something wrong with the base64 encoding (browser's javascript engine)/decoding(python) process, and also something more wrong with the copy of the downloaded bits from the tmpscreenshots to the attachments directory.
I'll try to look at it asap... (anyone willing to contribute?)
Ciao, Roberto
comment:17 Changed 13 years ago by
Summary: | images are empty → Images are empty on Windows (linux works fine) |
---|
comment:18 Changed 13 years ago by
Hi, I found and fixed the problem, caused by my poor Python skills ;-)
You can find in attachment the fixed api.py file, to be replaced into the source tree as: screenshotpaste.0.1.0/screenshotpaste/api.py
Do a build and replace the generated egg file into your Trac project "plugins" directory.
Please, let me know if this works for you. If so, I will ship a new release of the plugin asap.
Ciao, Roberto
comment:21 Changed 13 years ago by
Your patch works ! Thanks for your work! Our qa team is loving this!
comment:22 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed and released with 0.1.1.
I use the downloaded egg file of the plugin (ScreenshotPaste-0.1.0-py2.7.egg) together with Trac 0.12.2.