After using DynamicComposableModel and editing my method in debugger, my Pharo 6.1 image has reached this state:
Instance of SpecLayout did not understand #visibleSlots
and
Instance of SpecLayout did not understand #instVarNames
. I cannot "File Out" my code because of these errors. I cannot even browse my class, which is actually called "UIVidya" and should be defined by
ComposableModel subclass: #UIVidya
instanceVariableNames: 'vidya listE editE tabmgr'
classVariableNames: ''
poolDictionaries: ''
category: 'vkVidya'!
. In the broken image, UIVidya classLayout returns SpecLayout. In a healthy image, UIVidya classLayout returns FixedLayout. I did not make this change on purpose and do not even know how it happened. Can I heal my broken Pharo image in-place, without abandoning the last changes?
It doesn't look like your image is broken. The second error message suggests that you have an instance of SpecLayout where a class (presumably SpecLayout) is expected. Try defining the methods
instVarNames
^self class instVarNames
visibleSlots
^self class visibleSlots
on the instance side of SpecLayout to see if you can keep going and find the broken object. You can always come back here with more info. Once you have repaired the problem, don't forget to remove the new spurious methods.
I was able to restore normalcy by doing this in Playground:
UIVidya layout: sdfgh
(which is the same as UIVidya layout: nil). Thanks for your attention, what really helped was aggressive use of the System Browser and Playground to compare broken and non-broken Pharo instances. Now I can "File Out" my code!
EDIT:
The problem came from outdated tutorial at https://benjamin.vanryseghem.com/projects/spec/docs/dynamic/ which includes code that sends layout:. Don't do that in modern Pharo!
Related
When I try to open promotions on HMC it throw this error,
first Couldn't understand problem and cause of problem?
Try to clear cookies, login/logout, restart browser as well -looks nothing works. (check this link for more detail, can't find anything
https://answers.sap.com/questions/12761785/promotion-not-opening-from-hmc.html )
Try to check this: ( https://answers.sap.com/questions/12750795/cannot-create-jalo-instance-for-item-due-to-null-d.html?childToView=12798465#answer-12798465 ) clearing orphan type helps sometime.
If any one can guide how to solve this issue and explain cause of this issue.
Promotion Not Opening from HMC: Unhandled Exception:
de.hybris.platform.jalo.JaloSystemException: Cannot create Jalo
instance for item 000000 due to null
JaloSystemException is the mother of all Runtime exceptions in Hybris. So, the exception alone is not very informative.
The following comment i.e.
Cannot create Jalo instance for item
suggests that Hybris is trying to create an instance of a custom type, the definition of which (in items.xml) does not exist anymore. Either the definitions were removed manually or they were lost during system migration.
Ideally, deleting orphans should resolve this.
If you are still getting the error after removing the orphan types then -
Either there is some legacy code that is trying to create an instance of the custom types, most probably through a factory, otherwise, it would have given a compilation error during build itself.
The deleted custom type had a relation with the existing types, probably with the Promotion.
The ultimate solution is to run initialize on your local.
**Be very careful while running initialize as it will remove all the data from your system.
I've been receiving a strange error after hot-reloading my code:
Logs (I'll provide them in text form if needed)
The error references a Notice Range Sphere component. It's just a UDetectionSphere, a simple wrapper for USphereComponent. It used to work correctly, I think the problems begun when I re-parented BaseEnemy from ACharacter to ABaseEntity (see class graph). The game seems to work fine, but the fact that there is an error can't be a good thing. I also can't edit component's properties in editor (both for notice and forget range spheres and for some reason arrow component inherited from ACharacter). Again, it used to work correctly and I was able to edit it. Here's how those components are declared (BaseEnemy.h):
public:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Setup")
UDetectionSphere * NoticeRangeSphere;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Setup")
UDetectionSphere * ForgetRangeSphere;
I'm pretty sure the error in logs is a simple fix, but I don't even know where to start looking. I can't find this error in google, so it's probably something trivial I'm overlooking. How do I go about fixing this?
I'm getting the following output:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<NSManagedObject 0x21016610> setValue:forUndefinedKey:]: the entity MyEntity is
not key value coding-compliant for the key "aBooleanKey".'
The code that runs before I get the output is the following:
self.name = [managedObject valueForKey:#"name"];
self.language = [managedObject valueForKey:#"language"];
self.ownerID = [managedObject valueForKey:#"ownerID"];
// the following line is the scope of the problem:
self.aBooleanKey = [[managedObject valueForKey:#"aBooleanKey"] boolValue];
For me this looks like a mistyping or something, since all other entity attributes don't cause any problem. But I checked like twelve times and can't find any mistyping or so. It all looks just right. And a week ago it all worked just fine – I didn't change anything here.
Also there are a few other places where I do things with the managedObject and likewise all other attributes work just fine except this one. I tried deleting it in the Core Data store and retyping it, but it didn't solve the problem.
Are there any other reasons for this error?
The problem is quite strange (sometimes works, sometimes not), so I would suggest to change the name of the attribute (e.g. booleanStatus) and verify if the problem still persists or not.
Since you have changed the model you need to remove the app and ricreate it. Alternatively you could perform an automatic migration on Core Data. As you prefer.
Hope it helps.
Here is something strange concerning AutorotateToInterfaceOrientation.
In the Debugger console I get this message for one of my view controllers :
The view controller returned NO from
-shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.
But in reality the rotations works perfectly well. And the message is wrong. Here is the code for -shouldAutorotateToInterfaceOrientation:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return ([centerPoint autoRotateFlag]||(interfaceOrientation==centerPoint.userOrientation));
}
And either autoRotateFlag is simply true (YES), or if it is not centerPoint.userOrientation has been fixed to one of the four acceptable value.
This has been working for me for a long time and the app still works. I just don't know where this message is coming from.
Any idea?
By putting some tracing in my software, using NSLog; I realized that
shouldAutorotateToInterfaceOrientation was called seven times before
viewDidLoad was called.
Since my variable 'autoRotateFlag' is only initialized when passing through viewDidLoad. That explains my problem.
I have to admit though, that I was far from thinking shouldAutorotateToInterfaceOrientation could be called before viewDidLoad.
Obviously I was wrong. And I still do not fully understand the order in which all those methods are called.
I am having an issue where a FakeItEasy call in an extremely simple test is failing with the error "The specified object is not recognized as a fake object." The call is simple:
A.CallTo(myService.MyMethod(listOfStringsFilter)).MustHaveHappened();
The fake is similarly simple (A.Fake()), and fakes out an interfance with one method, that takes in a list and returns a list. In debug mode, I see the instance of myService is of type {Fake IMyInterface}. Anyway, this issue is really holding me up, thanks in advance for your help.
Update:
This was my own darn mistake, I needed to make the call say:
A.CallTo(() => myService.MyMethod(listOfStringsFilter)).MustHaveHappened();
This was my own darn mistake, I needed to make the call say:
A.CallTo(() => myService.MyMethod(listOfStringsFilter)).MustHaveHappened();