iApp raising exception, only in Thai - exception

The iPhone app I am working on is behaving rather normally, up to now.
It supports several languages,but the last one I added (Thai) is giving me trouble.
For some reason it crashes, raising an exception. It seems to happen when I modify the contents of a UITextView, but only in Thai language.
Doing bt in the debug console, I get the trace below.
Can anyone help me make sense of this?
(lldb) bt
* thread #1: tid = 0x1c03, 0x0185ae52 libobjc.A.dylib`objc_exception_throw, stop reason = breakpoint 1.1
frame #0: 0x0185ae52 libobjc.A.dylib`objc_exception_throw
frame #1: 0x0241cdeb CoreFoundation`+[NSException raise:format:] + 139
frame #2: 0x0152ba75 QuartzCore`CA::Layer::set_bounds(CA::Rect const&, bool) + 213
frame #3: 0x0152bd1e QuartzCore`-[CALayer setBounds:] + 154
frame #4: 0x000b8151 UIKit`-[UIView(Geometry) setBounds:] + 336
frame #5: 0x000ca0f8 UIKit`-[UIScrollView setBounds:] + 5493
frame #6: 0x001acb20 UIKit`-[UITextView setBounds:] + 116
frame #7: 0x000ca64d UIKit`-[UIScrollView setContentOffset:] + 728
frame #8: 0x000c66ba UIKit`-[UIScrollViewScrollAnimation setProgress:] + 486
frame #9: 0x0014b0f2 UIKit`-[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 339
frame #10: 0x0014ac58 UIKit`-[UIAnimator(Static) _LCDHeartbeatCallback:] + 67
frame #11: 0x015522d2 QuartzCore`CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 110
frame #12: 0x0155275f QuartzCore`CA::Display::TimerDisplayLink::callback(__CFRunLoopTimer*, void*) + 161
frame #13: 0x023dc376 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
frame #14: 0x023dbe06 CoreFoundation`__CFRunLoopDoTimer + 534
frame #15: 0x023c3a82 CoreFoundation`__CFRunLoopRun + 1810
frame #16: 0x023c2f44 CoreFoundation`CFRunLoopRunSpecific + 276
frame #17: 0x023c2e1b CoreFoundation`CFRunLoopRunInMode + 123
frame #18: 0x023777e3 GraphicsServices`GSEventRunModal + 88
frame #19: 0x02377668 GraphicsServices`GSEventRun + 104
frame #20: 0x00072ffc UIKit`UIApplicationMain + 1211
frame #21: 0x0000265d Cahier`main(argc=1, argv=0xbffff37c) + 141 at main.m:16
frame #22: 0x00002585 Cahier`start + 53
(lldb)

Related

Error while using cenpy library in python

I am working on a project where I need to use census data for a couple of towns in MA. For that, I am using cenpy library ASC data, but I got a key error. The same error happens even when I try the example code described for Chicago. Here is the example code I use and the error I see:
chicago = products.ACS(2017).from_place('Chicago, IL', level='tract',
variables=['B00002*', 'B01002H_001E'])
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File ~\anaconda3\envs\oxe\lib\site-packages\cenpy\tiger.py:192, in ESRILayer.query(self, raw, strict, **kwargs)
191 try:
--> 192 features = datadict["features"]
193 except KeyError:
KeyError: 'features'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
Input In [4], in <cell line: 1>()
----> 1 chicago = products.ACS(2017).from_place('Chicago, IL', level='tract',
2 variables=['B00002*', 'B01002H_001E'])
File ~\anaconda3\envs\oxe\lib\site-packages\cenpy\products.py:791, in ACS.from_place(self, place, variables, level, return_geometry, place_type, strict_within, return_bounds, replace_missing)
788 variables = self._preprocess_variables(variables)
789 variables.append("GEO_ID")
--> 791 geoms, variables, *rest = super(ACS, self).from_place(
792 place,
793 variables=variables,
794 level=level,
795 return_geometry=return_geometry,
796 place_type=place_type,
797 strict_within=strict_within,
798 return_bounds=return_bounds,
799 replace_missing=replace_missing,
800 )
801 variables["GEOID"] = variables.GEO_ID.str.split("US").apply(lambda x: x[1])
802 return_table = geoms[["GEOID", "geometry"]].merge(
803 variables.drop("GEO_ID", axis=1), how="left", on="GEOID"
804 )
File ~\anaconda3\envs\oxe\lib\site-packages\cenpy\products.py:200, in _Product.from_place(self, place, variables, place_type, level, return_geometry, geometry_precision, strict_within, return_bounds, replace_missing)
197 else:
199 placer = "STATE={} AND PLACE={}".format(placerow.STATEFP, placerow.TARGETFP)
--> 200 env = env_layer.query(where=placer)
202 print(
203 "Matched: {} to {} "
204 "within layer {}".format(
(...)
208 )
209 )
211 geoms, data = self._from_bbox(
212 env.to_crs(epsg=4326).total_bounds,
213 variables=variables,
(...)
219 replace_missing=replace_missing,
220 )
File ~\anaconda3\envs\oxe\lib\site-packages\cenpy\tiger.py:198, in ESRILayer.query(self, raw, strict, **kwargs)
196 if details is []:
197 details = "Mapserver provided no detailed error"
--> 198 raise KeyError(
199 (
200 r"Response from API is malformed. You may have "
201 r"submitted too many queries, formatted the request incorrectly, "
202 r"or experienced significant network connectivity issues."
203 r" Check to make sure that your inputs, like placenames, are spelled"
204 r" correctly, and that your geographies match the level at which you"
205 r" intend to query. The original error from the Census is:\n"
206 r"(API ERROR {}:{}({}))".format(code, msg, details)
207 )
208 )
209 todf = []
210 for i, feature in enumerate(features):
KeyError: 'Response from API is malformed. You may have submitted too many queries, formatted the request incorrectly, or experienced significant network connectivity issues. Check to make sure that your inputs, like placenames, are spelled correctly, and that your geographies match the level at which you intend to query. The original error from the Census is:\\n(API ERROR 400:Unable to complete operation.([]))'

Error when creating animation from graph in Octave

I am trying to make an animation from a graph and save the result as GIF or video.
The graph and the animation work well in MATLAB but I cannot save it as GIF.
imread gives this error:
Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-
dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dG
raphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-
sOutputFile=C:\Users ...
I tried the solution from here, but that error pops up.
This is my code:
clear all;
clc;
for m = 1:10
n = m.*100;
x = linspace(0,1500,1500);
x2 = linspace(n,1000+n,500);
y2 = [((20e-6.*n + 0.008).*(sin(pi/1000.*(x2-n))).^2) ];
y1 = zeros(1,n);
y3 = zeros(1,1000-n);
y7 = [y1 y2 y3];
y8 = y7 + 0;
y1 = (sin(pi/150*x)).^2;
y3 = exp((x/400)-5);
y5 = (y1.*y3)+y8;
plot( x,y5);
drawnow;
#pause(0.01);
endfor
im = imread ("animation.pdf", "Index", "all");
imwrite (im, "animation.gif", "DelayTime", .5);
EDIT:
This is the complete error. Directory name redacted for privacy.
Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw"
"-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-sOutputFil
e=C:\Users\XXXXXXXXXXXXXXXXXXXXXXXXXX" "--" "C:\Users\XXXXXXXXXXXXXXXXXXXXXXXXXX" "-c
" "quit" [No such file or directory].
error: Magick++ exception: Magick: Postscript delegate failed (F:\XXXXXXXXXXXXXXXXXXXXXXXXXX\animation.pdf) reported by coders/pdf.c:434 (ReadPDFImage)
error: called from
__imread__ at line 78 column 10
imageIO at line 118 column 26
imread at line 106 column 30
test_animation2 at line 6 column 4
I had the same problem.
For me, the solution was to install or reinstall the GhostScript program.
This was the error message I received:
Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw"
"-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-sOutputFil
e=C:\Users\xxxxxx\AppData\Local\Temp\gmncleNd" "--" "C:\Users\xxxxxx\AppData\Local\Temp\gmEh1Xv4" "
-c" "quit" [No such file or directory].
error: Magick++ exception: Magick: Postscript delegate failed (C:\Users\xxxxxx\Desktop\TexML2.0\IN
entrada\in.pdf) reported by coders/pdf.c:434 (ReadPDFImage)
error: called from
_imread_ at line 80 column 10
imageIO at line 118 column 28
imread at line 106 column 33

Keras --- About Masking Layer followed by a Reshape Layer

I want to using mask before LSTM, but the output of Lstm must be reshape to 4 dim.
So my code:
main_input = Input(shape=(96,1000), name='main_input')
pre_input = BatchNormalization()(main_input)
aaa= Masking(mask_value=0)(pre_input)
recurrent1 = LSTM(256,return_sequences=True)(aaa)
r_out= Reshape((1,96,256))(recurrent1)`
But it runs with error:
[![enter image description here][1]][1]
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-2-d1107015501b> in <module>()
17 recurrent1 = LSTM(256,return_sequences=True)(aaa)
18
---> 19 r_out= Reshape((1,96,256))(recurrent1)
/usr/local/lib/python2.7/dist-packages/keras/engine/topology.pyc in __call__(self, x, mask)
512 if inbound_layers:
513 # this will call layer.build() if necessary
--> 514 self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
515 input_added = True
516
/usr/local/lib/python2.7/dist-packages/keras/engine/topology.pyc in add_inbound_node(self, inbound_layers, node_indices, tensor_indices)
570 # creating the node automatically updates self.inbound_nodes
571 # as well as outbound_nodes on inbound layers.
--> 572 Node.create_node(self, inbound_layers, node_indices, tensor_indices)
573
574 def get_output_shape_for(self, input_shape):
/usr/local/lib/python2.7/dist-packages/keras/engine/topology.pyc in create_node(cls, outbound_layer, inbound_layers, node_indices, tensor_indices)
148 if len(input_tensors) == 1:
149 output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
--> 150 output_masks = to_list(outbound_layer.compute_mask(input_tensors[0], input_masks[0]))
151 # TODO: try to auto-infer shape if exception is raised by get_output_shape_for
152 output_shapes = to_list(outbound_layer.get_output_shape_for(input_shapes[0]))
/usr/local/lib/python2.7/dist-packages/keras/engine/topology.pyc in compute_mask(self, input, input_mask)
605 else:
606 raise Exception('Layer ' + self.name + ' does not support masking, ' +
--> 607 'but was passed an input_mask: ' + str(input_mask))
608 # masking not explicitly supported: return None as mask
609 return None
Exception: Layer reshape_1 does not support masking, but was passed an input_mask: Any{2}.0
I have print out, the outshape of recurrent1 is (96,256)
How could I make it right?

Google Maps SDK Tutorial Crash

I am trying to get Google Maps set up in my iOS application, but am getting a crash on an InvalidArgumentException.
A few people have asked this same question already; however, they have either not gotten helpful responses, or the responses that were given did not solve the problem.
The code is copied directly from Google's Getting Started page:
#import "XXMapViewController.h"
#import <GoogleMaps/GoogleMaps.h>
#interface XXMapViewController ()
#end
#implementation XXMapViewController{
GMSMapView *mapView_;
}
- (void)viewDidLoad
{
[super viewDidLoad];
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86
longitude:151.20
zoom:6];
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
// Creates a marker in the center of the map.
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(-33.86, 151.20);
marker.title = #"Sydney";
marker.snippet = #"Australia";
marker.map = mapView_;
// Do any additional setup after loading the view, typically from a nib.
}
#end
This is the line it crashes on, so I have determined it's not a problem with setting the view:
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
And here is the stack trace (app name is X'd out for anonymity's sake):
2014-04-17 14:24:19.909 XX App[28758:60b] -[GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance 0x10ae45a80
2014-04-17 14:24:19.931 XX App[28758:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance 0x10ae45a80'
*** First throw call stack:
(
0 CoreFoundation 0x0000000103b2b495 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010388a99e objc_exception_throw + 43
2 CoreFoundation 0x0000000103bbc65d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000103b1cd8d ___forwarding___ + 973
4 CoreFoundation 0x0000000103b1c938 _CF_forwarding_prep_0 + 120
5 XX App 0x0000000100189323 -[GMSMapView setCamera:] + 161
6 XX App 0x0000000100187cc2 -[GMSMapView sharedInitWithServices:camera:] + 1440
7 XX App 0x00000001001870be -[GMSMapView initWithFrame:camera:] + 121
8 XX App 0x0000000100186f5f +[GMSMapView mapWithFrame:camera:] + 102
9 XX App 0x000000010000eeae -[XXMapViewController viewDidLoad] + 238
10 UIKit 0x000000010252d59e -[UIViewController loadViewIfRequired] + 562
11 UIKit 0x000000010252d777 -[UIViewController view] + 29
12 UIKit 0x00000001025442c5 -[UINavigationController _startCustomTransition:] + 628
13 UIKit 0x000000010254f6f5 -[UINavigationController _startDeferredTransitionIfNeeded:] + 401
14 UIKit 0x0000000102550238 -[UINavigationController __viewWillLayoutSubviews] + 43
15 UIKit 0x000000010266a895 -[UILayoutContainerView layoutSubviews] + 202
16 UIKit 0x0000000102497993 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 354
17 QuartzCore 0x0000000100e77802 -[CALayer layoutSublayers] + 151
18 QuartzCore 0x0000000100e6c369 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 363
19 QuartzCore 0x0000000100e6c1ea _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
20 QuartzCore 0x0000000100ddffb8 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 252
21 QuartzCore 0x0000000100de1030 _ZN2CA11Transaction6commitEv + 394
22 QuartzCore 0x0000000100de169d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
23 CoreFoundation 0x0000000103af6dc7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
24 CoreFoundation 0x0000000103af6d37 __CFRunLoopDoObservers + 391
25 CoreFoundation 0x0000000103ad6522 __CFRunLoopRun + 946
26 CoreFoundation 0x0000000103ad5d83 CFRunLoopRunSpecific + 467
27 GraphicsServices 0x000000010491cf04 GSEventRunModal + 161
28 UIKit 0x0000000102437e33 UIApplicationMain + 1010
29 XX App 0x000000010000ed93 main + 115
30 libdyld.dylib 0x000000010434c5fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I have added the -ObjC flag to my project, and have tried adding it to the target as others have recommended; however, adding it to the target causes the build to fail. I created a new single view project as well, which worked fine when following the exact same instructions.I have the correct API key and Google Maps for iOS is enabled in my API console. This has been extraordinarily frustrating and a huge wall in the way of finishing my project. If anybody could point me in the right direction I would greatly appreciate it.
It was a conflict with Parse dependencies. The solution was to either eliminate the FB SDK dependencies or to just download the SDK. I chose the latter since I will inevitably be using it with my app.

mysql is not up when it was started?

when i am starting up MySQL galera cluster in one of 3 nodes ,it has not yet come up , Below error message was well found from error log
after that i tried to rebuilding my box from another source again we are getting same issue.
stack_bottom = 4cc4b098 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x35)[0x7d08b5]
/usr/sbin/mysqld(handle_fatal_signal+0x4b4)[0x6a90e4]
/lib64/libpthread.so.0[0x2aec71ffdb10]
/usr/sbin/mysqld[0x5453c7]
/usr/sbin/mysqld[0x545a10]
/usr/sbin/mysqld[0x545ca6]
/usr/sbin/mysqld[0x53d859]
/usr/sbin/mysqld(_Z16acl_authenticateP3THDjj+0x8c0)[0x54ca20]
/usr/sbin/mysqld[0x639a5e]
/usr/sbin/mysqld(_Z16login_connectionP3THD+0x50)[0x639c70]
/usr/sbin/mysqld(_Z22thd_prepare_connectionP3THD+0x2f)[0x639e7f]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x12b)[0x63af1b]
/usr/sbin/mysqld(handle_one_connection+0x51)[0x63b121]
/lib64/libpthread.so.0[0x2aec71ff573d]
/lib64/libc.so.6(clone+0x6d)[0x2aec733460cd]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): Connection ID (thread ID): 18
Status: NOT_KILLED
i was followed below link and recieved preceeding result.
https://dev.mysql.com/doc/refman/5.5/en/using-stack-trace.html
Result
0x40000 (?)
0x7d08b5 my_print_stacktrace + 53
0x6a90e4 handle_fatal_signal + 1204
0x2aec71ffdb10 _end + 1895256184
0x5453c7 _Z7get_mqhPKcS0_P9user_conn + 1527
0x545a10 _Z7get_mqhPKcS0_P9user_conn + 3136
0x545ca6 _Z7get_mqhPKcS0_P9user_conn + 3798
0x53d859 _Z23get_cached_table_accessP22st_grant_internal_infoPKcS2_ + 233
0x54ca20 _Z16acl_authenticateP3THDjj + 2240
0x639a5e _Z30check_for_max_user_connectionsP3THDPK9user_conn + 750
0x639c70 _Z16login_connectionP3THD + 80
0x639e7f _Z22thd_prepare_connectionP3THD + 47
0x63af1b _Z24do_handle_one_connectionP3THD + 299
0x63b121 handle_one_connection + 81
0x2aec71ff573d _end + 1895222437
0x2aec733460cd _end + 1915475509
Please help me how to fix it.
1、In mysql configuration file by adding the following line configuration, try
thread_cache_size=8