I have received the following stacktrace. But I cannot figure out which function from which class has raised this. Can anyone tell me what MainPage..ctor is??
"Frame Image Function Offset
0 coredll.dll xxx_RaiseException 19
1 mscoree3_7.dll 520892
2 mscoree3_7.dll 461967
3 mscoree3_7.dll 534468
4 TransitionStub 0
5 System.InternalTimeZoneInfo.TransitionTimeToDateTime 520
6 System.InternalTimeZoneInfo.GetDaylightTime 100
7 System.InternalTimeZoneInfo.GetIsDaylightSavingsFromUtc 128
8 System.InternalTimeZoneInfo.GetUtcOffsetFromUtc 500
9 System.DateTime.ToLocalTime 164
10 System.DateTime.get_Now 72
11 System.DateTime.get_Today 44
12 xxxx.MainPage..ctor 84
13 mscoree3_7.dll 507848
14 mscoree3_7.dll 184683
15 mscoree3_7.dll 183987
16 mscoree3_7.dll 183375
17 System.Reflection.RuntimeConstructorInfo.InternalInvoke 104
18 System.Reflection.RuntimeConstructorInfo.InternalInvoke 1056
19 System.Activator.InternalCreateInstance 1112"
This is the mainpage constructor:
public MainPage()
{
InitializeButtons();
CreateCalendar();
DisplayHistory();
DisplayStatistics();
}
And inside CreateCalendar I have initialized a variable DateTime currentDate = DateTime.Today; Is this the one creating the trouble?
I suggest to you to move the methods to Page loaded event as follow:
public MainPage()
{
InitializeComponent();
Loaded += MainPage_Loaded; // you may declare it in xaml as well
}
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
CreateCalendar();
DisplayHistory();
DisplayStatistics();
}
Depending on the kind of operations you are performing inside each method -mainly if it envolves UI -it would be recommended to wrap it into a Dispatcher:
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
CreateCalendar(); //assuming this method does not use UI
Dispatcher.BeginInvoke(() =>
{
//asuming these methods use UI
DisplayHistory();
DisplayStatistics();
});
}
Try it out and let us know,,
cheers
In my case this error occasionaly came out of the blue with some insignificant changes. It failed in initialization stage of tests under running Silverlight Unit Test Framework. Changes were made in project that was indirectly referenced from Unit Test project (i.e. Unit Test project referenced Windows Phone library and the library referenced PCL with changes).
It's redundant to say thay the code I added didn't execute at all when the crash happened!
After commenting out new code with bisection method I ended up that commenting a single line stopped throwing the exception. The line was like this:
var items = jData["items"].Select(token => token.ToObject()).ToList();
where jData is JObject instance from well-known Json.NET. Updating to recent version of Json.NET didn't help.
The error is gone after replacing LINQ expression with explicit ugly for loop (scoffing Resharper says "for loop can be converted to LINQ expression).
So I'm starting to believe in magic.
Hope this helps someone.
Related
In this Notebook, we use Explainable AI SDK from Google to load a model, right after saving it. This fails with a message that the model is missing.
But note
the info message saying that the model was saved
checking working/model shows that the model is there.
However, working/model/assets is empty.
Why do we get this error message? How can we avoid it?
model_path = "working/model"
model.save(model_path)
builder = SavedModelMetadataBuilder(model_path)
builder.set_numeric_metadata(
"numpy_inputs",
input_baselines=[X_train.median().tolist()], # attributions relative to the median of the target
index_feature_mapping=X_train.columns.tolist(), # the names of each feature
)
builder.save_metadata(model_path)
explainer = explainable_ai_sdk.load_model_from_local_path(
model_path=model_path,
config=configs.SampledShapleyConfig(path_count=20),
)
INFO:tensorflow:Assets written to: working/model/assets
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
/tmp/ipykernel_26061/1928503840.py in <module>
18 explainer = explainable_ai_sdk.load_model_from_local_path(
19 model_path=model_path,
---> 20 config=configs.SampledShapleyConfig(path_count=20),
21 )
22
/opt/conda/lib/python3.7/site-packages/explainable_ai_sdk/model/model_factory.py in load_model_from_local_path(model_path, config)
128 """
129 if _LOCAL_MODEL_KEY not in _MODEL_REGISTRY:
--> 130 raise NotImplementedError('There are no implementations of local model.')
131 return _MODEL_REGISTRY[_LOCAL_MODEL_KEY](model_path, config)
132
NotImplementedError: There are no implementations of local model.
if we create a java source using below way in oracle
CREATE JAVA SOURCE NAMED "Welcome" AS
public class Welcome {
public static String welcome() {
System.out.println("Welcome "); }
}
/
Where can i see the message ?
Reason for Why I am asking for this Question is .
Right now I am debugging one Email Sending Application(Alerts). The application is working fine for the alerts doesnt have any attachment, but if there is any attachment I am getting Java call Terminated by uncaught Java Exception java.lang.NoClassDefFoundError
The application Flow is as below
PLSQL Package (Here we fetch all the data and call Java Source)
JAVA Source (XXABC_SENDMAIL.sendMail is use to send the mail)
When I put DBMS.output I can reach till the point where JAVA source call is happening , but i need to find , at exactly which place the JAVA error is getting thrown.
I got the EXACT answer from the below link..
http://blogs.dayneo.co.za/2012/11/simplest-way-to-debug-your-oracle-java.html
Direct from the Link
dayneo#RMSD> CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED SimpleSample as
2 public class SimpleSample
3 {
4 public static void simplemsg()
5 {
6 System.out.println(new java.util.Date().toString() + ": Hello world!");
7 }
8 }
9 /
Java created.
dayneo#RMSD> create or replace procedure simplesample_says as
2 language java name 'SimpleSample.simplemsg()';
3 /
Procedure created.
dayneo#RMSD> set serveroutput on size 1000000
dayneo#RMSD> call dbms_java.set_output(1000000);
Call completed.
dayneo#RMSD> begin
2 simplesample_says();
3 end;
4 /
Mon Nov 05 15:37:03 GMT+02:00 2012: Hello world!
PL/SQL procedure successfully completed.
its more or less the same as the
Stack overflow question "where does system.out.println output goes in oracle java class"
but I feel the link fits 100% to my question.
I have the following code.
class MyClass {
private var callbacks: [()->()] = []
func doIt(callback: (()->())?) {
if let callback = callback {
callbacks.append(callback)
}
// ... other code here
}
}
When I build the project in Release it shows the following error:
Command failed due to signal: Abort trap: 6
Assertion failed: (PAI2->use_empty() && "Should not have any uses"), function foldInverseReabstractionThunks, file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.0.52.2/src/swift/lib/SILPasses/SILCombinerVisitors.cpp, line 549.
While running SILFunctionTransform "SIL Combine" on SILFunction "#TFC11AddCallback7MyClass4doItfS0_FGSqFT_T__T".
Note that the error appears only in Release and only in Xcode 7 beta 5. The code worked in Xcode 7 beta 4.
Demo: https://github.com/exchangegroup/add-callback-demo-ios
Looks like a bug in Swift? Submitted a bug report to Apple.
Update
The issue has been resolved in Xcode 7.0 beta 6 (7A192o).
I was having this same problem (beta 5 only).
It was where I was trying to append a closure to an array of closures, it looks to be the same for yours where you have an addCallback method in your MyClass class.
As silly as it is, I got mine to build on release from changing this code:
callbacks.append(newCallback)
to this
callbacks = callbacks + [newCallback]
I'm trying out the Parse SDK in an existing Mac OS X application. I followed the setup steps in the Parse Quickstart guide, including adding an import for the Parse library to my AppDelegate .m file and calling:
[Parse setApplicationId:kParseApplicationID clientKey:kParseClientKey];
in the applicationDidFinishLaunching method. The two constants I use are defined in a Constants file which is also imported.
Towards the end the guide says: "Then copy and paste this code into your app, for example in the viewDidLoad method (or inside another method that gets called when you run your app)"
So I imported the Parse header file into my main view controller .m file and copied and pasted their code into its viewDidLoad method:
PFObject *testObject = [PFObject objectWithClassName:#"TestObject"];
testObject[#"foo"] = #"bar";
[testObject saveInBackground];
When this runs, I hit an exception whose message is "setObjectForKey: key cannot be nil" on that last line. Not on the previous line where I'm actually setting the object for the key. Furthermore, if I stop on the previous line and PO testObject, testObject.allKeys, or testObject[#"foo"], they all show non-nil values for the key "foo". And still furthermore, if I move this code to the end of the AppDelegate's applicationDidFinishLaunching method, the code executes without any errors, and the TestObject shows up in my Parse application dashboard.
Can somebody tell me what I'm doing wrong? I'd really like to explore further, but this is a real blocker for me.
Here's the console log from a slightly more involved OS X app, also occurring on [ParseObject saveInBackgroundWithBlock:]:
2015-06-03 16:55:56.046 TestApp [15795:15954566] An uncaught exception was raised
2015-06-03 16:55:56.046 TestApp [15795:15954566] *** setObjectForKey: key cannot be nil
2015-06-03 16:55:56.046 TestApp [15795:15954566] (
0 CoreFoundation 0x00007fff8fb0103c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff978e476e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8f9e7c66 -[__NSDictionaryM setObject:forKey:] + 1174
3 ParseOSX 0x000000010011adbb __74-[PFMultiProcessFileLockController beginLockedContentAccessForFileAtPath:]_block_invoke + 129
4 libdispatch.dylib 0x000000010026cd43 _dispatch_client_callout + 8
5 libdispatch.dylib 0x000000010026e0b1 _dispatch_barrier_sync_f_invoke + 348
6 ParseOSX 0x000000010011ad15 -[PFMultiProcessFileLockController beginLockedContentAccessForFileAtPath:] + 127
7 ParseOSX 0x00000001000f61ea +[PFObject(Private) _objectFromDataFile:error:] + 207
8 ParseOSX 0x000000010010f231 +[PFUser(Private) _getCurrentUserWithOptions:] + 611
9 ParseOSX 0x00000001000fc4bd -[PFObject(Private) saveAsync:] + 118
10 ParseOSX 0x00000001000e1d25 -[PFTaskQueue enqueue:] + 188
11 ParseOSX 0x00000001000ff06b -[PFObject saveInBackground] + 121
12 ParseOSX 0x00000001000ff270 -[PFObject saveInBackgroundWithBlock:] + 49
13 TestApp 0x0000000100001827 +[SBTParseTranslation saveDBObjectToParse:] + 183
14 TestApp 0x0000000100031fb4 -[SWBMainWindowViewController showRecordForItem:] + 3124
15 TestApp 0x0000000100031268 -[SWBMainWindowViewController showRecordForID:] + 184
16 TestApp 0x0000000100031080 -[SWBMainWindowViewController finishLoad] + 448
17 TestApp 0x0000000100030eb1 -[SWBMainWindowViewController loadData] + 97
18 TestApp 0x0000000100030dd5 -[SWBMainWindowViewController viewDidLoad] + 725
This was caused by a case of confusion on my part. I work mostly on iOS projects, where applicationDidFinishLaunching can typically be counted on to have run before viewControllers load. Apparently that isn't the case in OS X apps.
In short, I was calling the ParseObject save methods before [Parse setApplicationID: clientKey] had been called.
In my case ios7 was crashing with saveInBackground since podfile contained:
platform :ios, '8.0'
and deployment target was 7.0. I replaced with
platform :ios, '7.0'
then clean and build again
unregister_chrdev() call from [linux\fs.h] used to return 0 if successful and <0 other wise. But now, in newer kernel versions, the return value of the function has been changed to void so it no longer returns any thing.
Question: Is there any way to find out if the unregister_chrdev() call was successful or not?
The return of void was done by changeset: e53252d97e670a38b1d2e9723b48077bba11ddda
commit e53252d97e670a38b1d2e9723b48077bba11ddda
Author: Akinobu Mita
Date: Thu Jul 19 01:47:51 2007 -0700
unregister_chrdev() return void
unregister_chrdev() does not return meaningful value. This patch makes it
return void like most unregister_* functions.
In fact if you look at the code before (from 2.6.12-rc2 onwards) you can see it always returned 0 so this is a function that is always expected to succeed.