以太坊delegatecall
『壹』 被拒两次了,还是没搞定一个CRASH LOG,求助
还是需要手工。先从Archive包中解出.dSYM文件,再从dSYM文件/Contents/Resources/DWARF下找到最终文件(假设为MyAPP)。
然后在cmd窗口运行
atos -o MyAPP 0Xxxxxxxx -arch armv7 -l XXXXX
-l 后面跟的是动态加载的初始地址
这样就可以了。希望对其他人也有帮助。
/*********************************************************************************************************************************/
一个中文的数据库应用,提交了两次,两次都说因为Crash被拒。测试的硬件设备据说是iPAD3, iOS 6.0.1。可是我自己的iPAD3,也是6.0.1,运行起来一点问题没有。
再看发给我的Crash Log也不得要领---全是偏移量。
在网上学习了一阵子,试验了两个办法:
1、在Xcode Organizer的Devices > Library > Device Log里面Import这个Crash Log(Archive里面有当时上传的Binary和dYSM文件)
结果显示的跟Crash文件一样,还是没有行信息;
2、干脆手工运行。在命令行方式,运行cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources ,然后手工运行./symbolicatecrash /Users/Sue/Downloads/大眼睛图书馆_2012-12-12-140343_AQ-an.crash /Users/Sue/Downloads/大眼睛图书馆.app.dSYM,这里的crash文件是苹果发给我的,dSYM是当时上传时的Archive文件中解开的。
不幸,结果跟Crash Log还是没有什么不同。
这下完全没方向了。还请各位不吝赐教,为啥会出现这个情况,有什么办法可以知道是哪行出错了?谢谢!
附:部分Crash Log
Incident Identifier: 83238367-AC70-404B-89C6-7AC9E20C6BB0
CrashReporter Key:
Hardware Model: xxx
Process: 大眼睛图书馆 [9424]
Path: /var/mobile/Applications/1D524195-0340-43A1-AECA-4F2503B78428/大眼睛图书馆.app/大眼睛图书馆
Identifier: 大眼睛图书馆
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-12-12 14:03:43.673 -0800
OS Version: iOS 6.0.1 (10A523)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x31bb9350 __pthread_kill + 8
1 libsystem_c.dylib 0x3991011e pthread_kill + 54
2 libsystem_c.dylib 0x3994c9f2 __abort + 90
3 libsystem_c.dylib 0x3994d03e __stack_chk_fail + 194
4 大眼睛图书馆 0x000427d6 0x3f000 + 14294
5 大眼睛图书馆 0x00042172 0x3f000 + 12658
6 UIKit 0x389be588 -[UIViewController loadViewIfRequired] + 360
7 UIKit 0x389fed6c -[UIWindow ] + 60
8 UIKit 0x389faae0 -[UIWindow _setHidden:forced:] + 360
9 UIKit 0x38a3c1c4 -[UIWindow makeKeyAndVisible] + 56
10 大眼睛图书馆 0x00041cd8 0x3f000 + 11480
11 UIKit 0x389ffacc -[UIApplication _:isSuspended:restoreState:] + 248
12 UIKit 0x389ff656 -[UIApplication _:payload:suspended:] + 1186
13 UIKit 0x389f783e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
14 UIKit 0x3899fc34 -[UIApplication handleEvent:withNewEvent:] + 1000
15 UIKit 0x3899f6c8 -[UIApplication sendEvent:] + 68
16 UIKit 0x3899f116 _UIApplicationHandleEvent + 6150
17 GraphicsServices 0x3611b5a0 _PurpleEventCallback + 588
18 CoreFoundation 0x32c64680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
19 CoreFoundation 0x32c63ee4 __CFRunLoopDoSources0 + 208
20 CoreFoundation 0x32c62cb2 __CFRunLoopRun + 642
21 CoreFoundation 0x32bd5eb8 CFRunLoopRunSpecific + 352
22 CoreFoundation 0x32bd5d44 CFRunLoopRunInMode + 100
23 UIKit 0x389f6478 -[UIApplication _run] + 664
24 UIKit 0x389f32f4 UIApplicationMain + 1116
25 大眼睛图书馆 0x00041b1a 0x3f000 + 11034
26 大眼睛图书馆 0x00041adc 0x3f000 + 10972
『贰』 C#...正在找一个委托实现异步调用的例子,高手请!
using System;
using System.Threading;
//使用委托调用异步例子
namespace
{
class AsyncDelegatesBlocked
{
public static int Add(int op1, int op2, out int result)
{
Thread.Sleep(3000); // Simulating work
return (result = op1 + op2);
}
public delegate int AddDelegate(int op1, int op2,
out int result);//声明AddDelegate委托
static void Main()
{
int result;
/*定义一个AddDelegate类型委托add,将方法Add绑定到委托实例上*/
AddDelegate add = new AddDelegate(Add);
Console.WriteLine("[Main] Invoking the asynchronous " +
"Add method");
/*BeginInvoke 方法用于启动异步调用。它与您需要异步执行的方法具有相同的参数,还有两个额外的参数
*BeginInvoke 立即返回,不等待异步调用完成。BeginInvoke 返回 IasyncResult,可用于监视调用进度。*/
//定义IAsyncResult接口类型实例iAR
//6, 42, out result为异步执行的方法的参数列表
IAsyncResult iAR = add.BeginInvoke(6, 42, out result,
null, null);
// Here we're simulating doing some work before
// blocking on the Add method's completion.
Console.Write("[Main] Doing other work");
for (int i = 0; i < 10; i++)
{
Thread.Sleep(200);
Console.Write(".");
}
Console.WriteLine(" [Main] Waiting for Add to finish");
/*使用 IAsyncResult.AsyncWaitHandle 获取 WaitHandle,
* 使用它的 WaitOne 方法将执行一直阻塞到发出 WaitHandle 信号,然后调用 EndInvoke。
* 注意:异步调用完成时会发出 WaitHandle 信号,可以通过WaitOne 来等待它*/
iAR.AsyncWaitHandle.WaitOne();
Console.WriteLine("[Main] Add finished, cleaning up");
/*EndInvoke 方法用于检索异步调用结果。调用 BeginInvoke 后可随时调用 EndInvoke 方法;
* 如果异步调用未完成,EndInvoke 将一直阻塞到异步调用完成。
* EndInvoke 的参数包括所需要异步执行的方法的 out 和 ref 参数以及由 BeginInvoke 返回的 IAsyncResult。*/
add.EndInvoke(out result, iAR);
Console.WriteLine("[Main] The result is {0}", result);
Console.ReadLine();
}
}
}
『叁』 怎么生成图片预览
Image有个GetThumbnailImage(int, int,delegateCallBack, System.IntPtr);
方法可以生成小图片,试下.
『肆』 C# 获取 C++指针函数
delegate
委托就是函数指针
用delegate就可以了,你可以参考下MSDN中的delegate的用法,
delegate可以定义一个代理,用这个代理可以是对一个函数或方法的代理,实现上就是指针了.
比如:
public
delegate
void
someMethod(
int
num,
string
str
);
someMethod
method
=
new
someMethod(
函数名字);
这个method就是函数的指针了.
C++
----
C#
传入的char*
----string
传出的char*
----
StringBuilder(预分配空间)
short
----short
char
----
byte
char[n]
----
fixed
byte[n]
结构指针
----结构指针
函数指针
----
委托
/////////////////////////以下是代码////////////////////
在C#中使用Delegate可以方便的包装Win32非托管dll中的函数指针(回调函数)。
如下面的Win32API:
typedef
void
(*PFNCLIENTCONNECTED)(DWORD
clientId,
DWORD
addr);
typedef
void
(*PFNCLIENTDISCONNECTED)(DWORD
clientId,
DWORD
addr);
typedef
void
(*PFNMESSAGERECEIVED)(DWORD
clientId,
DWORD
addr,
LPCSTR
message);
extern
"C"
__declspec(dllexport)
BOOL
InitializeServer(USHORT
port);
extern
"C"
__declspec(dllexport)
BOOL
UninitializeServer();
extern
"C"
__declspec(dllexport)
void
(PFNCLIENTCONNECTED
clientConnected);
extern
"C"
__declspec(dllexport)
void
(PFNCLIENTDISCONNECTED
clientDisconnected);
extern
"C"
__declspec(dllexport)
void
(PFNMESSAGERECEIVED
messageReceived);
可以使用类似下面的C#代码来进行调用:
class
Win32Wrapper
{
public
delegate
void
ClientConnected(uint
clientID,
uint
address);
public
delegate
void
ClientDisconnected(uint
clientID,
uint
address);
public
delegate
void
MessageReceived(uint
clientID,
uint
address,
StringBuilder
message);
[DllImport("LogCenter.dll")]
public
static
extern
bool
InitializeServer(ushort
port);
[DllImport("LogCenter.dll")]
public
static
extern
bool
UninitializeServer();
[DllImport("LogCenter.dll",
CallingConvention
=
CallingConvention.Cdecl)]
public
static
extern
int
(Delegate
callback);
[DllImport("LogCenter.dll",
CallingConvention
=
CallingConvention.Cdecl)]
public
static
extern
int
(Delegate
callback);
[DllImport("LogCenter.dll",
CallingConvention
=
CallingConvention.Cdecl)]
public
static
extern
int
(Delegate
callback);
}
『伍』 NET网站后台突然出现这个,怎么处理,请详细说下处理办法。
参数名: oldValue]
System.String.Replace(String oldValue, String newValue) +0
Ant.Web.Admin.Gathering.OO11lOl(String OOO, String O00l1ll11l) +3516
Ant.Web.Admin.Gathering.Page_Load(Object O10l01, EventArgs O) +3958
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util..Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627