162 lines
4.6 KiB
Plaintext
162 lines
4.6 KiB
Plaintext
BUGS:
|
|
2020-03-15
|
|
MagicByteOffset never ACTUALLY GETS SET ANYWHERE
|
|
|
|
2019-10-13
|
|
|
|
TODO: Figure out why
|
|
after showing a dialog, then closing it
|
|
dialogs stop responding with GTK_IS_WINDOW assertion failed
|
|
|
|
|
|
2019-09-10
|
|
|
|
1. When opening a file over MTP via command line
|
|
|
|
System.IO.DirectoryNotFoundException: Could not find a part of the path "/home/beckermj/Documents/Projects/UniversalEditor/CSharp/Output/Debug/mtp:/KYOCERA_KYOCERA_Android_524700024001/Internal%20shared%20storage/Android/data/com.android.providers.media/albumthumbs/1556075497435".
|
|
|
|
This is because we do not currently support loading from MTP. We need to build an MTPAccessor and set the schema to "mtp" in order to parse this type of URL.
|
|
|
|
|
|
2. When opening an existing file via command line,
|
|
|
|
System.NullReferenceException: Object reference not set to an instance of an object
|
|
at UniversalWidgetToolkit.Engines.GTK.Controls.DockingContainerImplementation.GetCurrentItem () [0x00007] in <a7977898437a4b3195fc97fa96d57331>:0
|
|
|
|
|
|
The following had to be removed from UE v4.0c to compile with IL2CPU...
|
|
|
|
|
|
/// <summary>
|
|
/// Reads an array of items of the specified type from the current stream.
|
|
/// </summary>
|
|
/// <typeparam name="T">The data type of the items to read.</typeparam>
|
|
/// <param name="count">The number of items to read.</param>
|
|
/// <returns></returns>
|
|
public T[] ReadObjectArray<T>(int count)
|
|
{
|
|
List<T> objects = new List<T>();
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
objects.Add((T)ReadObject(typeof(T)));
|
|
}
|
|
return objects.ToArray();
|
|
}
|
|
public T[] ReadStructArray<T> (int count) where T: struct
|
|
{
|
|
System.Collections.Generic.List<T> ts = new System.Collections.Generic.List<T> ();
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
T obj = ReadStruct<T> ();
|
|
ts.Add (obj);
|
|
}
|
|
return ts.ToArray ();
|
|
}
|
|
|
|
// TODO: ReadStruct needs to be fixed. It has a lot of problems.
|
|
|
|
public T ReadStruct<T> () where T : struct
|
|
{
|
|
Type objectType = typeof(T);
|
|
object value = objectType.Assembly.CreateInstance (objectType.FullName);
|
|
|
|
System.Reflection.FieldInfo[] fis = (objectType.GetFields (System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance));
|
|
foreach (System.Reflection.FieldInfo fi in fis)
|
|
{
|
|
Type fieldType = fi.FieldType;
|
|
object fieldValue = ReadObject (fieldType);
|
|
|
|
fi.SetValue (value, fieldValue);
|
|
}
|
|
|
|
return (T)value;
|
|
}
|
|
public T ReadObject<T> () where T : class
|
|
{
|
|
Type objectType = typeof(T);
|
|
T value = (T)objectType.Assembly.CreateInstance (objectType.FullName);
|
|
|
|
System.Reflection.FieldInfo[] fis = (objectType.GetFields (System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance));
|
|
foreach (System.Reflection.FieldInfo fi in fis)
|
|
{
|
|
Type fieldType = fi.FieldType;
|
|
object fieldValue = ReadObject(fieldType);
|
|
|
|
fi.SetValue (value, fieldValue);
|
|
}
|
|
|
|
return value;
|
|
}
|
|
public object ReadObject(Type objectType)
|
|
{
|
|
if (objectType == typeof(Byte))
|
|
{
|
|
return ReadByte();
|
|
}
|
|
else if (objectType == typeof(SByte))
|
|
{
|
|
return ReadSByte();
|
|
}
|
|
else if (objectType == typeof(String))
|
|
{
|
|
return ReadLengthPrefixedString();
|
|
}
|
|
else if (objectType == typeof(Char))
|
|
{
|
|
return ReadChar();
|
|
}
|
|
else if (objectType == typeof(Char[]))
|
|
{
|
|
|
|
}
|
|
else if (objectType == typeof(Single))
|
|
{
|
|
return ReadSingle();
|
|
}
|
|
else if (objectType == typeof(Double))
|
|
{
|
|
return ReadDouble();
|
|
}
|
|
else if (objectType == typeof(Int16))
|
|
{
|
|
return ReadInt16();
|
|
}
|
|
else if (objectType == typeof(Int32))
|
|
{
|
|
return ReadInt32();
|
|
}
|
|
else if (objectType == typeof(Int64))
|
|
{
|
|
return ReadInt64();
|
|
}
|
|
else if (objectType == typeof(UInt16))
|
|
{
|
|
return ReadUInt16();
|
|
}
|
|
else if (objectType == typeof(UInt32))
|
|
{
|
|
return ReadUInt32();
|
|
}
|
|
else if (objectType == typeof(UInt64))
|
|
{
|
|
return ReadInt64();
|
|
}
|
|
else if (objectType == typeof(DateTime))
|
|
{
|
|
return ReadDateTime();
|
|
}
|
|
|
|
object value = objectType.Assembly.CreateInstance (objectType.FullName);
|
|
|
|
System.Reflection.FieldInfo[] fis = (objectType.GetFields (System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance));
|
|
foreach (System.Reflection.FieldInfo fi in fis)
|
|
{
|
|
Type fieldType = fi.FieldType;
|
|
object fieldValue = ReadObject (fieldType);
|
|
|
|
fi.SetValue (value, fieldValue);
|
|
}
|
|
|
|
return value;
|
|
}
|