首页 \ 问答 \ 如何在Android / iOS设备上调试unity3d?(How to debug unity3d on Android/iOS device?)

如何在Android / iOS设备上调试unity3d?(How to debug unity3d on Android/iOS device?)

Unity 5.2.3f1,VS2015社区版,Windows 10

我已经做了什么:

在Windows上构建并运行应用程序......一切正常

2为Android而建,并在我的三星Galaxy S3上部署了apk(使用usb线)...工作,但无法调试...似乎usb调试仍然不是一个选项

(已在设备上激活开发模式,“开发构建”和“脚本调试”都已选中)

用于wifi调试的3用adb命令:

adb tcpip 5555 
adb connect [device ip adress without brackets]:5555

设备通过使用连接

adb devices 

我在列表中看到了我的设备

4断开USB电缆

5-当游戏在设备上启动时,我可以在选择框中看到i-9300统一实例

6 - 我选择它然后VS变得反应迟钝......我需要使用任务管理器终止程序

有什么建议么?


Unity 5.2.3f1 , VS2015 community edition, Windows 10

What I have already done:

1-built and run the app on windows... everything works fine

2-built for android and deployed the apk on my Samsung Galaxy S3 (using usb cable)...works, but can not debug... seems usb debugging is still not an option

(developper mode already activated on device, "development build" and "script debugging" are both checked)

3-used adb commands for wifi debugging:

adb tcpip 5555 
adb connect [device ip adress without brackets]:5555

device connects as by using

adb devices 

I see my device in the list

4-disconnected USB cable

5- when the game is launched on device, I can see the i-9300 instance of unity in the selection box

6-I choose it and then VS becomes irresponsive... and I need to terminate the program using task manager

any suggestions?


原文:https://stackoverflow.com/questions/34208730
更新时间:2022-11-14 19:11

最满意答案

swap功能中,当temp指向任何内容(未初始化)时,您将为*temp分配一个值。 因此,你的分段错误。

你要这个:

void swap(char* first, char* last)
{
    char temp = *first;
    *first = *last;
    *last = temp;
}

In your swap function, you are assigning a value to *temp when temp is not pointing to anything (it's uninitialized). Thus, your segmentation fault.

You want this:

void swap(char* first, char* last)
{
    char temp = *first;
    *first = *last;
    *last = temp;
}

相关问答

更多
  • 在我使用的大多数架构中,区别在于: 当您访问您不想访问的内存(例如,在您的地址空间之外)时会导致SEGV。 SIGBUS是由于与CPU的对齐问题导致的(例如,尝试从不是4的倍数的地址读长)。 On most architectures I've used, the distinction is that: a SEGV is caused when you access memory you're not meant to (e.g., outside of your address space). a S ...
  • 看起来你在mysqli模块中发现了一个错误! 提交到https://bugs.php.net/ 不过,不要指望明天它会被修复。 寻找一种解决错误的方法,或尝试使用不同的PHP / mysqli版本来查看是否可以通过。 作为参考,我也可以重现它,这里是一个回溯。 看起来事情正在爆炸,同时试图关闭连接并进行清理: jon@jonx:~/tmp$ gdb `which php` ... Reading symbols from /usr/bin/php...(no debugging symbols found) ...
  • 最可能的原因是它无法打开文件。 在调用fopen("tele.txt","r")后立即检查ifp是否为NULL。 如果它是NULL, errno将为您提供更多错误的详细信息(很多可能的原因,其中一些是:文件不存在,您没有权限访问它,或者您错了目录。) ch本身也存在一些问题,可能与崩溃无关: ch未初始化,因此while (ch != EOF)可能会输入也可能不会输入[感谢@Dirk指出这一点]; while(ch !='\n')有点狡猾,如果你加入EOF ,你最终会陷入无限循环。 The most lik ...
  • 在swap功能中,当temp指向任何内容(未初始化)时,您将为*temp分配一个值。 因此,你的分段错误。 你要这个: void swap(char* first, char* last) { char temp = *first; *first = *last; *last = temp; } In your swap function, you are assigning a value to *temp when temp is not pointing to anythin ...
  • 我们在代码中遇到的问题是风格。 你不能使用@ + id来引用任何视图(我猜你不应该在你的样式中引用任何类型的视图,但无论如何)。 你的风格中没有@ + id 。 The problem we had in code was in style. You cannot use @+id to make reference to any view ( I guess you should not reference any kind of view in your styles, but anyway). No ...
  • 分段错误的一个好主意是使用valgrind运行程序进行调试。 这样,您通常会获得有关导致细分错误的详细信息。 例如,它会告诉您是否正在读取未初始化的内存。 A good idea with segmentation faults is to run the program with valgrind for debugging. That way, you'll often get more detailed information about what caused your segmentation f ...
  • 你不能像你一样使用strcat ,它的目的是在另一个给定的C字符串的末尾处连接一个C字符串。 str[i]是一个char而不是一个C字符串(记住一个C字符串是一个连续的字符序列,最后一个是NUL字节)。 你也无法将字符串与标准比较运算符进行比较,如果你真的需要比较字符串,那么它就有一个strcmp函数。 但是你可以将chars与标准运算符进行比较,因为char只是一种整数类型。 这应该是诀窍: #include #include #include
  • 对不起,您无法处理。 段错误是由内存损坏,读取或写入超出拥有内存,双重释放和其他一些内容的边界引起的。 您可以在此处找到导致段错误的一些问题示例: https://gist.github.com/carlos-jenkins/8873932 操作系统将杀死违规程序,你无法做多少。 您唯一的解决方案是纠正根本问题。 您可以使用Valgrind工具运行程序,它可以让您找到问题的确切位置: http://valgrind.org/ 在Ubuntu上,只需sudo apt-get install valgrind然 ...
  • 正如@BLUEPIXY指出的那样,使用 CheckText("hello", h,0,40,6); 当CheckText修改其参数时会导致未定义的行为,因为"hello"被放置在代码的只读部分中。 使用类似的东西: char h[40] = "hello"; char h2[40] = "hello"; int fla; printf("hey1"); fla=CheckText(h2, h,0,40,6); As was pointed out by @BLUEPIXY, use of CheckTe ...
  • 并尝试使用“-O 1”标志运行pdf2swf。 And try running pdf2swf with "-O 1" flag.

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)