getting errors reading SVS macro and thumbnail images on Windows, not Linux

Toby Cornish tcornis3 at jhmi.edu
Thu May 21 13:15:52 EDT 2015


I am working with OpenSlide Python. Most of my work with OpenSlide has been on Linux, but I now have need of some cross platform software.  I was developing in Ubuntu and tried to run the same code under windows, but consistently get an error under Windows.

This has failed on all svs files I have tried. All the files have an embedded label, thumb, and macro image.  I can read all of them using the code below on Linux, but I can only read the label image under Windows.

Windows:
python:  2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
openslide-python version:  1.1.0
openslide library_version:  3.4.1

Linux:
python:  2.7.2+ (default, Jul 20 2012, 22:15:08) [GCC 4.6.1]
openslide-python version:  1.1.0
openslide library_version:  3.4.1


Output on Linux:

python:  2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1]
version:  1.1.0
library_version:  3.4.1
associated_images.keys:  [u'label', u'macro', u'thumbnail']
label:  (680, 683)
macro:  (1600, 598)
thumb:  (666, 768)


The error I get under Windows is:

Traceback (most recent call last):
  File "C:\Users\tcornis3\Dropbox\development\qtTesting\issue.py", line 27, in <
module>
    macroIm = slide.associated_images['macro']
  File "C:\Python27\lib\site-packages\openslide\__init__.py", line 258, in __get
item__
    return lowlevel.read_associated_image(self._osr, key)
  File "C:\Python27\lib\site-packages\openslide\lowlevel.py", line 249, in read_
associated_image
    _read_associated_image(slide, name, buf)
WindowsError: exception: access violation reading 0x00000000
**
Openslide:ERROR:src/openslide-decode-tiff.c:699:_openslide_tiffcache_destroy: as
sertion failed: (tc->outstanding == 0)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


The code and a small sample svs can be downloaded from here:

https://dl.dropboxusercontent.com/u/6703139/_small.svs
https://dl.dropboxusercontent.com/u/6703139/issue.py


The code is also here:

#!/usr/bin/python

import sys
import os
import openslide
from openslide import *

svsPath = r'_small.svs'
slide = openslide.OpenSlide(svsPath)

print 'python: ',sys.version
print 'version: ',openslide.__version__
print 'library_version: ', openslide.__library_version__
print 'associated_images.keys: ',slide.associated_images.keys()

try:
                labelIm = slide.associated_images['label']
                print 'label: ',labelIm.size
except OpenSlideError, e:
                print 'error reading label'
                print e
try:
               macroIm = slide.associated_images['macro']
               print 'macro: ',macroIm.size
except OpenSlideError, e:
               print 'error reading macro'
                print e
try:
                thumbIm = slide.associated_images['thumbnail']
                print 'thumb: ',thumbIm.size
except OpenSlideError, e:
                print 'error reading thumb'
                print e

slide.close()



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20150521/b4d9b76d/attachment.html 


More information about the openslide-users mailing list