Search Results

Search found 8588 results on 344 pages for 'thread abort'.

Page 150/344 | < Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >

  • WCF: Is it safe to override the Client's Dispose method using a partial class?

    - by pdiddy
    I'd like to override the Dispose method of generated proxy (ClientBase) because of the fact that disposing of a proxy calls Close and can throw an exception when the channel is faulted. The only way I came up was to create a partial class to my generated proxy, make it inherit from IDisposable: public partial class MyServiceProxy : IDisposable { #region IDisposable Members public void Dispose() { if (State != System.ServiceModel.CommunicationState.Faulted) Close(); else Abort(); } #endregion } I did some test and my Dispose method is indeed called. Do you see any issue with this strategy? Also, I don't like the fact that I'll have to create this partial class for every generated proxy. It be nice if I was able to make my proxy inherit from a base class...

    Read the article

  • Parallel Classloading Revisited: Fully Concurrent Loading

    - by davidholmes
    Java 7 introduced support for parallel classloading. A description of that project and its goals can be found here: http://openjdk.java.net/groups/core-libs/ClassLoaderProposal.html The solution for parallel classloading was to add to each class loader a ConcurrentHashMap, referenced through a new field, parallelLockMap. This contains a mapping from class names to Objects to use as a classloading lock for that class name. This was then used in the following way: protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { synchronized (getClassLoadingLock(name)) { // First, check if the class has already been loaded Class c = findLoadedClass(name); if (c == null) { long t0 = System.nanoTime(); try { if (parent != null) { c = parent.loadClass(name, false); } else { c = findBootstrapClassOrNull(name); } } catch (ClassNotFoundException e) { // ClassNotFoundException thrown if class not found // from the non-null parent class loader } if (c == null) { // If still not found, then invoke findClass in order // to find the class. long t1 = System.nanoTime(); c = findClass(name); // this is the defining class loader; record the stats sun.misc.PerfCounter.getParentDelegationTime().addTime(t1 - t0); sun.misc.PerfCounter.getFindClassTime().addElapsedTimeFrom(t1); sun.misc.PerfCounter.getFindClasses().increment(); } } if (resolve) { resolveClass(c); } return c; } } Where getClassLoadingLock simply does: protected Object getClassLoadingLock(String className) { Object lock = this; if (parallelLockMap != null) { Object newLock = new Object(); lock = parallelLockMap.putIfAbsent(className, newLock); if (lock == null) { lock = newLock; } } return lock; } This approach is very inefficient in terms of the space used per map and the number of maps. First, there is a map per-classloader. As per the code above under normal delegation the current classloader creates and acquires a lock for the given class, checks if it is already loaded, then asks its parent to load it; the parent in turn creates another lock in its own map, checks if the class is already loaded and then delegates to its parent and so on till the boot loader is invoked for which there is no map and no lock. So even in the simplest of applications, you will have two maps (in the system and extensions loaders) for every class that has to be loaded transitively from the application's main class. If you knew before hand which loader would actually load the class the locking would only need to be performed in that loader. As it stands the locking is completely unnecessary for all classes loaded by the boot loader. Secondly, once loading has completed and findClass will return the class, the lock and the map entry is completely unnecessary. But as it stands, the lock objects and their associated entries are never removed from the map. It is worth understanding exactly what the locking is intended to achieve, as this will help us understand potential remedies to the above inefficiencies. Given this is the support for parallel classloading, the class loader itself is unlikely to need to guard against concurrent load attempts - and if that were not the case it is likely that the classloader would need a different means to protect itself rather than a lock per class. Ultimately when a class file is located and the class has to be loaded, defineClass is called which calls into the VM - the VM does not require any locking at the Java level and uses its own mutexes for guarding its internal data structures (such as the system dictionary). The classloader locking is primarily needed to address the following situation: if two threads attempt to load the same class, one will initiate the request through the appropriate loader and eventually cause defineClass to be invoked. Meanwhile the second attempt will block trying to acquire the lock. Once the class is loaded the first thread will release the lock, allowing the second to acquire it. The second thread then sees that the class has now been loaded and will return that class. Neither thread can tell which did the loading and they both continue successfully. Consider if no lock was acquired in the classloader. Both threads will eventually locate the file for the class, read in the bytecodes and call defineClass to actually load the class. In this case the first to call defineClass will succeed, while the second will encounter an exception due to an attempted redefinition of an existing class. It is solely for this error condition that the lock has to be used. (Note that parallel capable classloaders should not need to be doing old deadlock-avoidance tricks like doing a wait() on the lock object\!). There are a number of obvious things we can try to solve this problem and they basically take three forms: Remove the need for locking. This might be achieved by having a new version of defineClass which acts like defineClassIfNotPresent - simply returning an existing Class rather than triggering an exception. Increase the coarseness of locking to reduce the number of lock objects and/or maps. For example, using a single shared lockMap instead of a per-loader lockMap. Reduce the lifetime of lock objects so that entries are removed from the map when no longer needed (eg remove after loading, use weak references to the lock objects and cleanup the map periodically). There are pros and cons to each of these approaches. Unfortunately a significant "con" is that the API introduced in Java 7 to support parallel classloading has essentially mandated that these locks do in fact exist, and they are accessible to the application code (indirectly through the classloader if it exposes them - which a custom loader might do - and regardless they are accessible to custom classloaders). So while we can reason that we could do parallel classloading with no locking, we can not implement this without breaking the specification for parallel classloading that was put in place for Java 7. Similarly we might reason that we can remove a mapping (and the lock object) because the class is already loaded, but this would again violate the specification because it can be reasoned that the following assertion should hold true: Object lock1 = loader.getClassLoadingLock(name); loader.loadClass(name); Object lock2 = loader.getClassLoadingLock(name); assert lock1 == lock2; Without modifying the specification, or at least doing some creative wordsmithing on it, options 1 and 3 are precluded. Even then there are caveats, for example if findLoadedClass is not atomic with respect to defineClass, then you can have concurrent calls to findLoadedClass from different threads and that could be expensive (this is also an argument against moving findLoadedClass outside the locked region - it may speed up the common case where the class is already loaded, but the cost of re-executing after acquiring the lock could be prohibitive. Even option 2 might need some wordsmithing on the specification because the specification for getClassLoadingLock states "returns a dedicated object associated with the specified class name". The question is, what does "dedicated" mean here? Does it mean unique in the sense that the returned object is only associated with the given class in the current loader? Or can the object actually guard loading of multiple classes, possibly across different class loaders? So it seems that changing the specification will be inevitable if we wish to do something here. In which case lets go for something that more cleanly defines what we want to be doing: fully concurrent class-loading. Note: defineClassIfNotPresent is already implemented in the VM as find_or_define_class. It is only used if the AllowParallelDefineClass flag is set. This gives us an easy hook into existing VM mechanics. Proposal: Fully Concurrent ClassLoaders The proposal is that we expand on the notion of a parallel capable class loader and define a "fully concurrent parallel capable class loader" or fully concurrent loader, for short. A fully concurrent loader uses no synchronization in loadClass and the VM uses the "parallel define class" mechanism. For a fully concurrent loader getClassLoadingLock() can return null (or perhaps not - it doesn't matter as we won't use the result anyway). At present we have not made any changes to this method. All the parallel capable JDK classloaders become fully concurrent loaders. This doesn't require any code re-design as none of the mechanisms implemented rely on the per-name locking provided by the parallelLockMap. This seems to give us a path to remove all locking at the Java level during classloading, while retaining full compatibility with Java 7 parallel capable loaders. Fully concurrent loaders will still encounter the performance penalty associated with concurrent attempts to find and prepare a class's bytecode for definition by the VM. What this penalty is depends on the number of concurrent load attempts possible (a function of the number of threads and the application logic, and dependent on the number of processors), and the costs associated with finding and preparing the bytecodes. This obviously has to be measured across a range of applications. Preliminary webrevs: http://cr.openjdk.java.net/~dholmes/concurrent-loaders/webrev.hotspot/ http://cr.openjdk.java.net/~dholmes/concurrent-loaders/webrev.jdk/ Please direct all comments to the mailing list [email protected].

    Read the article

  • Slow boot on Ubuntu 12.04, probable cause the network connection

    - by Ravi S Ghosh
    I have been having rather slow boot on Ubuntu 12.04. Lately, I tried to figure out the reason and it seems to be the network connection which does not get connected and requires multiple attempts. Here is part of dmesg [ 2.174349] EXT4-fs (sda2): INFO: recovery required on readonly filesystem [ 2.174352] EXT4-fs (sda2): write access will be enabled during recovery [ 2.308172] firewire_core: created device fw0: GUID 384fc00005198d58, S400 [ 2.333457] usb 7-1.2: new low-speed USB device number 3 using uhci_hcd [ 2.465896] EXT4-fs (sda2): recovery complete [ 2.466406] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null) [ 2.589440] usb 7-1.3: new low-speed USB device number 4 using uhci_hcd **[ 18.292029] ADDRCONF(NETDEV_UP): eth0: link is not ready** [ 18.458958] udevd[377]: starting version 175 [ 18.639482] Adding 4200960k swap on /dev/sda5. Priority:-1 extents:1 across:4200960k [ 19.314127] wmi: Mapper loaded [ 19.426602] r592 0000:09:01.2: PCI INT B -> GSI 18 (level, low) -> IRQ 18 [ 19.426739] r592: driver successfully loaded [ 19.460105] input: Dell WMI hotkeys as /devices/virtual/input/input5 [ 19.493629] lp: driver loaded but no devices found [ 19.497012] cfg80211: Calling CRDA to update world regulatory domain [ 19.535523] ACPI Warning: _BQC returned an invalid level (20110623/video-480) [ 19.539457] acpi device:03: registered as cooling_device2 [ 19.539520] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:01/LNXVIDEO:00/input/input6 [ 19.539568] ACPI: Video Device [M86] (multi-head: yes rom: no post: no) [ 19.578060] Linux video capture interface: v2.00 [ 19.667708] dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.2) [ 19.763171] r852 0000:09:01.3: PCI INT B -> GSI 18 (level, low) -> IRQ 18 [ 19.763258] r852: driver loaded successfully [ 19.854769] input: Microsoft Comfort Curve Keyboard 2000 as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1.2/7-1.2:1.0/input/input7 [ 19.854864] generic-usb 0003:045E:00DD.0001: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Comfort Curve Keyboard 2000] on usb-0000:00:1d.1-1.2/input0 [ 19.878605] input: Microsoft Comfort Curve Keyboard 2000 as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1.2/7-1.2:1.1/input/input8 [ 19.878698] generic-usb 0003:045E:00DD.0002: input,hidraw1: USB HID v1.11 Device [Microsoft Comfort Curve Keyboard 2000] on usb-0000:00:1d.1-1.2/input1 [ 19.902779] input: DELL DELL USB Laser Mouse as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1.3/7-1.3:1.0/input/input9 [ 19.925034] generic-usb 0003:046D:C063.0003: input,hidraw2: USB HID v1.10 Mouse [DELL DELL USB Laser Mouse] on usb-0000:00:1d.1-1.3/input0 [ 19.925057] usbcore: registered new interface driver usbhid [ 19.925059] usbhid: USB HID core driver [ 19.942362] uvcvideo: Found UVC 1.00 device Laptop_Integrated_Webcam_2M (0c45:63ea) [ 19.947004] input: Laptop_Integrated_Webcam_2M as /devices/pci0000:00/0000:00:1a.7/usb1/1-6/1-6:1.0/input/input10 [ 19.947075] usbcore: registered new interface driver uvcvideo [ 19.947077] USB Video Class driver (1.1.1) [ 20.145232] Intel(R) Wireless WiFi Link AGN driver for Linux, in-tree: [ 20.145235] Copyright(c) 2003-2011 Intel Corporation [ 20.145327] iwlwifi 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 [ 20.145357] iwlwifi 0000:04:00.0: setting latency timer to 64 [ 20.145402] iwlwifi 0000:04:00.0: pci_resource_len = 0x00002000 [ 20.145404] iwlwifi 0000:04:00.0: pci_resource_base = ffffc90000674000 [ 20.145407] iwlwifi 0000:04:00.0: HW Revision ID = 0x0 [ 20.145531] iwlwifi 0000:04:00.0: irq 46 for MSI/MSI-X [ 20.145613] iwlwifi 0000:04:00.0: Detected Intel(R) WiFi Link 5100 AGN, REV=0x54 [ 20.145720] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 20.167535] iwlwifi 0000:04:00.0: device EEPROM VER=0x11f, CALIB=0x4 [ 20.167538] iwlwifi 0000:04:00.0: Device SKU: 0Xf0 [ 20.167567] iwlwifi 0000:04:00.0: Tunable channels: 13 802.11bg, 24 802.11a channels [ 20.172779] fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel. [ 20.172783] Disabling lock debugging due to kernel taint [ 20.250115] [fglrx] Maximum main memory to use for locked dma buffers: 3759 MBytes. [ 20.250567] [fglrx] vendor: 1002 device: 9553 count: 1 [ 20.251256] [fglrx] ioport: bar 1, base 0x2000, size: 0x100 [ 20.251271] pci 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 [ 20.251277] pci 0000:01:00.0: setting latency timer to 64 [ 20.251559] [fglrx] Kernel PAT support is enabled [ 20.251578] [fglrx] module loaded - fglrx 8.96.4 [Mar 12 2012] with 1 minors [ 20.310385] iwlwifi 0000:04:00.0: loaded firmware version 8.83.5.1 build 33692 [ 20.310598] Registered led device: phy0-led [ 20.310628] cfg80211: Ignoring regulatory request Set by core since the driver uses its own custom regulatory domain [ 20.372306] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs' [ 20.411015] psmouse serio1: synaptics: Touchpad model: 1, fw: 7.2, id: 0x1c0b1, caps: 0xd04733/0xa40000/0xa0000 [ 20.454232] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input11 [ 20.545636] cfg80211: Ignoring regulatory request Set by core since the driver uses its own custom regulatory domain [ 20.545640] cfg80211: World regulatory domain updated: [ 20.545642] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) [ 20.545644] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 20.545647] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 20.545649] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 20.545652] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 20.545654] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 20.609484] type=1400 audit(1340502633.160:2): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient" pid=693 comm="apparmor_parser" [ 20.609494] type=1400 audit(1340502633.160:3): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=642 comm="apparmor_parser" [ 20.609843] type=1400 audit(1340502633.160:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=693 comm="apparmor_parser" [ 20.609852] type=1400 audit(1340502633.160:5): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=642 comm="apparmor_parser" [ 20.610047] type=1400 audit(1340502633.160:6): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=693 comm="apparmor_parser" [ 20.610060] type=1400 audit(1340502633.160:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=642 comm="apparmor_parser" [ 20.610476] type=1400 audit(1340502633.160:8): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=814 comm="apparmor_parser" [ 20.610829] type=1400 audit(1340502633.160:9): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=814 comm="apparmor_parser" [ 20.611035] type=1400 audit(1340502633.160:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=814 comm="apparmor_parser" [ 20.661912] snd_hda_intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22 [ 20.661982] snd_hda_intel 0000:00:1b.0: irq 47 for MSI/MSI-X [ 20.662013] snd_hda_intel 0000:00:1b.0: setting latency timer to 64 [ 20.770289] input: HDA Intel Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12 [ 20.770689] snd_hda_intel 0000:01:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17 [ 20.770786] snd_hda_intel 0000:01:00.1: irq 48 for MSI/MSI-X [ 20.770815] snd_hda_intel 0000:01:00.1: setting latency timer to 64 [ 20.994040] HDMI status: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0 [ 20.994189] input: HDA ATI HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input13 [ 21.554799] vesafb: mode is 1024x768x32, linelength=4096, pages=0 [ 21.554802] vesafb: scrolling: redraw [ 21.554804] vesafb: Truecolor: size=0:8:8:8, shift=0:16:8:0 [ 21.557342] vesafb: framebuffer at 0xd0000000, mapped to 0xffffc90011800000, using 3072k, total 3072k [ 21.557498] Console: switching to colour frame buffer device 128x48 [ 21.557516] fb0: VESA VGA frame buffer device [ 21.987338] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro [ 22.184693] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null) [ 27.362440] iwlwifi 0000:04:00.0: RF_KILL bit toggled to disable radio. [ 27.436988] init: failsafe main process (986) killed by TERM signal [ 27.970112] ppdev: user-space parallel port driver [ 28.198917] Bluetooth: Core ver 2.16 [ 28.198935] NET: Registered protocol family 31 [ 28.198937] Bluetooth: HCI device and connection manager initialized [ 28.198940] Bluetooth: HCI socket layer initialized [ 28.198941] Bluetooth: L2CAP socket layer initialized [ 28.198947] Bluetooth: SCO socket layer initialized [ 28.226135] Bluetooth: RFCOMM TTY layer initialized [ 28.226141] Bluetooth: RFCOMM socket layer initialized [ 28.226143] Bluetooth: RFCOMM ver 1.11 [ 28.445620] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 28.445623] Bluetooth: BNEP filters: protocol multicast [ 28.524578] type=1400 audit(1340502641.076:11): apparmor="STATUS" operation="profile_load" name="/usr/lib/cups/backend/cups-pdf" pid=1052 comm="apparmor_parser" [ 28.525018] type=1400 audit(1340502641.076:12): apparmor="STATUS" operation="profile_load" name="/usr/sbin/cupsd" pid=1052 comm="apparmor_parser" [ 28.629957] type=1400 audit(1340502641.180:13): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=1105 comm="apparmor_parser" [ 28.630325] type=1400 audit(1340502641.180:14): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1105 comm="apparmor_parser" [ 28.630535] type=1400 audit(1340502641.180:15): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1105 comm="apparmor_parser" [ 28.645266] type=1400 audit(1340502641.196:16): apparmor="STATUS" operation="profile_load" name="/usr/lib/lightdm/lightdm/lightdm-guest-session-wrapper" pid=1104 comm="apparmor_parser" **[ 28.751922] ADDRCONF(NETDEV_UP): wlan0: link is not ready** [ 28.753653] tg3 0000:08:00.0: irq 49 for MSI/MSI-X **[ 28.856127] ADDRCONF(NETDEV_UP): eth0: link is not ready [ 28.857034] ADDRCONF(NETDEV_UP): eth0: link is not ready** [ 28.871080] type=1400 audit(1340502641.420:17): apparmor="STATUS" operation="profile_load" name="/usr/lib/telepathy/mission-control-5" pid=1108 comm="apparmor_parser" [ 28.871519] type=1400 audit(1340502641.420:18): apparmor="STATUS" operation="profile_load" name="/usr/lib/telepathy/telepathy-*" pid=1108 comm="apparmor_parser" [ 28.874905] type=1400 audit(1340502641.424:19): apparmor="STATUS" operation="profile_replace" name="/usr/lib/cups/backend/cups-pdf" pid=1113 comm="apparmor_parser" [ 28.875354] type=1400 audit(1340502641.424:20): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/cupsd" pid=1113 comm="apparmor_parser" [ 30.477976] tg3 0000:08:00.0: eth0: Link is up at 100 Mbps, full duplex [ 30.477979] tg3 0000:08:00.0: eth0: Flow control is on for TX and on for RX **[ 30.478390] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready** [ 31.110269] fglrx_pci 0000:01:00.0: irq 50 for MSI/MSI-X [ 31.110859] [fglrx] Firegl kernel thread PID: 1327 [ 31.111021] [fglrx] Firegl kernel thread PID: 1329 [ 31.111408] [fglrx] Firegl kernel thread PID: 1330 [ 31.111543] [fglrx] IRQ 50 Enabled [ 31.712938] [fglrx] Gart USWC size:1224 M. [ 31.712941] [fglrx] Gart cacheable size:486 M. [ 31.712945] [fglrx] Reserved FB block: Shared offset:0, size:1000000 [ 31.712948] [fglrx] Reserved FB block: Unshared offset:fc2b000, size:3d5000 [ 31.712950] [fglrx] Reserved FB block: Unshared offset:1fffb000, size:5000 [ 41.312020] eth0: no IPv6 routers present As you can see I get multiple instances of [ 28.856127] ADDRCONF(NETDEV_UP): eth0: link is not ready and then finally it becomes read and I get the message [ 30.478390] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready. I searched askubuntun, ubuntuforum, and the web but couldn't find a solution. Any help would be very much appreciated. Here is the bootchart

    Read the article

  • iPhone app crashed: Assertion failed function evict_glyph_entry_from_strike, file Fonts/CGFontCache.

    - by Ross
    this happened quite randomly. I didn't delete any tableview cell, the backtrace information: Assertion failed: (d->entry[identifier.glyph] == g), function evict_glyph_entry_from_strike, file Fonts/CGFontCache.c, line 810. Program received signal: “SIGABRT”. (gdb) bt #0 0x97da5972 in __kill () #1 0x97da5964 in kill$UNIX2003 () #2 0x97e38ba5 in raise () #3 0x97e4ec5c in abort () #4 0x97e3b804 in __assert_rtn () #5 0x0037fe0e in evict_glyph_entry_from_cache () #6 0x003226aa in expire_glyphs_nl () #7 0x00322645 in CGFontCacheUnlock () #8 0x00321fef in CGGlyphLockUnlock () #9 0x0240f9b7 in ripc_DrawGlyphs () #10 0x0031b0d4 in draw_glyphs () #11 0x0031a91f in CGContextShowGlyphsWithAdvances () #12 0x35814178 in WebCore::Font::drawGlyphs () #13 0x35813da5 in WebCore::Font::drawGlyphBuffer () #14 0x35813aca in WebCore::Font::drawSimpleText () #15 0x35813760 in drawAtPoint () #16 0x3581307e in -[NSString(WebStringDrawing) _web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:] () #17 0x3090d2e9 in -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:letterSpacing:includeEmoji:] () #18 0x3090cfe3 in -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:] () #19 0x3093d853 in -[UINavigationItemView drawText:inRect:] () #20 0x3093a96b in -[UINavigationItemButtonView drawRect:] () #21 0x3091ff61 in -[UIView(CALayerDelegate) drawLayer:inContext:] () #22 0x0060daeb in -[CALayer drawInContext:] () #23 0x0060d8f9 in backing_callback () #24 0x0060d1b4 in CABackingStoreUpdate () #25 0x0060c3cc in -[CALayer _display] () #26 0x0060bf56 in CALayerDisplayIfNeeded () #27 0x0060b3bd in CA::Context::commit_transaction () #28 0x0060b022 in CA::Transaction::commit () #29 0x006132e0 in CA::Transaction::observer_callback () #30 0x30245c32 in __CFRunLoopDoObservers () #31 0x3024503f in CFRunLoopRunSpecific () #32 0x30244628 in CFRunLoopRunInMode () #33 0x32044c31 in GSEventRunModal () #34 0x32044cf6 in GSEventRun () #35 0x309021ee in UIApplicationMain ()

    Read the article

  • Odd Series of Packets, How would I reproduce this behavior?

    - by JustSmith
    I recorded a series of http packets that I cant programmatically recreate. The series of packets goes like this: HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Network.eth0.MACAddress,Properties.System.SerialNumber,DVTelTest,SightLogix.ProdShortName HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Properties.Image.Resolution HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=update&Network.RTSP.ProtViewer=password HTTP/1.1 HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Event HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=list&group=ImageSource.I0.Sensor HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) Notice the two GET followed by one response. I though the two gets were going out at the same time but there is no corresponding number of responses. Also when trying to reproduce this pattern as the server if I abort the first GET request the client waits until it times out and starts the request over with out sending any other requests. What is happening here? How can I reproduce it?

    Read the article

  • [BUG] Bus Error - What causes this in Ruby?

    - by viatropos
    I have run into this error 5 or 10 times over the past few years and have never found a clear answer to this problem. Here is the error: $ rake db:migrate /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.9.5/lib/libxml_ruby.bundle: [BUG] Bus Error ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0] Abort trap The app I am running this in is using RMagick. I have run into this problem when installing ImageMagick a while ago, and when installing Nokogiri, and when installing MySQL. For Nokogiri it was because I needed a more recent version of libxml. What are your thoughts on this? Any fixes? How can I check the version of RMagick the project is loading? I am on a Mac, 10.5.8. Thanks for the help, Lance

    Read the article

  • Objective-C - How To Remove Characters From a String?

    - by iAm
    I have a UILable that has a formatted String (formatted for currency), so there is a dollar sign, $21.34. In the core data entity the attribute is of a type double, I am using an NSDecimalNumber to save to the database. self.purchase.name = self.nameTextField.text; NSString *string = self.amountLabel.text NSDecimalNumber *newAmount = [[NSDecimalNumber alloc] initWithString:string]; NSLog(@"%@", string); // THIS RETURNS NaN, because of dollar sign i think NSManagedObjectContext *context = self.purchase.managedObjectContext; NSError *error = nil; if (![context save:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } Anyway, I need this to not be NaN, so my thinking is to remove the dollar sign, but i do not know how to do that, or perhaps there is a better way to accomplish my goal.

    Read the article

  • iPad: CoreData FetchedRequest Ignores Changes in Predicate

    - by Michael
    Hi there, While programming an iPad-app, I'm just running into trouble using a fetchedResultsController with a "dynamic" predicate. it seems the changes to the predicate get ignored. No matter how the predicate changes, I always get the result of the first fetch ... same code runs without no problems on iphone-env (3.1.x) !! sample : - (void)performSearch:(NSString *)searchText { self.displaySearchResults = TRUE; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"searchWords contains[cd] %@", searchText]; [self.fetchedSearchResultsController.fetchRequest setPredicate:predicate]; NSError *error = nil; if (![self.fetchedSearchResultsController performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } if(deviceIsIPad) { [self showSearchResults]; } else { [cookBookOverview reloadData]; } } can anyone help plz ? btw.: excuse my painful english ;-)

    Read the article

  • How do I push a new project to a shared Mercurial multi-repository?

    - by j-g-faustus
    I have a local machine ("laptop") and a shared Mercurial repository on another machine ("server"). The shared repository is set up as a multi-repository as described in the Mercurial documentation using Apache, the hgwebdir.cgi script and Mercurial 1.4. The setup works in the sense that I can browse the projects (repositories) in the web browser, I can clone and pull from the server, and I can push from the laptop when the project/repository already exists on the server. But I cannot create a new project on the laptop (hg init, do stuff, hg commit) and push it to the shared multi-repository (hg push http://server/hg/my-new-project-name) - I get "abort: HTTP Error 404: Not Found", presumably because the directory/project repository does not exist yet. How can I push a new project/directory structure to a Mercurial running elsewhere? I couldn't find anything in the documentation, how do you guys do it?

    Read the article

  • Ruby on Rails Beta 3 Install Problem on Snow Leopard

    - by Herr Kaleun
    Hello Friends, i tryed to install the new beta on my system with the command: sudo gem install rails --pre but no matter what i tryed, i still get this damn error: Successfully installed rails-3.0.0.beta3 1 gem installed Installing ri documentation for rails-3.0.0.beta3... File not found: lib Since im very very new to ruby, i really don't know what to do. How can i finish installing this? Is this installed already? Why does it abort here? I'm at the end for today. Thanks for reading. have a nice day.

    Read the article

  • How to clone a mercurial repository over an ssh connection initiated by fabric when http authorizati

    - by Monika Sulik
    I'm attempting to use fabric for the first time and I really like it so far, but at a certain point in my deployment script I want to clone a mercurial repository. When I get to that point I get an error: err: abort: http authorization required My repository requires http authorization and fabric doesn't prompt me for the user and password. I can get around this by changing my repository address from: https://hostname/repository to: https://user:password@hostname/repository But for various reasons I would prefer not to go this route. Are there any other ways in which I could bypass this problem?

    Read the article

  • Coredump in Multithreading Application in RHEL-5(Help Required)

    - by Chinnu
    I am working on multi-threading application it is dumping frequently.I could not able to analyaze the core.The core is showing like this Core was generated by `thread-process '. Program terminated with signal 6, Aborted. 0 0x00000038f4e30045 in raise () from /lib64/libc.so.6 (gdb) where 0 0x00000038f4e30045 in raise () from /lib64/libc.so.6 1 0x00000038f4e31ae0 in abort () from /lib64/libc.so.6 2 0x00000038f4e681bb in __libc_message () from /lib64/libc.so.6 3 0x00000038f4e72b96 in free () from /lib64/libc.so.6 4 0x000000000046a137 in std::string::substr () 5 0x000000000042c549 in std::operator<< , std::allocator () 6 0x000000000042cc1d in std::operator<< , std::allocator () 7 0x000000000046b069 in std::string::substr () 8 0x000000000046c866 in std::string::substr () 9 0x0000000000431062 in std::operator<< , std::allocator () 10 0x00000038f5a062e7 in start_thread () from /lib64/libpthread.so.0 11 0x00000038f4ece3bd in clone () from /lib64/libc.so.6

    Read the article

  • How to correctly open WCF service

    - by Sergej Andrejev
    Hi there, I'm using WCF client like this... var client = new TestClient(); try { response = service.Operation(request); } finally { try { if (client.State != CommunicationState.Faulted) client.Close(); } catch (Exception) { client.Abort(); } } but from time to time I get 500 HTTP error which is the only answer I get for next 15 minutes, then everything is back to normal for 15 minutes and so on. I know there is some load balancing stuff going on service side but guys there can't find any problems with it. That's why I started wondering am I using WCF service correctly. I already made a mistake once when I was using "using" to close service connection and I'm afraid I doing something wrong again. So can anybody say whether my way of calling WCF service is correct or not in all (event the most rare) circumstances?

    Read the article

  • How to cancel a web service call if it's not responding

    - by drizzle
    Hi, I have a web page (.aspx) that calls a third party web service to get some data. It usually takes couple of seconds to get the response back, and then the rest of the page will load. Occasionally the call gets stuck either due to the web service is down, or internet connection, etc., the page just hang there and will not load. My questions is: 1) Is there a way to abort/cancel the web service call after a set amount of time? 2) Is it even possible to verify the status of the web service before calling it? Thanks.

    Read the article

  • Is there a built-in way to determine the size of a WCF response?

    - by jaminto
    Before a client gets the full payload of the web request, we'd like to first send it a measurement of the size of the response it will get. If the response will be too large, the client will present a message to the user giving them the option to abort the operation. We can write some custom code to preload the response on the server, determine the size, and then pass it on to the client, but we'd rather not if there's another way to do it. Does anyone know if WCF has any tricky way to do this? Or are there any free third party tools out there that will accomplish this? Thanks.

    Read the article

  • Program ends abruptly even in debugger - how did that happen?

    - by Mick
    I am trying to debug a program that unexpectedly shuts down. When I say "shuts down, I mean one moment I am seeing all the windows being displayed, each of which is showing all the right data,then suddenly all the windows disappear. The is no messagebox reporting anything wrong. So I tried running the program in the debugger hoping that it would somehow trap whatever was causing the program to abort, but even within the debugger the program simply ends abruptly. The last line in the debugger is: The program '[5500] test.exe: Native' has exited with code 0 (0x0). My program which is extremely large and extremely old has a lot of self diagnostics. My suspicion is that perhaps a self test has failed and maybe I just called "exit()", forgetting to pop up a dialog explaining why. My question now is, how can I find out from which point in the code, my program quit?

    Read the article

  • Losing NSManaged Objects in my Application

    - by Wayfarer
    I've been doing quite a bit of work on a fun little iPhone app. At one point, I get a bunch of player objects from my Persistant store, and then display them on the screen. I also have the options of adding new player objects (their just custom UIButtons) and removing selected players. However, I believe I'm running into some memory management issues, in that somehow the app is not saving which "players" are being displayed. Example: I have 4 players shown, I select them all and then delete them all. They all disappear. But if I exit and then reopen the application, they all are there again. As though they had never left. So somewhere in my code, they are not "really" getting removed. MagicApp201AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; context = [appDelegate managedObjectContext]; NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *desc = [NSEntityDescription entityForName:@"Player" inManagedObjectContext:context]; [request setEntity:desc]; NSError *error; NSMutableArray *objects = [[[context executeFetchRequest:request error:&error] mutableCopy] autorelease]; if (objects == nil) { NSLog(@"Shit man, there was an error taking out the single player object when the view did load. ", error); } int j = 0; while (j < [objects count]) { if ([[[objects objectAtIndex:j] valueForKey:@"currentMultiPlayer"] boolValue] == NO) { [objects removeObjectAtIndex:j]; j--; } else { j++; } } [self setPlayers:objects]; //This is a must, it NEEDS to work Objects are all the players playing So in this snippit (in the viewdidLoad method), I grab the players out of the persistant store, and then remove the objects I don't want (those whose boolValue is NO), and the rest are kept. This works, I'm pretty sure. I think the issue is where I remove the players. Here is that code: NSLog(@"Remove players"); /** For each selected player: Unselect them (remove them from SelectedPlayers) Remove the button from the view Remove the button object from the array Remove the player from Players */ NSLog(@"Debugging Removal: %d", [selectedPlayers count]); for (int i=0; i < [selectedPlayers count]; i++) { NSManagedObject *rPlayer = [selectedPlayers objectAtIndex:i]; [rPlayer setValue:[NSNumber numberWithBool:NO] forKey:@"currentMultiPlayer"]; int index = [players indexOfObjectIdenticalTo:rPlayer]; //this is the index we need for (int j = (index + 1); j < [players count]; j++) { UIButton *tempButton = [playerButtons objectAtIndex:j]; tempButton.tag--; } NSError *error; if ([context hasChanges] && ![context save:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } UIButton *aButton = [playerButtons objectAtIndex:index]; [players removeObjectAtIndex:index]; [aButton removeFromSuperview]; [playerButtons removeObjectAtIndex:index]; } [selectedPlayers removeAllObjects]; NSError *error; if ([context hasChanges] && ![context save:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } NSLog(@"About to refresh YES"); [self refreshAllPlayers:YES]; The big part in the second code snippet is I set them to NO for currentMultiPlayer. NO NO NO NO NO, they should NOT come back when the view does load, NEVER ever ever. Not until I say so. No other relevant part of the code sets that to YES. Which makes me think... perhaps they aren't being saved. Perhaps that doesn't save, perhaps those objects aren't being managed anymore, and so they don't get saved in. Is there a lifetime (metaphorically) of NSManaged object? The Players array is the same I set in the "viewDidLoad" method, and SelectedPlayers holds players that are selected, references to NSManagedObjects. Does it have something to do with Removing them from the array? I'm so confused, some insight would be greatly appreciated!!

    Read the article

  • Need help with writing test

    - by London
    I'm trying to write a test for this class its called Receiver : public void get(People person) { if(null != person) { LOG.info("Person with ID " + person.getId() + " received"); processor.process(person); }else{ LOG.info("Person not received abort!"); } } Here is the test : @Test public void testReceivePerson(){ context.checking(new Expectations() {{ receiver.get(person); atLeast(1).of(person).getId(); will(returnValue(String.class)); }}); } Note: receiver is the instance of Receiver class(real not mock), processor is the instance of Processor class(real not mock) which processes the person(mock object of People class). GetId is a String not int method that is not mistake. Test fails : unexpected invocation of person.getId() I'm using jMock any help would be appreciated. As I understood when I call this get method to execute it properly I need to mock person.getId() , and I've been sniping around in circles for a while now any help would be appreciated.

    Read the article

  • Firefox error for signalR, but does not effect anything

    - by anthonypliu
    I get the 2 following errors in firefox when using signalR and I do not know why: Timestamp: 10/15/2012 3:53:48 PM Error: The connection to http://localhost:81/signalr/connect?transport=serverSentEvents&connectionId=84a7f433-0cc8-4baf-93e9-d4c3ca968466&connectionData=%5B%7B%22name%22%3A%22Chat%22%7D%5D&tid=7 was interrupted while the page was loading. Source File: http://localhost:81/Scripts/jquery.signalR-0.5.3.min.js Line: 9 and Timestamp: 10/15/2012 3:53:50 PM Error: no element found Source File: http://localhost:81/signalr/abort?transport=serverSentEvents&connectionId=84a7f433-0cc8-4baf-93e9-d4c3ca968466 Line: 1 Everything seems to work fine with SignalR and my application works as expected across all browsers, but I just get these errors in firefox only. Any ideas?

    Read the article

  • About the fix for the interference between Company mode and Yasnippet

    - by janoChen
    Emacs wiki says: Company does interfere with Yasnippet’s native behaviour. Here’s a quick fix: http://gist.github.com/265010 The code is the following: (define-key company-active-map "\t" 'company-yasnippet-or-completion) (defun company-yasnippet-or-completion () (interactive) (if (yas/expansion-at-point) (progn (company-abort) (yas/expand)) (company-complete-common))) (defun yas/expansion-at-point () "Tested with v0.6.1. Extracted from `yas/expand-1'" (first (yas/current-key))) I placed that code in my .emacs and the following message appeared: Warning (initialization): An error occurred while loading `c:/Documents and Settings/Alex.AUTOINSTALL.001/Application Data/.emacs.elc': Symbol's value as variable is void: company-active-map To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace. Do I have to place the fix code inside a YASnippet's .el file? or in my .emacs (which throws me an error)?

    Read the article

  • wcf possible to override the dipose of proxy

    - by pdiddy
    I'd like to override the Dispose method of generated proxy (ClientBase) because of the fact that disposing of a proxy calls Close and can throw an exception when the channel is faulted. The only way I came up was to create a partial class to my generatedproxy, make it inherit from IDisposable. : public partial class MyServiceProxy : IDisposable { #region IDisposable Members public void Dispose() { if (State != System.ServiceModel.CommunicationState.Faulted) Close(); else Abort(); } #endregion } I did some test and my Dipose method is indeed called. Do you see any issue with this strategy? Also, I don't like the fact that I'll have to create this partial class for every generated proxy. It be nice if I was able to make my proxy inherit from a base class...

    Read the article

  • Can I prevent iPhone from using 3G under any circumstances?

    - by dageshi
    I'm writing a travel guide related app that will download large databases (60meg) potentially overseas, with the reachability code I can tell when a host is reachable via wifi or 3g BUT I'm worried that if for some reason the wifi connection breaks for a minute or so as some DSL connections are likely to do on occasion the iphone will switch transparently to 3G and without realising I could be racking up someones phone bill with overseas data charges! So I'm wondering if anyone has any experience, in the event of such break in wifi connectivity (wifi still works but it's connection to the net is down) would the reachability code report ReachableViaWWAN? So I could wait till my download code returns, check how the host is currently reachable and if it's via 3g I could abort? Is it possible to select what type of connection I can use aka 3g or wifi exclusively?

    Read the article

  • NSInvocation: object does not implement methodSignatureForSelector

    - by Sam V
    I have this weird crash that only happens when running the app on the device (doesn't happen in the Simulator). It seems like the problem surfaces out of nowhere, as I haven't changed anything on that particular class. I had the very same issue a few days ago, and I ended up fixing it by duplicating the class, renaming it, and changing the referenced class — I haven't changed a single bit of code. So I'm trying to understand why it's doing this. I've read somewhere that usually you get this console error when the object isn't a subclass of NSObject (but it is!). Here's the exact console error message: *** NSInvocation: warning: object 0x679e0 of class 'FFProximityPickerView' does not implement methodSignatureForSelector: -- trouble ahead *** NSInvocation: warning: object 0x679e0 of class 'FFProximityPickerView' does not implement doesNotRecognizeSelector: -- abort And then it crashes. I'd be very thankful for anyone who can help me on this.

    Read the article

  • iOS 5 - Coredata Sqlite DB losing data after killing app

    - by Brian Boyle
    I'm using coredata with a sqlite DB to persist data in my app. However, each time I kill my app I lose any data that was saved in the DB. I'm pretty sure its because the .sqlite file for my DB is just being replaced by a fresh one each time my app starts, but I can't seem to find any code that will just use the existing one thats there. It would be great if anyone could point me towards some code that could handle this for me. Cheers B - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (__persistentStoreCoordinator != nil) { return __persistentStoreCoordinator; } NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"FlickrCoreData.sqlite"]; NSError *error = nil; __persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } return __persistentStoreCoordinator; }

    Read the article

  • CoreData could not fulfill a fault when adding new attribute

    - by cagreen
    I am receiving a "CoreData could not fulfill a fault for ..." error message when trying to access a new attribute in a new data model. If I work with new data I'm ok, but when I attempt to read existing data I get the error. Do I need to handle the entity differently myself if the attribute isn't in my original data? I was under the impression that Core Data could handle this for me. My new attribute is marked as optional with a default value. I have created a new .xcdatamodel (and set it to be the current version) and updated my NSPersistentStoreCoordinator initialization to take advantage of the lightweight migration as follows: NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; NSError *error = nil; persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } Any help is appreciated.

    Read the article

< Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >