see my post here: http://irrlicht.sourceforge.net/forum/v ... 56#p277040
All you have to do is move the crashing code block before createDriver(). That's it.
I made a patch for Nadro, but I think he has forgotten about it
![Smile :-)](./images/smilies/icon_smile.gif)
Code: Select all
core::position2di CIrrDeviceAndroid::getWindowPosition()
{
return core::position2di(-1, -1);
}
We are in a major rework of the ogl-es2 driver. After that, the iPhone and Android devices will be updated. So might take a little longer. Maybe better put the patches to our tracker if you haven't done so. This will ensure they are not lost somehow (http://sourceforge.net/tracker/?group_i ... tid=540678)mchiasson wrote:I made a patch for Nadro, but I think he has forgotten about it
Code: Select all
// Those 2 files can fail to load (for example, there is no "asset/media/Shaders/*.*" files)
// In this case, 0 is returned
io::IReadFile* FPVSFile = FileSystem->createAndOpenFile(FPVSPath);
io::IReadFile* FPFSFile = FileSystem->createAndOpenFile(FPFSPath);
c8* FPVSData = 0;
c8* FPFSData = 0;
long Size = FPVSFile->getSize(); /// BOOM, segfault if file failed to load
if (Size)
{
FPVSData = new c8[Size+1];
FPVSFile->read(FPVSData, Size);
FPVSData[Size] = 0;
}
Size = FPFSFile->getSize(); /// BOOM again, if the other file was not loaded
if (Size)
{
// if both handles are the same we must reset the file
if (FPFSFile == FPVSFile)
FPFSFile->seek(0);
FPFSData = new c8[Size+1];
FPFSFile->read(FPFSData, Size);
FPFSData[Size] = 0;
}
if (FPVSFile)
FPVSFile->drop();
if (FPFSFile)
FPFSFile->drop();
Code: Select all
long Size = FPVSFile->getSize(); /// BOOM, segfault if file failed to load
if (Size) // ...
Code: Select all
long Size = (FPVSFile != 0 ? FPVSFile->getSize() : 0);
if (Size) // ...
Code: Select all
- assets
- data
- player
- player.b3d
- player.bmp
- media
- Shaders
- ...
Code: Select all
Using texture: player.bmp
[...]
Could not open file of texture: player.bmp