Git Product home page Git Product logo

p4.net's People

Contributors

milang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

p4.net's Issues

Cannot find p4dn.dll

It appears that while the assembly is AnyCPU compatible, I still require 32 or 64 bit P4DN.DLL. I get classic exception when using the P4.net dll:

Exception type: FileNotFoundException
Could not load file or assembly 'p4dn, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ff968dc1933aba6f' or one of its dependencies. The system cannot find the file specified.

Sinc P4DN is a native DLL, I must continue to tackle the 'which DLL to load' problem, except now it is about p4DN.

Please advise.

P4Record crash

(from David Hind)

I know it's an old project but I thought you might be interested in a bug I found in P4.Net.

It was crashing in P4Record.cs in this function:

private void processArray(string baseName)
{
    if (!_ArrayFields.ContainsKey(baseName))
    {
        List<string> list = new List<string>();
        for (int i = 0; ; i++)
        {
            string key = string.Format("{0}{1}", baseName, i);

            // fileSize will get us here too.  If a file is deleted and re-added,
            // the a filelog command will skip some numbers on the fileSize                    
            if (!_allFields.ContainsKey(key))
            {
                // peek ahead one file to see if one happend to be skipped
                string key2 = string.Format("{0}{1}", baseName, i + 1);
                if (_allFields.ContainsKey(key2))
                {
                    list.Add("");
                }
                else
                { 
                    break;
                }
            }
            list.Add(_allFields[key]);
        }

        _ArrayFields.Add(baseName, list.ToArray());
    }            
}

_allFields was missing a Key (it was filesize that didn't exist since the file was being deleted). It tries to add it anyway in list.add(_allFields[key]).

This is the fixed funciton:

private void processArray(string baseName)
{
    if (!_ArrayFields.ContainsKey(baseName))
    {
        List<string> list = new List<string>();
        for (int i = 0; ; i++)
        {
            string key = string.Format("{0}{1}", baseName, i);

            // fileSize will get us here too.  If a file is deleted and re-added,
            // the a filelog command will skip some numbers on the fileSize                    
            if (!_allFields.ContainsKey(key))
            {
                // peek ahead one file to see if one happend to be skipped
                string key2 = string.Format("{0}{1}", baseName, i + 1);
                if (_allFields.ContainsKey(key2))
                {
                    list.Add("");
                }
                else
                { 
                    break;
                }
            }
            else
            }
               list.Add(_allFields[key]);
            }
        }

        _ArrayFields.Add(baseName, list.ToArray());
    }            
}

I only saw this bug recently, which makes me suspicious (that something else changed). I know we did a perforce upgrade recently, so it might be related.

Cheers,

David.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.