milang / p4.net Goto Github PK
View Code? Open in Web Editor NEWFork of the official P4.NET project that adds support for .NET 4
Fork of the official P4.NET project that adds support for .NET 4
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.
(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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.