I am integrating Banner Ads into my BB application.
Unfortunatelly, I am getting a strange NPE.
When I comment out the code to create/add Banner to my screen - I never get the NPE.
I'm running the default Strom 9530 BB simulator for JDE 4.7.0.
I tried to use debugger - however on debugger startup JDE asks me to provide '.debug' file for the net_rim_bbapi_adv_appXXXXX.cod which is not available on my side. So when I get the NPE I don't see the "full picture".
Anyway, here is the call stack I see in the JDE debugger:
Calling Method Line
334:400
BrowserContentlmpl.requestSecondaryURL(String, boolean, boolean) 443
BrowserContentlmpl.addSecondaryURL(String, SecondaryURLNode, boolean) 404
HTMLBaseRenderer.makeBitmapField(
HTMLGenericElement, Border, String, int, int, int, int) 6198
HTMLBaseRenderer.processElementlmg(HTMLGenericElement, boolean) 1992
HTMLBaseRenderer.processTag(int, HTMLGenericElement, boolean, boolean) 1114
HTMLBaseRenderer.handleOpenTag( HTMLGenericElement, boolean) 970
RHTMLRenderer.handleTag(int) 1620
RHTMLRenderer.parseData() 602
HTMLBaseRenderer.finishProcessingData() 853
BrowserContentlmpl.finishLoading() 693
HTMLBrowserContent.finishLoading() 462
BrowserContentManager.handleNewContent() 92
BrowserContentManager.setContent(HttpConnection, RenderingApplication, Event) 56
334:30f
334:2235
The issue happens only if I push any other Screen over my Banner containing Screen while the Banner is not fully loaded.
RIM developer jreda on BB support forum confirms the issue and says:
We have confirmed that this is an
issue with the ad service library for
the 4.x OS. It will be fixed in the
next release but in the meantime there
shouldn't be any adverse effects on
your users as the exception should be
silently logged. If you are debugging,
the device will pause and you will
need to resume to move past the
exception but in normal operation the
user should not notice the an
exception has occurred.
Related
Using Xcode 12.4 Simulator 14.4
For the alert displayed below, I have the following function in my XCUITests that I use to pull the static text displayed on the System Alert:
_ = addUIInterruptionMonitor(withDescription: "", handler: { (alert) -> Bool in
var data = alert.staticTexts.allElementsBoundByIndex.map {$0.label}
...
})
This worked when using Xcode 11.3 Sims 13.3; however, I just upgraded Xcode and now it crashes on when running the map function and gives the following error:
error: Execution was interrupted, reason: internal ObjC exception breakpoint(-8)..The process has been returned to the state before expression evaluation.
If I put a breakpoint, I can see the following:
po alert.staticTexts.allElementsBoundByIndex.count -> returns 3
po alert.staticTexts.allElementsBoundByIndex[0].label -> returns "Allow “X” to use your location?"
po alert.staticTexts.allElementsBoundByIndex[1].label -> returns "Your location is used to find and display nearby X facilities."
po alert.staticTexts.allElementsBoundByIndex[2] -> returns StaticText, {{32.0, 12.0}, {72.5, 16.0}}, label: 'Precise: On'
However, when I run the following (or runs during my test), it fails but as you can see from above, it does have a static text element at that position:
po alert.staticTexts.allElementsBoundByIndex[2].label -> No matches found for Element at index 2 from input {(
StaticText)} error: Execution was interrupted, reason: internal ObjC exception breakpoint(-8)
If I remain in the console and rerun the same call again, it then works though:
po alert.staticTexts.allElementsBoundByIndex[2].label -> "Precise: On"
Does anyone know what causes this error or a solution for how I can handle it in my test?
As this alert is "outside" your application and everything works when you debug/pause execution, I have to think this is something to do with synchronization.
Do you have anything waiting for the alert to fully display? I don't usually trust the UIInterruptionHandler to do more than auto-dismiss an alert not under test.
I'm using a page object model and typically wait for new pages in the initializer using something like _ = XCUIApplication().alerts.firstMatch.waitForExistence(timeout: 2.0)
That doesn't explain why your example of calling it twice in the console works, but timing is where I'd be looking. I feel that's the only time I ever see errors like this.
It could also be related to the map not being static or loading slowly and therefore changing the accessibility after XCUITest thinks it has finished loading and proceeds. Throwing in a nice long Thread.sleep would be the easiest way to debug that.
Question
Is it possible to set breakpoints and debug code executed by Xcode / Interface Builder's Live Rendering? That is, I am using the IBDesignable and IBInspectable attributes to affect the view as it is rendered in an interface builder storyboard, and would like to be able to debug "IB crashed" errors. I don't recall this from the WWDC session, other than the section on prepareForInterfaceBuilder.
Context
I recently started seeing a number of errors reporting that IB crashed when attempting to render my code. I ultimately traced it to an otherwise innocent line of code in layoutSubviews in one of my views that was linked from the storyboard. The specific problem that IB - when rendering live views, called layoutSubviews before setting all the view's child view properties (which seems like a separate problem, in and of itself). This contrasted with the simulator and device, in which the views were set ahead of the first call to layoutSubviews. Long story short though, it involved diffing a bunch of files to find the offending change. Suffice to say, I could have found the problem quickly if it were possible to set breakpoints and trap the crash.
Has anyone figured out how to debug and/or generally trap these problems, or is that access not yet available?
I watched the WWDC video again (§411 #22:00 or so). You have to
edit a view in IB, and set its custom class to a class in your codebase
set breakpoints as desired in your custom class
select the view in IB, then select Editor -> "Debug Selected Views" (at bottom)
Oddly, in my tests today, it is creating my view via (initWith)Frame instead of (initWith)Coder. This causes subsequent constraint configuration logic to fail as the sub views have not been set (as they would had 'withCoder been called).
(tools note: Xcode 8.2, macOS Sierra)
I had a very different failure than yours: I had a crash in code that resulted in an IB error in Xcode:
error: IB Designables: Failed to update auto layout status: The agent crashed
To debug this on macOS Sierra, open Console.app, and open "User Reports" in the right sidebar. Find the "IBDesignablesCocoaTouch*" crashes, and select the applicable one. This gave me the code-level info I needed to diagnose it.
Crashed Thread: 0
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [0]
Application Specific Information:
CoreSimulator 375.21 - Device: IBSimDeviceTypeiPad2x - Runtime: iOS 10.3 (14E8301) - DeviceType: IBSimDeviceTypeiPad2x
Thread 0 Crashed:
0 libswiftUIKit.dylib 0x000000021a2ddead _TToFE5UIKitCSo7UIImagecfT24imageLiteralResourceNameSS_S0_ + 205
1 libswiftUIKit.dylib 0x000000021a2ddcef _TFE5UIKitCSo7UIImageCfT24imageLiteralResourceNameSS_S0_ + 79
2 com.company.App 0x0000000216df74ad _TZFC10App21ControlsP33_F7118662B6663018C7DD0DEBB6FDD87511buttonImagefT8forStateOS_25State_CSo7UIImage + 109 (Controls.swift:121)
…
(In my case, Interface Builder was failing to load an image literal. I had to implement this workaround: xcode 6 IB_DESIGNABLE- not loading resources from bundle in Interface builder)
In a production app with the debug information stripped out, how do you convert the output of:
NSLog(#"Stack Trace: %#", [exception callStackSymbols]);
To an legible class and method name? A line number would be a blessing.
Here's the output I'm getting:
0 CoreFoundation 0x23d82f23 <redacted> + 154
1 libobjc.A.dylib 0x23519ce7 objc_exception_throw + 38
2 CoreFoundation 0x23cb92f1 <redacted> + 176
3 MyApp 0x23234815 MyApp + 440341
The final line is the bread and butter line, but when I use dwarf to find the address, nothing exists.
dwarfdump --arch armv7 MyApp.dSYM --lookup 0x00234815 | grep 'Line table'
I've read here that you need to convert the stack address to something else for dwarf or atos:
https://stackoverflow.com/a/12464678/2317728
How would I find the load address or slide address to perform the calculation? Is there not a way to calculate all this prior to sending the stacktrace to the log from within the app? If not, how would I determine and calculate these values after receiving the stack trace? Better yet, is there an easier solution I'm missing?
Note I cannot just wait for crash reports since the app is small and they will never come. I'm planning on sending the stack traces to our server to be fixed as soon as they appear.
EDITORIAL
The crash reporting tools in iOS are very rough, particularly when compared to Android. In android, the buggy lines are sent to Google analytics, you use the map to debug the line--simple (comparatively). For iOS, you are confronted with: a) waiting on user bug reports (not reasonable for a small app), b) sending stack traces to a server where there are scant tools or information on how to symbolicate the stack traces, c) relying on large quasi-commercial 3rd party libraries. This definitely makes it harder to build and scale up--hoping Apple will eventually take notice. Even more hopeful someone has spotted an easier solution I might have missed ;)
Thanks for your help!
A suggestion, you can easily get the method name, exception reason and line number using:
NSLog(#"%# Exception in %s on %d due to %#",[exception name],__PRETTY_FUNCTION__,__LINE__,[exception reason]);
In my company we´ve installed the app GuiXT Liquid UI on Ipad mini to access to our SAP-Systems.
The login works fine and we can open transactions (those which were delivered by SAP and also self-written), but as soon as we want to change variant, display a list or anything else, an Runtime Error occurs.
While opening the same transactions with the “normal” gui on windows-pcs everything works.
Following informations I get from the error message:
Runtime Errors MESSAGE_TYPE_X
Error analysis
Short text of error message:
Control Frame Work : Error in data stream <DATAMANAGER><TABLES><DATACHAN
GES HANDLE="2"><IT I; current tag PROPERTY,
Long text of error message:
Technical information about the message:
Message class....... "CNDP"
Number.............. 008
Variable 1.......... "<DATAMANAGER><TABLES><DATACHANGES HANDLE="2"><IT I"
Variable 2.......... "PROPERTY"
Variable 3.......... " "
Variable 4.......... " "
Information on where terminated
Termination occurred in the ABAP program "CL_GUI_DATAMANAGER============CP" -
in "TRACE_XML".
The main program was "RAZUGA_ALV01 ".
In the source code you have the termination point in line 2136
of the (Include) program "CL_GUI_DATAMANAGER============CL".
This is a really old question and I hope you found a solution.
I stumbled upon it while searching for help on a similar (but not exactly the same) error.
I found this note which doesn't apply to my system/error, but might apply to yours, so I'll leave it here for reference:
2318244 - Shortdump occurs in /IDXGC/PDOCMON01 when click some Process Step No. to display step additional data
Regards,
tao
Not sure what happened here, I added some new code and now I'm getting this error when trying to run the app on the BlackBerry simulator from Eclipse.
From the console:
[0.0] Starting MyApp
[0.0] Symbol 'Integer.valueOf' not found.[0.0] Error starting MyApp: Symbol 'Integer.valueOf' not found.
This appears both in the debugger and on-screen as a popup with an "OK" button.
Thread [net_rim_bb_ribbon_app(83)id=384704512] (Suspended (exception RuntimeException))
ApplicationEntryPoint.run() line: 309
ApplicationEntry.invoke() line: 503
RibbonLauncherImpl.launch(ApplicationEntry) line: 1950
RibbonLauncherImpl.launch() line: 1935
ApplicationMenu.trackwheelClick(int, int) line: 874
ApplicationMenu.navigationClick(int, int) line: 885
ApplicationMenu(Screen).dispatchNavigationEvent(int, int, int, int, int) line: 678
UiEngineImpl.processMessage(Object, Message, boolean) line: 1612
RibbonLauncherApp(Application).processNextMessage(Message) line: 1701
RibbonLauncherApp(Application).enterEventDispatcher() line: 986
RibbonLauncherApp.main(String[]) line: 87
Any help at all? I can't think of anything which I changed to cause this to happen. Another app runs perfectly ok. Many thanks.
I could not find anywhere that I had used Integer.valueOf. In the end I just created a new Eclipse project and copied the files over. That fixed whatever the issue was.
If you have a similar issue and don't know what to do then try that! :P
Sorry I cannot be of more help!