SVG stroke gradient causes horizontal lines to display on iOS Safari - ios

Adding a radial gradient to my SVG path seems to cause weird horizontal (anti-aliasing?) lines on some iOS devices or when you zoom in/out on an iOS device. I wasn't able to replicate it anywhere else.
Here's the (isolated) code:
<svg class="componentClass__chart-svg" width="335" height="318" viewBox="0 0 335 320" xmlns="http://www.w3.org/2000/svg">
<defs>
<radialGradient id="axesGradient" cx="50%" cy="0%" fx="50%" fy="0%" r="50%">
<stop stop-color="#FFFFFF" offset="10%"></stop>
<stop stop-color="#FFFFFF" offset="100%" stop-opacity="0.2"></stop>
</radialGradient>
</defs>
<path class="componentClass__axes" stroke-width="2" stroke="url(#axesGradient)" fill="none" d="M151 12 Q167 0 183 12 L319 108 Q335 120 329 139 L276 299 Q270 318 250 318 L85 318 Q65 318 59 299 L6 139 Q0 120 16 108 Z
M151 37 Q167 25 183 37 L293 116 Q309 128 303 147 L260 275 Q254 294 234 294 L101 294 Q81 294 75 275 L32 147 Q26 128 42 116 Z
M151 62 Q167 50 183 62 L267 124 Q283 136 277 155 L244 251 Q238 270 218 270 L117 270 Q97 270 91 251 L58 155 Q52 136 68 124 Z
M151 87 Q167 75 183 87 L241 132 Q257 144 251 163 L228 227 Q222 246 202 246 L133 246 Q113 246 107 227 L84 163 Q78 144 94 132 Z
M152 113 Q167 100 183 113 L215 139 Q231 152 224 171 L213 203 Q206 222 186 222 L149 222 Q129 222 122 203 L111 171 Q104 152 119 139 Z
" />
</svg>
And the issue:
SVG showing horizontal line
Note this doesn't happen on every iPhone or iPad, but you're usually able to replicate it when you try zooming in and out.
I was able to nail down the issue to this particular use case: as soon as you add the gradient to the stroke, it starts happening. If you change stroke="url(#axesGradient) to just stroke="#FFF", it doesn't seem to happen.
Is there any way I can optimize the SVG to prevent rendering issues?
Here's a Codepen with the exact code above.

Had the same problem, but in my case these lines appeared in any browser on IOS 16, updating to IOS 16.3 fixed it

Related

Export datas from mongodb using mongoexport from a specific time range with query and timestamp

I'm trying to export a collection from mongodb using mongoexport. This works so far:
mongoexport.exe --db dataloggin --collection p1 --out myRecords.json
The problem is that the file is huge and I can not open it anymore (araound 20GB, 30 days, every half a second a document).
I just need the data between the 3. March and the 5 March, so I tried to select this date range with the query selector as following:
mongoexport.exe --db dataloggin --collection p1 -q='{"timestamp":{"$gte":{"$timestamp":"2016-03-3T00:00:00.000Z"}:},"timestamp":{"$lt":{"$timestamp":"2016-03-05T00:00:00.000Z"}}}' --out myRecords.json
But I get an error:
error validating settings: query '[39 123 116 105 109 101 115 116 97 109 112 58 123 36 103 116 101 58 123 36 116 105 109 101 115 116 97 109 112 58 50 48 49 54 45 48 49 45 48 49 84 48 48 58 48 48 58 48 48 46 48 48 48 90 125 58 125 44 116 105 109 101 115 116 97 109 112 58 123 36 108 116 58 123 36 116 105 109 101 115 116 97 109 112 58 50 48 49 54 45 48 49 45 48 49 84 48 48 58 48 48 58 48 48 46 48 48 48 90 125 125 125 39]' is not valid JSON: json: cannot unmarshal string into Go value of type map[string]interface {}
Someone have an idea?
Many Thanks and regards

How to overcome with this error when using Networkx's kernighan_lin_bisection

I want to use kernighan_lin_bisection from Networkx to separate a network data.
But the error below showed up and I'm stuck.
It would be highly appreciated if you could help me overcome this error.
QT-------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in ()
17 for c in init_partition:
18 for n in c:
---> 19 color_map_i[n]=colors[counter]
20 counter=counter+1
21
IndexError: list assignment index out of range
UNQT---------------------------------------------------------------------------
The coding I used and data source"200224_04_act.prn" are below.
QT---------------------------------------------------
G=nx.read_edgelist("200224_04_act.prn",nodetype=int)
colors=["red","blue","green"]
pos=nx.spring_layout(G)
init_nodes=np.array_split(G.nodes(),2)
init_partition=[set(init_nodes[0]),set(init_nodes[1])]
print(init_partition)
from networkx.algorithms.community import kernighan_lin_bisection
color_map_i=["black"]*nx.number_of_nodes(G)
print(color_map_i)
counter=0
for c in init_partition:
for n in c:
color_map_i[n]=colors[counter]
counter=counter+1
print(color_map_i)
nx.draw_networkx_edges(G,pos)
nx.draw_networkx_nodes(G,pos,node_color=color_map_i)
nx.draw_networkx_labels(G,pos)
plt.axis("off")
plt.show()
lst_b=kernighan_lin_bisection(G,partition=init_partition)
color_map_b=["black"]*nx.number_of_nodes(G)
counter=0
for c in lst_b:
for n in c:
color_map_b[n]=colors[counter]
counter=counter+1
nx.draw_networkx_edges(G,pos)
nx.draw_networkx_nodes(G,pos,node_color=color_map_b)
nx.draw_networkx_labels(G,pos)
plt.axis("off")
plt.show()
UNQT--------------------------------------------------------------
"200224_04_act.prn" below.(Number of nodes is around 2000 but I made it
small due to the limit of number of character)
1 415
2 415
3 415
3 1350
4 1351
5 1352
6 383
7 993
8 1353
9 887
10 887
11 887
12 887
13 887
14 1185
15 1185
16 1185
17 1185
18 1185
19 1146
20 1146
21 1146
22 1146
21 776
23 776
24 707
25 707
26 707
27 707
28 707
29 754
21 754
30 754
31 754
32 754
33 778
34 778
35 778
36 778
37 778
38 859
39 859
40 1354
41 563
42 563
43 563
44 563
45 563
46 1209
47 1209
48 1209
49 1209
50 1209
51 715
52 715
53 715
54 715
55 715
56 1048
57 1048
58 1047
59 1047
60 1047
61 1047
62 1047
63 718
64 718
65 718
66 718
67 718
68 947
17 947
69 947
70 889
71 744
72 744
73 744
74 744
75 744
76 1137
77 1137
78 1137
79 1137
80 612
81 612
82 612
83 612
17 612
84 790
85 790
86 790
87 790
88 790
89 922
90 922
91 922
92 922
93 922
21 738
94 738
95 738
96 738
97 738
98 1355
81 807
99 807
17 807
100 725
101 725
17 725
102 725
103 725
23 1046
104 661
105 661
106 661
107 661
108 661
109 907
110 907
111 907
112 907
113 907
114 840
115 840
116 840
117 840
17 840
118 759
23 759
119 759
23 761
120 761
121 761
122 761
123 1356
124 1265
125 1265
126 1265
127 1265
128 1265
129 894
29 894
130 894
131 894
132 667
133 667
124 758
134 758
135 758
122 758
136 758
137 471
138 471
You've got
for c in init_partition:
for n in c:
color_map_i[n]=colors[counter]
counter=counter+1
It looks to me like n will loop over all of the nodes of the graph. I do not see any entries in the graph that are 0. So probably the nodes are numbered 1 to N, while color_map_i is indexed from 0 to N-1. So it would break when n=N.
A good way to hunt for bugs like this in general would be to print n right before the line giving the error. This would give a hint to what the problem is.

Why does calcHist in Opencv produce 0 array in output?

I do hist calculation using OpenCV. I have the following implementation.
//Check image
for (int i = 0; i < block.rows; i++)
{
unsigned char *ptr = block.ptr<unsigned char>(i);
for (int j = 0; j < block.cols; j++)
{
cout << (int)ptr[j] << " ";
}
cout << endl;
}
//That gave
240 130 176 129 96 122 192 127 240 123 112 122 64 121 80 118 128 129 224 119
160 138 176 132 144 128 144 132 64 128 64 126 16 128 16 129 112 126 64 127
128 128 96 133 240 124 240 132 96 126 32 124 144 128 144 129 176 128 144 124
0 136 112 136 80 131 64 131 16 132 48 131 0 128 224 129 240 126 144 129
16 132 240 138 160 132 64 134 16 131 112 129 208 126 0 128 16 126 176 122
208 139 176 133 176 135 240 138 176 136 80 131 128 133 192 132 64 129 144 132
32 136 176 138 224 139 224 136 80 127 160 135 144 132 64 131 192 131 48 126
80 144 192 138 16 136 192 138 240 135 112 135 32 133 208 132 32 130 64 130
144 141 144 135 48 139 32 135 32 134 112 134 80 130 160 126 144 131 96 128
80 144 208 139 112 141 16 137 96 138 48 134 0 136 96 137 32 135 192 130
208 143 224 140 64 140 240 132 224 132 96 133 160 133 96 134 0 129 96 131
128 148 144 140 128 139 96 139 32 136 48 135 80 132 96 137 0 133 240 140
208 136 96 144 64 137 144 135 16 135 16 132 0 134 160 136 128 134 128 132
240 147 176 144 160 138 176 144 176 139 160 143 224 135 128 137 96 139 160 136
176 139 144 133 240 142 192 139 112 133 112 135 208 131 208 132 128 135 48 133
32 150 0 144 128 139 0 141 64 142 32 136 16 137 112 136 16 137 48 133
128 143 0 141 48 141 192 135 128 144 16 138 80 136 192 134 16 134 160 131
0 144 144 148 16 143 48 136 144 140 144 138 160 136 192 137 80 138 160 136
16 142 32 141 192 140 160 135 32 136 192 135 192 135 240 135 48 138 0 143
208 142 96 149 160 146 208 146 32 138 192 141 112 136 208 138 96 142 160 137
128 145 64 142 16 136 0 137 144 132 32 136 96 138 48 136 240 131 208 130
48 142 128 143 128 143 160 149 208 140 16 142 176 137 208 136 240 138 0 143
192 146 160 141 112 144 96 143 112 135 224 140 96 135 176 135 80 135 128 135
48 144 224 147 0 139 48 139 128 142 224 143 0 144 80 140 16 139 192 140
0 146 160 143 176 138 160 146 240 135 128 136 176 137 192 134 192 136 112 136
208 147 16 143 80 149 112 146 224 134 16 145 48 141 224 138 128 137 112 135
64 146 0 140 192 140 0 143 208 140 96 138 128 137 176 138 208 138 48 135
64 148 224 142 16 140 64 143 112 137 64 141 64 143 224 135 80 138 80 138
240 143 240 142 64 145 0 142 208 142 128 139 0 136 240 141 48 138 80 137
64 147 32 148 112 145 80 140 64 143 112 144 0 139 112 137 176 136 80 143
48 148 64 146 144 142 160 139 176 140 0 140 144 139 32 138 80 137 112 139
208 145 192 145 96 148 240 145 128 139 16 141 80 142 224 137 16 144 208 140
240 142 96 139 176 148 16 139 96 143 16 141 32 139 176 141 48 134 192 141
128 147 64 145 80 150 112 140 112 143 240 142 96 143 224 139 192 143 144 137
0 148 80 145 128 142 48 146 160 140 32 141 192 139 16 136 176 138 16 143
48 149 80 143 80 144 112 144 64 144 208 143 96 142 192 142 240 138 48 138
192 143 48 149 176 145 176 142 64 142 160 139 16 138 128 139 64 139 192 138
192 147 224 144 64 143 64 148 0 144 96 143 32 147 208 142 64 141 224 137
112 146 208 144 96 141 64 142 208 141 112 138 144 138 80 135 16 140 176 140
208 146 96 144 112 148 112 146 112 147 192 148 16 141 32 143 224 137 80 140
128 149 96 146 224 144 32 141 240 144 112 136 192 141 64 139 96 135 144 138
160 144 80 149 208 146 96 145 128 142 64 142 64 147 208 141 144 141 16 141
48 145 192 145 32 140 176 142 0 143 96 136 160 139 80 136 192 138 96 138
32 151 224 152 208 143 112 142 0 142 144 145 176 145 0 139 240 141 32 139
112 142 0 139 176 136 64 140 128 140 64 135 64 139 128 140 64 137 96 138
128 150 0 153 32 146 208 140 80 149 240 141 240 136 224 140 160 140 32 146
240 141 160 142 192 144 208 138 112 141 144 138 128 138 48 135 176 140 16 135
96 150 176 148 80 142 224 142 16 148 208 140 240 136 224 141 32 140 144 137
192 139 0 144 64 142 144 143 32 139 192 138 160 139 208 137 80 140 96 134
48 148 192 146 16 149 0 141 144 137 32 140 192 142 176 138 240 140 16 138
80 146 144 142 80 143 192 137 224 141 176 140 80 139 128 138 64 135 144 134
160 146 208 143 160 143 0 145 112 140 224 144 208 142 80 144 0 138 144 142
144 143 48 139 32 141 0 147 16 140 0 143 176 140 128 133 176 139 160 134
176 150 240 145 64 146 144 142 96 138 240 141 128 141 112 140 128 137 160 135
176 140 128 139 224 144 160 138 208 138 224 135 48 139 208 132 160 137 96 134
208 143 112 148 0 141 96 143 96 136 32 143 176 138 240 139 160 141 176 141
176 148 176 142 112 140 16 143 96 136 80 139 240 139 144 138 160 139 160 137
96 145 32 151 224 142 96 143 48 143 96 141 112 135 48 141 240 136 80 138
80 145 0 140 64 141 48 144 32 141 208 137 80 136 192 134 32 135 16 137
64 147 48 148 240 143 208 139 112 140 240 138 176 141 32 144 64 138 64 139
160 142 208 141 160 142 48 140 208 138 80 136 160 137 48 141 224 137 96 134
64 149 48 147 32 142 80 148 176 142 192 142 208 138 48 139 112 136 64 139
144 144 96 143 240 140 240 138 160 140 0 140 0 135 208 133 32 134 192 132
80 143 0 145 128 140 48 143 208 141 96 143 96 139 192 138 0 139 112 140
96 144 80 140 64 144 32 141 192 137 32 138 176 137 80 137 80 138 0 136
64 147 144 145 208 140 64 138 144 145 224 137 48 140 0 140 96 139 192 134
64 141 208 143 128 144 80 135 192 135 112 139 176 135 128 139 144 135 128 134
80 145 32 146 80 142 64 143 192 143 176 140 224 142 112 141 32 139 144 141
96 141 64 141 240 143 224 136 48 142 160 132 192 136 160 136 64 137 32 134
224 147 192 144 96 145 16 140 192 142 128 138 0 141 0 145 176 136 96 140
128 146 16 143 160 139 176 141 192 138 208 137 48 141 160 129 96 137 144 134
112 145 32 146 208 135 240 139 240 137 192 142 176 132 96 138 144 131 16 140
64 143 112 141 112 142 0 140 160 141 0 135 240 136 224 141 112 137 64 134
160 144 80 143 160 145 192 141 96 135 80 140 240 134 224 138 48 137 176 137
64 140 80 138 0 138 64 136 48 136 128 133 16 133 224 132 80 135 224 133
224 142 16 146 80 145 224 137 144 138 160 138 160 132 64 137 112 133 0 135
224 140 80 141 0 138 112 135 0 132 144 136 240 131 112 137 208 133 0 135
16 143 32 139 32 142 160 138 96 133 128 136 112 132 16 136 176 133 112 136
96 141 0 138 96 133 176 136 112 133 176 136 240 126 0 131 16 127 80 130
112 142 160 138 0 136 16 140 192 132 48 138 64 136 176 135 208 130 160 140
So pixel values are there.
//Histogram calculation
int histbin = 128;//quantize
int histSize[] = { histbin };
float range[] = { 0, 255 };
const float *ranges[] = { range };
Mat hist;
int channels[] = { 0};
calcHist(&block, 1, channels, Mat(), hist, 1, histSize, ranges, true, false);
//Print output
for (int h = 0; h < histbin; h++)
{
float binVal = hist.at<float>(h);
cout << " " << binVal;
}
I have outputs as follow.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
What is wrong with my implementation?

MonoTouch random crash on device, not on simulator

I am thinking this is somehow memory related, but I have done everything I can think of. I have made sure classes are disposed property. Maintained hard references at the class level instead of function scope, for things that might be getting GC'd while I am using them, etc.
Basically the app works fine in the simulator, but crashes at the same spot on a real device. Seems like I get a few different stacks, but they are all around the same place.
I am using a large amount of events in my application. Too many threads?
Stacktrace:
at Newtonsoft.Json.JsonWriter.WriteValue (object) at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue
(Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.WriteMemberInfoProperty
(Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject
(Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonObjectContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue
(Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList
(Newtonsoft.Json.JsonWriter,Newtonsoft.Json.Utilities.IWrappedCollection,Newtonsoft.Json.Serialization.JsonArrayContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue
(Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.WriteMemberInfoProperty
(Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject
(Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonObjectContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue
(Newtonsoft.Json.JsonWriter,object,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContract)
at
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize
(Newtonsoft.Json.JsonWriter,object) at
Newtonsoft.Json.JsonSerializer.SerializeInternal
(Newtonsoft.Json.JsonWriter,object) at
Newtonsoft.Json.JsonSerializer.Serialize
(Newtonsoft.Json.JsonWriter,object) at
RestSharp.Serializers.JsonSerializer.Serialize (object) [0x0001c] in
/Users/sonmez56/Projects/TrackAbout.Mono/RestSharp/RestSharp/Serializers/JsonSerializer.cs:64
at RestSharp.RestRequest.AddBody (object,string) [0x00019] in
/Users/sonmez56/Projects/TrackAbout.Mono/RestSharp/RestSharp/RestRequest.cs:203
at RestSharp.RestRequest.AddBody (object) [0x00000] in
/Users/sonmez56/Projects/TrackAbout.Mono/RestSharp/RestSharp/RestRequest.cs:232
at
TrackAboutMonoCore.Services.TrackAboutAPIRequestBuilder/TARestRequest.WithBody
(T) <0x00097> at
TrackAboutMonoCore.Services.ActionsService.CustomerSetVolume
(int,System.Collections.Generic.List1<TrackAboutMonoCore.Models.Asset>,System.Action1>)
[0x00000] in
/Users/sonmez56/Projects/TrackAbout.Mono/TrackAboutMonoCore/Services/ActionsService.cs:24
at TrackAboutMonoCore.Controllers.LocateController.Save
(object,System.EventArgs) [0x00055] in
/Users/sonmez56/Projects/TrackAbout.Mono/TrackAboutMonoCore/Controllers/LocateController.cs:64
at MonoTouch.UIKit.UIBarButtonItem/Callback.Call
(MonoTouch.Foundation.NSObject) [0x00010] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/UIBarButtonItem.cs:23
at (wrapper runtime-invoke) object.runtime_invoke_dynamic
(intptr,intptr,intptr,intptr) <0xffffffff> at
MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c]
in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at TrackAboutIOS.Application.Main (string[]) [0x00000] in
/Users/sonmez56/Projects/TrackAbout.Mono/TrackAboutIOS/TrackAboutIOS/Main.cs:16
at (wrapper runtime-invoke) object.runtime_invoke_dynamic
(intptr,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
0 TrackAboutIOS 0x01d20618
mono_handle_native_sigsegv + 280 1 TrackAboutIOS
0x01d45bd4 sigabrt_signal_handler + 180 2 libsystem_c.dylib
0x376647ed _sigtramp + 48 3 libsystem_c.dylib
0x3765a20f pthread_kill + 54 4 libsystem_c.dylib
0x3765329f abort + 94 5 TrackAboutIOS
0x01e394ac monoeg_g_log + 208 6 TrackAboutIOS
0x01d11664 get_numerous_trampoline + 160 7 TrackAboutIOS
0x01d11aac mono_aot_get_imt_thunk + 56 8 TrackAboutIOS
0x01dbdc50 initialize_imt_slot + 112 9 TrackAboutIOS
0x01dbf1c4 build_imt_slots + 1124 10 TrackAboutIOS
0x01dbf32c mono_vtable_build_imt_slot + 120 11 TrackAboutIOS
0x01d236fc mono_convert_imt_slot_to_vtable_slot + 292 12
TrackAboutIOS 0x01d23974 common_call_trampoline
+ 284 13 TrackAboutIOS 0x01d21c60 mono_vcall_trampoline + 228 14 TrackAboutIOS
0x00934198 generic_trampoline_vcall + 136 15 TrackAboutIOS
0x00b9fec4
Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeValue_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1116 16 TrackAboutIOS 0x00ba13bc Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_WriteMemberInfoProperty_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1712 17 TrackAboutIOS 0x00ba2a70 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeObject_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonObjectContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1784 18 TrackAboutIOS 0x00ba0124 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeValue_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1724 19 TrackAboutIOS 0x00ba3ec0 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeList_Newtonsoft_Json_JsonWriter_Newtonsoft_Json_Utilities_IWrappedCollection_Newtonsoft_Json_Serialization_JsonArrayContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 2520 20 TrackAboutIOS 0x00ba041c Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeValue_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 2484 21 TrackAboutIOS 0x00ba13bc Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_WriteMemberInfoProperty_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1712 22 TrackAboutIOS 0x00ba2a70 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeObject_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonObjectContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1784 23 TrackAboutIOS 0x00ba0124 Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_SerializeValue_Newtonsoft_Json_JsonWriter_object_Newtonsoft_Json_Serialization_JsonContract_Newtonsoft_Json_Serialization_JsonProperty_Newtonsoft_Json_Serialization_JsonContract + 1724 24 TrackAboutIOS 0x00b9f70c Newtonsoft_Json_Serialization_JsonSerializerInternalWriter_Serialize_Newtonsoft_Json_JsonWriter_object
+ 356 25 TrackAboutIOS 0x00b2c52c Newtonsoft_Json_JsonSerializer_SerializeInternal_Newtonsoft_Json_JsonWriter_object
+ 300 26 TrackAboutIOS 0x00b2c3b4 Newtonsoft_Json_JsonSerializer_Serialize_Newtonsoft_Json_JsonWriter_object
+ 156 27 TrackAboutIOS 0x012010c0 RestSharp_Serializers_JsonSerializer_Serialize_object + 452 28
TrackAboutIOS 0x011f8ad0
RestSharp_RestRequest_AddBody_object_string + 396 29 TrackAboutIOS
0x011f8e4c RestSharp_RestRequest_AddBody_object + 152 30
TrackAboutIOS 0x011d3c64
TrackAboutMonoCore_Services_TrackAboutAPIRequestBuilder_TARestRequest_WithBody_T_T
+ 152 31 TrackAboutIOS 0x011d22d4 TrackAboutMonoCore_Services_ActionsService_CustomerSetVolume_int_System_Collections_Generic_List_1_TrackAboutMonoCore_Models_Asset_System_Action_1_RestSharp_RestResponse_1_TrackAbout_Rest_Models_TARestResponse
+ 328 32 TrackAboutIOS 0x011ce3bc TrackAboutMonoCore_Controllers_LocateController_Save_object_System_EventArgs
+ 960 33 TrackAboutIOS 0x0139003c MonoTouch_UIKit_UIBarButtonItem_Callback_Call_MonoTouch_Foundation_NSObject
+ 96 34 TrackAboutIOS 0x008b0450 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 200 35 TrackAboutIOS 0x01d05834 mono_jit_runtime_invoke + 1644 36 TrackAboutIOS
0x01dbd09c mono_runtime_invoke + 128 37 TrackAboutIOS
0x01e4c054 monotouch_trampoline + 3436 38 CoreFoundation
0x30c7f3fd -[NSObject performSelector:withObject:withObject:] + 52 39
UIKit 0x3353efaf -[UIApplication
sendAction:to:from:forEvent:] + 62 40 UIKit
0x3360476b -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 118
41 CoreFoundation 0x30c7f3fd -[NSObject
performSelector:withObject:withObject:] + 52 42 UIKit
0x3353efaf -[UIApplication sendAction:to:from:forEvent:] + 62 43
UIKit 0x3353ef6b -[UIApplication
sendAction:toTarget:fromSender:forEvent:] + 30 44 UIKit
0x3353ef49 -[UIControl sendAction:to:forEvent:] + 44 45 UIKit
0x3353ecb9 -[UIControl(Internal) _sendActionsForEvents:withEvent:] +
492 46 UIKit 0x3353f5f1 -[UIControl
touchesEnded:withEvent:] + 476 47 UIKit
0x3353dad3 -[UIWindow _sendTouchesForEvent:] + 318 48 UIKit
0x3353d4c1 -[UIWindow sendEvent:] + 380 49 UIKit
0x3352383d -[UIApplication sendEvent:] + 356 50 UIKit
0x335230e3 _UIApplicationHandleEvent + 5826 51 GraphicsServices
0x33e1322b PurpleEventCallback + 882 52 CoreFoundation
0x30cf9523 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION
+ 38 53 CoreFoundation 0x30cf94c5 CFRunLoopDoSource1 + 140 54 CoreFoundation 0x30cf8313 __CFRunLoopRun + 1370 55 CoreFoundation
0x30c7b4a5 CFRunLoopRunSpecific + 300 56 CoreFoundation
0x30c7b36d CFRunLoopRunInMode + 104 57 GraphicsServices
0x33e12439 GSEventRunModal + 136 58 UIKit
0x33551e7d UIApplicationMain + 1080 59 TrackAboutIOS
0x01696c74
wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string_intptr_intptr
+ 240 60 TrackAboutIOS 0x00098420 TrackAboutIOS_Application_Main_string__ + 152 61 TrackAboutIOS
0x008b0450
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 200 62 TrackAboutIOS 0x01d05834 mono_jit_runtime_invoke + 1644 63 TrackAboutIOS
0x01dbd09c mono_runtime_invoke + 128 64 TrackAboutIOS
0x01dc16b4 mono_runtime_exec_main + 436 65 TrackAboutIOS
0x01dc1a74 mono_runtime_run_main + 756 66 TrackAboutIOS
0x01d0c744 mono_jit_exec + 140 67 TrackAboutIOS
0x01e41110 main + 2288 68 TrackAboutIOS
0x0009826c start + 52
There's normally an exception type and message before the line:
Stacktrace:
It usually provides a good hint of the issue. Now the native stack trace also gives a clue here:
0x01e394ac monoeg_g_log + 208 6 TrackAboutIOS
0x01d11664 get_numerous_trampoline + 160 7 TrackAboutIOS
The first line tells us something was printed (or at least it tried to print) in your logs. It you check your device's log (e.g. using Xcode or mtouch --logdev) you should see the message.
The next line makes me think you're running out of trampolines (the error message will tell you which type). Here are the instructions on how to augment the number of trampolines available for your application.
Note: in case this is not trampoline-related please edit your question to add the exception type/message and the content of your device's log.

Convert PNG images to pixel gray-level values feature vectors

I am a newbie in MATLAB and I have a set of bmp images which I need to convert into pixel gray-level values as feature vectors of image. Can anyone suggest me the way how I can do that?
I need to use these pixel gray-level values as features and then perform operations like PCA/LDA.
I tried imread() but it returns me a matrix.. I feel feature vector will be just one row vector.
Regards,
imread() is the correct way to do it. Then just convert from a matrix into a vector. For example:
>> X = randi(255, 10)
X =
208 41 168 181 112 71 192 215 90 20
231 248 10 9 98 174 66 65 212 14
33 245 217 71 196 168 130 208 150 136
233 124 239 12 203 42 179 63 141 199
162 205 174 25 48 31 228 237 234 239
25 37 194 210 125 128 245 90 73 34
72 108 190 178 114 245 140 51 194 146
140 234 101 81 165 87 36 65 193 120
245 203 168 243 181 150 39 158 98 4
247 245 44 9 193 58 66 121 145 86
>> X(:)
ans =
208
231
33
233
162
25
72
140
245
247
...
Then you can just stack your different observations together with [] and do PCA.

Resources