#1120 Possible x64 issue in source

Cthugha
closed-fixed
nobody
bugfix (702)
5
2009-11-28
2009-11-15
Andy
No

We've been chasing issues running Python-Ogre on 64 bit systems (Linux specifically) and have fond one issue in resource group manager where getScriptPatterns returns a huge (2^31) number. As an example this patch works around it (obvious not a complete/good fix at all)

+++ ogre/OgreMain/src/OgreResourceGroupManager.cpp 2009-11-13 20:00:11.059944290 +0100
@@ -914,6 +914,9 @@

        // Get all the patterns and search them
        const StringVector& patterns = su->getScriptPatterns\(\);

+ if(patterns.size() > 20) {
+ continue;
+ }

I don't have a system to test on however in reviewing the Ogre source I can see one area that might be a problem and hence have attached a patch for to fix BillboardChain::SEGMENT_EMPTY which is defined with a 32 bit magic number...

This is UNTESTED (I don't have a 64 bit system) -- sorry.... :(

Discussion

  • Andy

    Andy - 2009-11-15

    Diff for 64 bit issue

     
  • Steve Streeting

    Steve Streeting - 2009-11-28

    Since size_t is unsigned I don't want to initialise it with -1, instead I've used std::numeric_limits<size_t>::max(), which should deal with varying sizes.

    I don't really have any idea about your getScriptPatterns() issue though...

     
  • Steve Streeting

    Steve Streeting - 2009-11-28
    • status: open --> closed-fixed
     

Log in to post a comment.