Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 Spark datagrid仅在版本中出现排序列崩溃(使用临时修复程序更新)_Actionscript 3_Apache Flex_Datagrid_Air_Flex Spark - Fatal编程技术网

Actionscript 3 Spark datagrid仅在版本中出现排序列崩溃(使用临时修复程序更新)

Actionscript 3 Spark datagrid仅在版本中出现排序列崩溃(使用临时修复程序更新),actionscript-3,apache-flex,datagrid,air,flex-spark,Actionscript 3,Apache Flex,Datagrid,Air,Flex Spark,在这方面有一段时间的困难,想知道更多地关注这个问题是否会有所帮助 这是一个适用于Windows/Mac的独立Air应用程序 更新:我可以让发布版本进行实际排序,而不会崩溃!如果我添加编译器标志(-optimize=false),它将按预期工作。现在这是一个临时修复,因为我希望编译器优化并减小最终二进制文件的大小。这些新信息是否能给任何人一些想法? 我有一个spark datagrid,它显示了大约250个条目,从返回XML的PHP脚本每30秒更新一次。它在调试模式下以及仅从Flash Build

在这方面有一段时间的困难,想知道更多地关注这个问题是否会有所帮助

这是一个适用于Windows/Mac的独立Air应用程序

更新:我可以让发布版本进行实际排序,而不会崩溃!如果我添加编译器标志(-optimize=false),它将按预期工作。现在这是一个临时修复,因为我希望编译器优化并减小最终二进制文件的大小。这些新信息是否能给任何人一些想法?

我有一个spark datagrid,它显示了大约250个条目,从返回XML的PHP脚本每30秒更新一次。它在调试模式下以及仅从Flash Builder运行时按预期工作,但在尝试按导出版本中的任何列进行排序时,它会立即崩溃(它正确显示列表,唯一的更改是排序时崩溃)

在Windows上,它不会显示任何错误消息,并且在用户尝试对列进行排序时,它似乎会立即关闭。在Mac OS X上,它会显示一条很长的错误消息,但这里可能是最重要的部分:

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000be2c001
从我所知道的看来,似乎在试图访问坏内存。我不能让这个错误在Flash Builder中发生,我一直在寻找一种在Flash Builder中运行优化/发布版本的方法

我真的很感激任何关于为什么会发生这种情况的建议或想法

Flex版本:4.6.0

Air版本(在Application.xml中设置):3.1

更新:如果尝试对空数据网格进行排序,应用程序仍会崩溃

如果有帮助,下面是定义datagrid的代码片段

    <s:DataGrid id="watchsheetDataGrid" width="100%" height="100%" fontFamily="Verdana" fontSize="14" textAlign="center" dataProvider="{watchlistData}">
        <s:columns>
            <s:ArrayList>
                <s:GridColumn dataField="symbol" headerText="Symbol" width="70"></s:GridColumn>
                <s:GridColumn dataField="underlyingPrice" headerText="Underlying Price" width="130"></s:GridColumn>
                <s:GridColumn dataField="strikePrice" headerText="Strike" width="70"></s:GridColumn>
                <s:GridColumn dataField="optionBid" headerText="Option Bid" width="100"></s:GridColumn>
                <s:GridColumn dataField="type" headerText="Type" width="70"></s:GridColumn>
                <s:GridColumn dataField="quantity" headerText="Count" width="70"></s:GridColumn>
                <s:GridColumn dataField="expiry" headerText="Expiry" width="120" labelFunction="dateLabelFunction"></s:GridColumn>
                <s:GridColumn dataField="negativeTime" headerText="Negative Time" labelFunction="negativeTimeLabelFunction"></s:GridColumn>
                <s:GridColumn dataField="inTheMoney" headerText="In The Money" labelFunction="ITMLabelFunction"></s:GridColumn>
                <s:GridColumn dataField="daysLeft" headerText="Days Left"></s:GridColumn>
                <s:GridColumn dataField="burnRate" headerText="Burn Rate" labelFunction="BurnRateLabelFunction"></s:GridColumn>
                <s:GridColumn dataField="percentOOM" headerText="% Out of $"></s:GridColumn>
                <s:GridColumn dataField="roreScore" headerText="RORE" labelFunction="RORELabelFunction"></s:GridColumn>
                <s:GridColumn dataField="adjustedRoreScore" headerText="Adj. RORE" labelFunction="AdjRORELabelFunction"></s:GridColumn>
            </s:ArrayList>
        </s:columns>
    </s:DataGrid>

是否可以尝试最新(或更新)版本的AIR?从表面上看,您的代码似乎没有问题——我希望Flash/AIR能够更优雅地处理我们造成的错误:)1。在应用程序启动后是否可以复制,或者您是否需要等待至少一次更新?2.您是将XML设置为数据提供者,还是将其解析为对象或其他自定义类(如果还没有,请尝试)?3.网格布局中是否启用了虚拟化?客户端已完全更新了Air安装,更新前列表为空(我会尝试一下,然后再与您联系)。XML数据被解析成一个对象数组并设置为数据提供者,每次更新都会清除列表并添加新数据。每个数据对象也从IUID继承。我将查找虚拟化,因为我不能100%确定它指的是什么。更新:是的,如果我在更新之前排序(完全为空列表),它仍然会在sortI上崩溃。sortI指的是您正在编译的AIR版本,AIR 3.4是最新版本,看起来您使用的是3.1
        private function CreateWatchlistData():void
        {
            watchlistData.removeAll();

            latestUpdateTime = new Date();
            for(var i:int = 0; i < watchlistRequest.lastResult.positions.position.length; i++)
            {
                var newItem:WatchlistRowItem = new WatchlistRowItem();
                newItem.expiry = watchlistRequest.lastResult.positions.position[i].expiry;
                newItem.percentMV = watchlistRequest.lastResult.positions.position[i].percentMV;
                newItem.price = watchlistRequest.lastResult.positions.position[i].price;
                newItem.quantity = watchlistRequest.lastResult.positions.position[i].quantity;
                newItem.strikePrice = watchlistRequest.lastResult.positions.position[i].strikePrice;
                newItem.symbol = watchlistRequest.lastResult.positions.position[i].symbol;
                newItem.type = watchlistRequest.lastResult.positions.position[i].type;
                newItem.value = watchlistRequest.lastResult.positions.position[i].value;
                newItem.underlyingPrice = watchlistRequest.lastResult.positions.position[i].underlyingPrice;
                newItem.optionBid = Number(watchlistRequest.lastResult.positions.position[i].optionBid);
                newItem.RefreshData();
                watchlistData.addItem(newItem);
            }       
        }
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.adobe.AIR
0x03344ab7 0x3000000 + 3426999
1 com.adobe.AIR
0x03344b78 0x3000000 + 3427192
2 com.adobe.AIR
0x03348c41 0x3000000 + 3443777
3 com.adobe.AIR
0x0334a670 0x3000000 + 3450480
4 com.adobe.AIR
0x0311c50d 0x3000000 + 1164557
5 com.adobe.AIR
0x03122749 0x3000000 + 1189705
6 com.adobe.AIR
0x03108974 0x3000000 + 1083764
7 com.apple.Foundation
0x91185d92 __57-[NSNotificationCenter
addObserver:selector:name:object:]_block_invoke_0 + 49
8 com.apple.CoreFoundation
0x98087481
___CFXNotificationPost_block_invoke_0 + 257
9 com.apple.CoreFoundation
0x97fd2b5a _CFXNotificationPost + 2794
10 com.apple.Foundation
0x9116e8c8 -[NSNotificationCenter
postNotificationName:object:userInfo:] + 92
11 com.apple.Foundation
0x9117e667 -[NSNotificationCenter
postNotificationName:object:] + 55
12 com.apple.AppKit
0x93d52b69 -[NSApplication terminate:] + 2420
13 com.apple.Foundation
0x9119b10f __NSFireDelayedPerform + 413
14 com.apple.CoreFoundation
0x97fdd0d6
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
15 com.apple.CoreFoundation
0x97fdca75 __CFRunLoopDoTimer + 709
16 com.apple.CoreFoundation
0x97fc1892 __CFRunLoopRun + 1730
17 com.apple.CoreFoundation
0x97fc0d6a CFRunLoopRunSpecific + 378
18 com.apple.CoreFoundation
0x97fc0bdb CFRunLoopRunInMode + 123
19 com.apple.HIToolbox
0x962e28aa RunCurrentEventLoopInMode + 242
20 com.apple.HIToolbox
0x962e2619 ReceiveNextEventCommon + 374
21 com.apple.HIToolbox
0x962e2494
BlockUntilNextEventMatchingListInMode + 88
22 com.apple.AppKit
0x93b29a5a _DPSNextEvent + 724
23 com.apple.AppKit
0x93b2928c -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
24 com.apple.AppKit
0x93b1f6dc -[NSApplication run] + 855
25 com.adobe.AIR
0x03008fca 0x3000000 + 36810
26 com.adobe.AIR
0x03009310 0x3000000 + 37648
27 libobjc.A.dylib
0x993ab5d3 -[NSObject performSelector:withObject:] +
70
28 com.thewinningpoints.optionsSoftware
0x00002f97 start + 2567
29 com.thewinningpoints.optionsSoftware
0x000025c5 start + 53
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib
0x9933a9ae kevent + 10
1 libdispatch.dylib
0x95d9ecc5 _dispatch_mgr_invoke + 993
2 libdispatch.dylib
0x95d9e7fd _dispatch_mgr_thread + 53
Thread 2:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib
0x993377d2 mach_msg_trap + 10
1 libsystem_kernel.dylib
0x99336cb0 mach_msg + 68
2 com.apple.CoreFoundation
0x97fbbcc9 __CFRunLoopServiceMachPort + 185
3 com.apple.CoreFoundation
0x97fc16af __CFRunLoopRun + 1247
4 com.apple.CoreFoundation
0x97fc0d6a CFRunLoopRunSpecific + 378
5 com.apple.CoreFoundation
0x97fc0bdb CFRunLoopRunInMode + 123
6 com.apple.Foundation
0x9115c29a +[NSURLConnection(Loader)
_resourceLoadLoop:] + 395
7 com.apple.Foundation
0x911c0318 -[NSThread main] + 45
8 com.apple.Foundation
0x911c029b __NSThread__main__ + 1396
9 libsystem_c.dylib
0x99581557 _pthread_start + 344
10 libsystem_c.dylib
0x9956bcee thread_start + 34
Thread 3:: com.apple.CFSocket.private
0 libsystem_kernel.dylib
0x99339be6 __select + 10
1 com.apple.CoreFoundation
0x98005320 __CFSocketManager + 1632
2 libsystem_c.dylib
0x99581557 _pthread_start + 344
3 libsystem_c.dylib
0x9956bcee thread_start + 34
Thread 4:
0 libsystem_kernel.dylib
1 libsystem_c.dylib
2 libsystem_c.dylib
3 libsystem_c.dylib
Thread 5:
0 libsystem_kernel.dylib
1 libsystem_c.dylib
2 libsystem_c.dylib
3 libsystem_c.dylib
Thread 6:
0 libsystem_kernel.dylib
1 libsystem_c.dylib
2 libsystem_c.dylib
3 libsystem_c.dylib
Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x00000ec0 ebx: 0x03344a41 ecx: 0x0000cec0 edx: 0x0be2c000
edi: 0x0bc21f90 esi: 0x0be2cec0 ebp: 0xbfffdd98 esp: 0xbfffdd50
ss: 0x00000023 efl: 0x00010206 eip: 0x03344ab7 cs: 0x0000001b
ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f
cr2: 0x0be2c001
Logical CPU: 0
0x9933a0ee __workq_kernreturn + 10
0x9958404c _pthread_workq_return + 45
0x99583e19 _pthread_wqthread + 448
0x9956bcca start_wqthread + 30
0x9933a0ee __workq_kernreturn + 10
0x9958404c _pthread_workq_return + 45
0x99583e19 _pthread_wqthread + 448
0x9956bcca start_wqthread + 30
0x9933a0ee __workq_kernreturn + 10
0x9958404c _pthread_workq_return + 45
0x99583e19 _pthread_wqthread + 448
0x9956bcca start_wqthread + 30