w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
C# Application does not crash in VS BUT CRASH on system running
Your program is likely throwing an exception, and it's getting written to the console, but you don't have anything from stopping the console from closing immediately after the message is written. Add a Console.ReadKey(); after your try/catch block.

Categories : C#

Why does my application crash?
This is the main cause: Caused by: java.lang.IllegalThreadStateException: Thread already started. at java.lang.Thread.start(Thread.java:1227) at com.example.threadexample.ThreadExample.buttonClick(ThreadExample.java:60) You cannot reuse the same Thread object. You have to create a new Thread object before you call .start() again. From the documentation: It is never legal to start a thread more than once. In particular, a thread may not be restarted once it has completed execution.

Categories : Android

Get log of Application Crash & ANR?
You can trap and log it manually, but this is usually solved by integrating crash handling and reporting services like TestFlight, New Relic, and other similar services. There are some self-hosted, open source tools like android-remote-stacktrace too. The libraries are set to capture any unhandled exception your application, log the exception to a remote server so you can view it without requiring the user to send it to you manually, and will then allow the original exception to be rethrown as normal. Android Handling the Unexpected also covers the idea in detail with some sample code if you really want to do it yourself. That post also lists several more example external services.

Categories : Android

C++ application crash
what kind of issue is this Any crash inside malloc or free is a sure sign of previous heap corruption. Use Valgrind or AddressSanitizer (incorporated into GCC-4.8 as well) to find the root cause. Ignore vdso -- as Tom Tromey said, it has nothing to do with the problem.

Categories : C++

Strange crash of an application
Listview reuses rows views on scrolling instead of creating new one. So, in scrolling, your "convert" will not null and you will not run "name = (TextView) row.findViewById( R.id.product_name )" and "name" will leaves null. So, when you later will try to set text into name, you will get NullReferenceException. You should always init your widgets object by findViewById. Change your code and it should works good: @Override public View getView(int position, View convert, ViewGroup parent) { View row = convert; ImageView image = null; TextView name = null, price = null; if( row == null ) { LayoutInflater inflater = ((Activity) context).getLayoutInflater(); row = inflater.inflate( resource, parent, false ); } image = (ImageView) row.findViewById( R

Categories : Android

execl() causes an application crash
You forgot to null-terminate your list of arguments to execlp(). See e.g. http://linux.die.net/man/3/execlp or http://msdn.microsoft.com/en-us/library/vstudio/1kxct8h0.aspx.

Categories : C

Why does qwindows.dll from Qt5.0.2 cause my application to crash
Answering my own question... We had a batch script that automatically copied the relevant prebuilt qt dlls into our application's installation directory from subdirectories of the latest downloaded qt package's vs2010 directory. It appears that in Qt5.0.1, Qt dlls appeared in both the lib and bin subdirectories of msvc2010, whereas in Qt5.0.2, the Qt dlls appear only in the bin subdirectory. Since we were automatically copying dlls from the lib subdirectory, when we migrated to 5.0.2 nothing was copied and the old 5.0.1 dlls remained in our application's installation directory. The qwindows.dll file, however, is still located in msvc2010pluginsplatforms and so that did get updated and was not compatible with the old 5.0.1 dlls. I don't think that we did anything funny with the downloa

Categories : Windows

C#.Net X64 Application crash when using 64bit dll
I have finally resolved the problem. When I used Microsoft Debug Diagnostic Tool (from http://www.microsoft.com/en-gb/download/details.aspx?id=26798) the crash dump shows that there is a problem loading my external dll or its dependencies. I then loaded the my external dll into Dependency Walker (http://dependencywalker.com/) it shows that it can't find a dependency "msvcp100.dll" which is linked to Microsoft VC++. So I installed Microsoft re-distributable package (x64) and my app doesn't crash any more. Thanks every one for your help...

Categories : C#

Why does my Application crash at startup?
I see some flaw in your code. As far as I know, the ProgressBar value should be less than or equal to 100. You are setting it to (progress * 100) Also, once progress == 100, you hide the progress bar, this will take place when progress = 1. Then you hide the progress bar. Hope this helps. private ProgressBar mProgress; private int mProgressStatus = 0; mProgress = (ProgressBar) findViewById(R.id.progress_bar); // Start lengthy operation in a background thread new Thread(new Runnable() { public void run() { while (mProgressStatus < 100) { mProgressStatus = doWork(); // Update the progress bar mHandler.post(new Runnable() { public void run()

Categories : Java

Downcast using EL
You don't need to downcast. EL (note: EL, not JSTL!) uses reflection to find the method. If it's absent, then it will just throw a PropertyNotFoundException. Update: if that is in turn your actual problem (for which you thus incorrectly thought that "downcasting in JSTL" would somehow be the right solution and thus you essentially asked the wrong question), then you should solve it differently: Just don't mix different types in a collection. Put it in a <c:catch> and swallow the exception. <c:catch var="e"> ${element.version} </c:catch> This is however poor design. Determine the instance's actual type inside a <c:if>. <c:if test="${element['class'].simpleName == 'SubClass'}"> ${element.version} </c:if> Better would be to abstract it aw

Categories : Java

Why action bar in titanium crash my application?
try wrapping it in onCreateOptionsMenu win.activity.onCreateOptionsMenu = function(e) { actionBar = win.activity.actionBar; if (actionBar) { alert("ACTIVITY"); actionBar.backgroundImage = "/images/bg_top.png"; actionBar.title = "New Title"; actionBar.onHomeIconItemSelected = function() { Ti.API.info("Home icon clicked!"); }; } else { alert('missing action bar'); } });

Categories : Android

Crash Debugging Win32 Application
0:000> ?@esi+@edi Evaluate expression: 36278408 = 02299088 0:000> !address 02299088 ProcessParametrs 00311020 in range 00310000 00410000 Environment 02294848 in range 02290000 02390000 02290000 : 02290000 - 00100000 Type 00020000 MEM_PRIVATE Protect 00000004 PAGE_READWRITE State 00001000 MEM_COMMIT Usage RegionUsageHeap Handle 00310000

Categories : Debugging

linux application crash due to Out of memory
2013 Jun 18 16:30:53+00:00 sys-nam kernel [warning] [<ffffffff802ffddc>] out_of_memory+0x74/0xe8 2013 Jun 18 16:30:53+00:00 sys-nam kernel [warning] [<ffffffff80304588>] __alloc_pages_nodemask+0x718/0x730 Most likely you are running out of heap space due to calls to new, malloc, allocate, or the like, as the error occurs during calls to the __alloc_pages_nodemask routine. Look in your code for all instances of code that allocates heap memory and ensure that the memory is getting released when you are finished using it.

Categories : C++

WPF event that occurs after application crash
1) there are two event handlers: Dispatcher.UnhandledException += Dispatcher_UnhandledException; All unhandled exceptions in UI thread. AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; All other exceptions ... 2) there is no way to catch the situation when your app is killed through ALT+CTR+DELETE The only Idea I can think of... create a watch dog app that checks the status of main app...

Categories : C#

iOS MediaPlayer makes application crash
I see this whenever I have an outlet or action that is no longer hooked up properly. 1.) Open storyboard 2.) Select playButton 3.) Remove all outlets and actions from this item 4.) Remove plugs from your class that were previously attached (especially in dealloc) 5.) Create new outlet and control-drag from the storyboard to your class. Good to go. -A little overkill but gets the job done for me everytime.

Categories : IOS

Timer ends = application crash
Why don't you use a CountDownTimer ? It seems more suitable to your task and it handles all the callbacks on the UI thread for you.

Categories : Android

Application crash on new thread starts
void MainWindow::opthread(){ newthread th; th.start(); } You are creating the thread object on the stack. He will be destroyed when the function opthread returns. And from the Qt documentation : Deleting a running QThread (i.e. isFinished() returns false) will probably result in a program crash. Wait for the finished() signal before deleting the QThread. You need to provide a greater lifespan for your newthread object. waiting for it to be finished is not an option, as it will result in a sequential execution. Either you use class members or you allocate your thread objects on the heap. Personal opinion: Not only sub-classing QThread is not the most appropriate method of getting it done, I believe you don't need a thread at all.

Categories : C++

Is such a downcast safe?
Since you are using unique_ptr<BaseComponent>, naturally there could be times when the conversion fails: the insertion of new data in the vector and consumption of that data are done in unrelated places, and in such a way that the compiler cannot enforce it. Here is an example of an invalid cast: struct AnotherComponent : public Component<AnotherComponent> { virtual ~AnotherComponent () {} }; std::vector<std::unique_ptr<BaseComponent>> mComponents; mComponents.emplace_back(new AnotherComponent); // !!! This code compiles, but it is fundamentally broken !!! auto *pos = mComponents[0]->as<PositionComponent>(); pos->x = 1337; In this respect, using dynamic_cast would provide better protection against incorrect usage of the as<T> function. Not

Categories : C++

How to downcast properly in C++
Make sure your constructor is at least protected so that child classes can use it. Not sure what you fear about memory overflow but this: class Base { public: static Base* getInstance(); virtual ~Base() {}; protected: Base() {}; }; class Derived : public Base {}; // Implementation Base* Base::getInstance() { return new Derived(); } int main() { Base::getInstance(); }; Works perfectly. Now I would advise you against returning a raw pointer in that situation (std::unique_ptr would be way better) but that's probably off-topic.

Categories : C++

ios Application crash : failed to resume in time
0x8badf00d: This code indicates that an application was terminated by iOS because a watchdog timeout occurred. Basically, the application took too long to launch, terminate, or respond to system events. You're doing something that takes too long. Look at the backtrace and try to symbolicate it (convert from the hexidecimal addresses in the executable code to method names and line numbers) so that you can understand where the problem is. This thread should help you out there. Demystifying iOS App Crashes is a tutorial I found very useful.

Categories : IOS

crash application while delete section from UITableView
I guess the numberOfSectionsInTableView: returns the previous number of sections. You must make sure that what you tell the table view to do also happens in the data source. That is, if you delete a section, then the numberOfSectionsInTableView must also return a number one less than before. The same stands for cells and everything else. This is probably described in the error you get.

Categories : Objective C

CFRelease causing crash in iPad application
UIGraphicsGetImageFromCurrentImageContext() returns a UIImage *, not a CGImageRef. And you don't own the resulting UIImage, so you don't want to release it (or CFRelease() it). try: UIImage *finalImage = UIGraphicsGetImageFromCurrentImageContext(); instead.

Categories : IOS

Application crash for unknown reasons on WinXP
Here's another way to track this down without Delphi on the VM... Copy your project. Remove all the units from Project Source except your main form. Launch your application from XP see if it crashes. If it crashes...then look at the units being dragged in from your main form...start removing them until your program stops crashing. If it doesn't crash...start adding units/forms back into your project source until it crashes. Do you have JCL/JVCL installed(JEDI)? If so create a Logger...note the Logger needs to be created and hooked before your MainForm code executes...You will also need to set up a detailed Stack Trace from Unhandled Exceptions, in Delphi select->Project/Options/Linker/Map file/Detailed} You will need something like this in your Logger unit procedure HookGlobalExcep

Categories : Delphi

iOS Subview button causing application to crash
Sounds like its been dealloc'ed on you. Try turning on Zombie mode, crash the app again and see if it points you to whats going on, it will tell which object is trying to do something after being released. Xcode -> Click your scheme -> Edit Scheme -> Run -> Diagnostics -> Tick Enable Zombie Objects Another thing to try is to watch your subView in the debug area, this will tell you when your subView is released. Example of setting watch Also if you have not already tried it, try keep a strong/retain reference to your subview. If you can't get it working post the code you create the view with. EDIT: in .h @property (nonatomic, strong) PickupTimeViewController *pickupTimeView; in .m self.pickupTimeView = [[PickupTimeViewController alloc]init]; [selectedView addChildViewControl

Categories : IOS

OpenCV application crash related to libstdc++-6.dll
Turns out it was not due to the libstdc++-6.dll. The answer of the related thread: OpenVC 2.4.5, eclipse CDT Juno, MinGW error 0xc0000005 actually had solved my problem. I didn't succeed because I left both the pre-built (that came along with opencv download) opencv libraries (*.dll) and the re-built (according to the above solution) libraries exposed under system path. As a result, my program used the pre-built version and ignored the new builds. After I replaced the pre-built *.dll's with the re-built ones, the program ran without any issue.

Categories : C++

Application Crash on Fast switching between UISegment
Please post the error log, if it is array out of bounds exception I suspect these two methods - (void)fetchedData:(NSData *)responseData & your tableViewDatasource To find which line of code causes this crash do this. Go to break points tab on the left side and click + in the bottom. Then you would get something like this: Just hit done, run your code again and tell us which line caused the exception. I understood your problem, why do you want to take the URL from the array in this function - (void) displayingSmallImage:(NSIndexPath *)indexPath you could pass the Url to load to that function, from cellForRowAtIndex like this: NSArray *argsToPass=[NSArray arrayWithObjects:indexPath,self.feedsArray[indexPath.row][@"icon_url"]]; [NSThread detachNewThreadSelector:@

Categories : Iphone

Android Application Crash on button event
change String s=E1.toString(); String m=E2.toString(); to String s=E1.getText().toString(); String m=E2.getText().toString(); for getting text from EditText's on Button Click. currently you are trying to parse View's as Integer

Categories : Android

Why do minor errors crash my SproutCore application?
Web developers are used to being able to let minor errors go unnoticed. This is appropriate: since short-lived websites often have minimal local state to maintain, many minor errors won't impact the user experience, so it may not be worth the development time required to fix them. Application developers, on the other hand, are used to having to carefully handle errors. In desktop .NET or Cocoa, for example, the operating system will proactively crash an application that throws an unhandled error. This is because applications generally assume that they are long-lived, and have to manage an internally-consistent state. An error is a sign that this internal state has likely become unmanaged & unstable, and in order to prevent unexpected (or worse) behavior, the application must be termin

Categories : Misc

Google Maps Android API v2 application crash
There is some kind of mismatch between the package you specified in your Manifest file and the package you have provided for the Activities in it. try to change: <activity android:name="in.wptrafficanalyzer.locationgooglemapv2demo.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> to: <activity android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.cat

Categories : Android

onResume() makes my application crash with no reason
you must complete the life cycle of android activity. If you are override onResume() or any method of the life cycle you should call the super.onResume(); public void onResume(){ super.onResume(); /// Your Code } UPDATE Condition you checking is onResume() method is incorrect. if(play) // UPDATE HERE { if(!playing)// UPDATE HERE { if(numbl>0) { letter=thefull.substring(cur, cur+1); if(letter.equals("m")) { oursong = MediaPlayer.create(MainActivity.this, R.raw.m); oursong.start(); playing=true; } else if(letter.equals("a")) { oursong = MediaPlay

Categories : Java

MAC Application crash on button click event
It looks like you're sending a btnClicked message to a NSString object. Can you post the code where you call [... bntClicked] ? The behaviour you are describing can mean either that the viewController implementing the btnClicked method gets deallocated before the action is called or that the action in interface builder is not set correctly. You should add a log statement in the dealloc method of the viewController implementing the btnClicked and see that it does not get deallocated before the action is called. If you're using ARC make sure that you have a member data pointing to your view controllers so they don't get released. Also you should delete the ibaction association in interface builder and do it again making sure that you connect the button to the correct view controller.

Categories : Objective C

Android : Application with Crash dump report
I suggest to take a look at ACRA. https://github.com/ACRA/acra At least if you don't want to use it, it's still open source so you can take a look at the code. They do a lot of thing you want to achieve and when looking at the code you may find answers to your question. I forked ACRA to make some of the things you mention in your questions : How do I get the logfile from an Android device? You can log into the acra report file everything you want. We use a special logger that write into the acra logfile. So we know what is the sequence of events that triggered the crash. Programmatically get log cat data It's a text file, we use [sections] and timestamp/key=value to display logs to the users before sending the report. Be careful to anonymize your log reports and do not put

Categories : Android

Can't not downcast in java at runtime
An animal could not be a dog can be a cat or something else like in your case an Animal Animal a= new Animal(); // a points in heap to Animal object Dog dog = (Dog)a; // A dog is an animal but not all animals are dog For downcasting you have to do this Animal a = new Dog(); Dog dog = (Dog)a; By the way, downcasting is dangerous you can have this RuntimeException , if it's for training purpose it's ok. If you want to avoid runtime exceptions you can do this check but it'll be a little more slower. Animal a = new Dog(); Dog dog = null; if(a instanceof Dog){ dog = (Dog)a; }

Categories : Java

MadExcept for delphi is not printing stacktrace after application crash
The reason why madExcept is not handling the exception is because you already caught it with on E:Exception do handling it yourself. Just give madExcept.HandleExcept the exception to handle it: madExcept.HandleException(etNormal, E);

Categories : Delphi

Mac OS X-specific operations make application crash on other OS's despite checking for OS first
The second line of your if block is the problem (as well as the fourth). Even though your code doesn't ever call that function, the JVM still has to try to load the com.apple.eawt.Application class at initialization of whatever class contains that if statement, simply because of the reference to it. When you're not on Mac, that class doesn't exist, hence the error. A workaround would be to use Reflection to make that function call. This should prevent the class loader from trying to load that class until the call is actually made. Example javax.swing.ImageIcon icon = ... Class c = Class.forName("com.apple.eawt.Application"); Method m = c.getMethod("getApplication"); Object applicationInstance = m.invoke(null); m = applicationInstance.getClass().getMethod("setDockIconImage", javax.swi

Categories : Java

Unrecognized selector sent to instance and crash in main.m in iOS application
The error message -[UITableViewController setDetails:]: unrecognized selector ... shows that detailViewController is not an instance of AppTestDetailViewController as you expect, but "only" a UITableViewController. One possible reason could be that you did not set the "Custom Class" for the controller in the storyboard file.

Categories : IOS

Restore Windows application crash Debug button
Found in this answer. Go to the Tools | Options | Debugging | Just-In-Time dialog. Then make sure all Native and Managed (if you're debugging a .NET application) are checked. Next time you get a crash, the Visual Studio Just-In-Time debugger will come up. And this restores automatically the Debug button:

Categories : Visual Studio

Canvas view crash the application on touch events
It looks like mScaleDetector is only initialized in one of the constructor. It should be initialized in all constructors. A common pattern is to create an init() method and place all you initializing in there then call that method from all constructors. Note: It's always helpful to post a StackTrace... You should be able to see which constructor got called.

Categories : Android

Resolving crash to desktop when application loses focus
I ended up discovering that the source of my problem was that I was performing work on the interface's main thread, and as a result it was causing my program to hang and crash to desktop. I created a BackgroundWorker and placed my work code into the DoWork event, then moved the ProgressBar indicator update into the ProgressChanged event. More details regarding BackgroundWorker and its implementation at MSDN. In short, the lesson learned for me is that if an activity in a Form is going to take longer than a few seconds, it should be done using a BackgroundWorker to prevent hanging up the interface.

Categories : C#

Downcast ObjectContext to Entities collection
You can't cast an object to just any type that you feel like. It actually has to be of that type. It looks like what you are really trying to do is pass a connection string to your MyEntities class. Assuming the generated code does not provide one already, just add a new partial class with a constructor that takes a string and pass it to the base ObjectContext. public partial class MyEntities : ObjectContext { public MyEntities(string connectionString) : base(connectionString) { } } Then use this code: var ctx = new MyEntities(entityConnectionString);

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.