Bug #750
OutputPyImage segmentation fault because of bad uuid library
100%
Description
python uuid library has a known bug that causes it to segv on some systems. This is breaking OutputPyImage.py on my machine at line 75:
self.file_prefix = uuid.uuid4()
Any alternative to this library?
Related issues
Updated by Jackson, Mike about 12 years ago
This is only used to generate a file prefix if the caller hasn't provided one. We could just insist that the caller provide one and remove the need to use uuid.
Updated by Rogers, Chris about 12 years ago
Or just use an index; increment by 1 until file doesn't exist... so you get <tag>0.png, <tag>1.png, etc... probably easier on the eye than <tag><30 character hex string>.png or whatever
But have to say, not quite sure what the context in which you are writing is (this is a temp file stored somewhere? or this is a file user wants to read?)
Updated by Jackson, Mike about 12 years ago
These are files users will want to read e.g. files with histograms.
I'll just add the integer index. The user can override it if they want via a configuration parameter.
Updated by Rogers, Chris about 12 years ago
If I was being really picky, I would ask you to prepend the index by 0s like 0001, 0002, ..., 0021, ... so that "ls" sorts the files in the right order...
Updated by Jackson, Mike about 12 years ago
No, I'm not thinking, sorry. OutputPyImage doesn't need to increment/maintain a counter. At present the UUID is created in birth if the user hasn't explicitly provided a file name prefix. This prefix is shared by all files created by this worker. The JSON documents provided as input determine the rest of the file name - and it's up to whatever creates those (e.g. ReducePyMatplotlibHistogram) to ensure any numbering scheme is applied. So,
I'll
- Just adopt a default string instead of the UUID. The user should configure it if they don't want this default (possibly, by creating their own UUID).
- Update ReducePyMatplotlibHistogram to auto-number as suggested.
Updated by Jackson, Mike about 12 years ago
Update ReducePyMatplotlibHistogram to zero-pad auto-numbers - 670
Updated by Rogers, Chris about 12 years ago
I merged 670 into the trunk... (had someone else with the same problem)
Updated by Rogers, Chris about 12 years ago
But let me know if you are happy to close the issue or have a few more tweaks to make...
Updated by Rogers, Chris about 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Updated by Tunnell, Christopher about 12 years ago
FYI: for future reference, run number and spill number should be unique.
Updated by Rogers, Chris about 12 years ago
- Target version changed from Future MAUS release to MAUS-v0.0.9