Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Multithreaded Animated GIF (A hack to get the Animated GIF example to work)
Multithreaded Animated GIF [message #44060] Sat, 20 December 2014 19:39 Go to previous message
rainbowsally is currently offline  rainbowsally
Messages: 29
Registered: December 2014
Promising Member
Probs with animated gif.

Using Linux, with the default BLITZ stuff. Compiled from 5485 sources.

1. error missing format string.
/home/USER/upp/uppsrc/plugin/tif/tifupp.cpp:909:37: warning: format not a string literal and no format argu
	ments [-Wformat-security]
   TIFFError(TIFFFileName(tiff), emsg);


I modified one line (below).
// around line 908
	char emsg[1024];
	if(!TIFFRGBAImageBegin(this, tiff, 0, emsg)) {
		// TIFFError(TIFFFileName(tiff), emsg);
		TIFFError("%s %s", TIFFFileName(tiff), emsg); // -rs
		page_error = true;
		return false;
	}
// --


The error handler takes a fmt and va_list but I haven't found the definition of TIFFError() and so I'm not sure this is exactly right.

At least gets past the compiler warnings but the parameter list should be verified by someone that knows their way around in the sources.


2. Something in the #includes isn't working right. In order to enable multithreading by way of uppconfig.h all three of these appear to need to be defined.

[Edited to avoid redefs caused by BLITZ or something.]
File: uppsrc/uppconfig.h
// -rs
#ifndef UPPCONFIG_H
#define UPPCONFIG_H

#ifndef flagMT
#define flagMT
#define _MULTITHREADED
#define MULTITHREADED
#endif

#endif // UPPCONFIG_H


[Edited...]
And add the #include in CtrlCore/CtrlCore.h so it gets set
#ifndef CTRLCORE_H
#define CTRLCORE_H

#include <uppconfig.h> /* -rs added */



There IS another way, but that is to add -DflagMT to GCC.bm in the *OPTIONS flags.

And somehow that appears to turn on the _MULTITHREADDED and MULTITHREADDED #defines properly, which is why I suspect something isn't loading the uppconfig.h file at the right time.

Then finally, to see the demo, load an animated gif and hit the "next image" button. That button does nothing in single threaded mode.

[Updated on: Sun, 21 December 2014 10:39]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: AString::Compare missing explicit return value
Next Topic: Raster::Line segfaults ... sometimes.
Goto Forum:
  


Current Time: Sat Apr 27 17:55:54 CEST 2024

Total time taken to generate the page: 0.03809 seconds