Results 1 to 7 of 7

Thread: Drag and drop causes Qt to crash everytime with same segmentation fault

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Posts
    14

    Default Drag and drop causes Qt to crash everytime with same segmentation fault

    I got a really strange crash when going from qt4.8 to qt 5.0.1 with dragging and dropping. Everything worked fine with the old qt 4.8 but as soon as I went in to qt 5.0 it always seem to crash when dragging a file over the mainwindow.

    So I started a totally clean project, created a layout within the centralwidget and then a widget inside the layout.
    The widget tree like this:

    Mainwindow - centralWidget - Layout - newWidget

    Everytime I drag a file over the window/widgets Qt seems to load a lot of libraries to find a template, sure no problem with that (except that it takes some time). Now comes the strange part, when I drop the file (Note QWidget is totally clean, no special settings at all) the program crashes, this happens everytime and it happens when I drop the file in the window or drag the file outside the window.

    It gives me a Segmantation Fault and this disassembler code everytime:

    Qt Code:
    1. Function: lstrlenA
    2. 0x74dcad83 <+0x0006> jge 0x74dcad6d <lstrcpynA+112>
    3. 0x74dcad85 <+0x0008> sti
    4. 0x74dcad86 <+0x0009> roll $0x0,(%edx)
    5. 0x74dcad89 <+0x000c> mov 0x8(%ebp),%eax
    6. 0x74dcad8c <+0x000f> test %eax,%eax
    7. 0x74dcad8e <+0x0011> je 0x74dcadc7 <lstrlenA+74>
    8. 0x74dcad90 <+0x0013> andl $0x0,-0x4(%ebp)
    9. 0x74dcad94 <+0x0017> lea 0x1(%eax),%edx
    10. 0x74dcad97 <+0x001a> mov (%eax),%cl
    11. 0x74dcad99 <+0x001c> inc %eax
    12. 0x74dcad9a <+0x001d> test %cl,%cl
    13. 0x74dcad9c <+0x001f> jne 0x74dcad97 <lstrlenA+26>
    14. 0x74dcad9e <+0x0021> sub %edx,%eax
    15. 0x74dcada0 <+0x0023> movl $0xfffffffe,-0x4(%ebp)
    16. 0x74dcada7 <+0x002a> jmp 0x74dcadc9 <lstrlenA+76>
    17. 0x74dcada9 <+0x002c> mov -0x14(%ebp),%eax
    18. 0x74dcadac <+0x002f> mov (%eax),%eax
    19. 0x74dcadae <+0x0031> mov (%eax),%eax
    20. 0x74dcadb0 <+0x0033> xor %ecx,%ecx
    21. 0x74dcadb2 <+0x0035> cmp $0xc00000fd,%eax
    22. 0x74dcadb7 <+0x003a> setne %cl
    23. 0x74dcadba <+0x003d> mov %ecx,%eax
    24. 0x74dcadbc <+0x003f> ret
    25. 0x74dcadbd <+0x0040> mov -0x18(%ebp),%esp
    26. 0x74dcadc0 <+0x0043> movl $0xfffffffe,-0x4(%ebp)
    27. 0x74dcadc7 <+0x004a> xor %eax,%eax
    28. 0x74dcadc9 <+0x004c> call 0x74df6fc9 <KERNELBASE!IsNLSDefinedString+1209>
    29. 0x74dcadce <+0x0051> ret $0x4
    30. 0x74dcadd1 <+0x0054> int3
    31. 0x74dcadd2 <+0x0055> int3
    32. 0x74dcadd3 <+0x0056> int3
    33. 0x74dcadd4 <+0x0057> int3
    34. 0x74dcadd5 <+0x0058> int3
    35. Function: lstrcmpW
    36. 0x74dcadd6 <+0x0000> mov %edi,%edi
    37. 0x74dcadd8 <+0x0002> push %ebp
    38. 0x74dcadd9 <+0x0003> mov %esp,%ebp
    39. 0x74dcaddb <+0x0005> push %esi
    40. 0x74dcaddc <+0x0006> mov 0xc(%ebp),%esi
    41. 0x74dcaddf <+0x0009> push %edi
    42. 0x74dcade0 <+0x000a> mov 0x8(%ebp),%edi
    43. 0x74dcade3 <+0x000d> push $0xffffffff
    44. 0x74dcade5 <+0x000f> push %esi
    45. 0x74dcade6 <+0x0010> push $0xffffffff
    46. 0x74dcade8 <+0x0012> push %edi
    47. 0x74dcade9 <+0x0013> push $0x0
    48. 0x74dcadeb <+0x0015> push $0x400
    49. 0x74dcadf0 <+0x001a> call 0x74de2e93 <KERNELBASE!CopySid>
    50. 0x74dcadf5 <+0x001f> test %eax,%eax
    51. 0x74dcadf7 <+0x0021> jne 0x74dcae54 <lstrcmpW+126>
    52. 0x74dcadf9 <+0x0023> push $0xffffffff
    To copy to clipboard, switch view to plain text mode 

    System is: Windows 7 x64
    Qt version: Qt 5.0.1 with MinGW compiler

    Anyone have any idea about this, seems like a Qt bug or I'm just doing something wrong?

    Edit:
    Tried to build my small project in Release mode and now the drag worked fine but when in Debug mode it crashes all the time, maybe I'm missing some plugin for debugger?
    Actually I saw now that I got these messages in Application Output, could they be some kind of reason:
    Qt Code:
    1. Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\plugins\platforms\qminimald.dll"
    2. Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\plugins\platforms\qwindowsd.dll"
    To copy to clipboard, switch view to plain text mode 
    Last edited by Sajjmon; 7th March 2013 at 17:03. Reason: More testing

Similar Threads

  1. Crash-Segmentation fault
    By poporacer in forum Newbie
    Replies: 4
    Last Post: 12th December 2010, 23:13
  2. QPainter crash when generating icon after drag-drop
    By craigTheBrit in forum Qt Programming
    Replies: 3
    Last Post: 16th November 2010, 08:52
  3. Segmentation Fault
    By freekill in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2010, 15:31
  4. QListWidgetItem subclass - Crash program in drag/drop
    By estanisgeyer in forum Qt Programming
    Replies: 1
    Last Post: 17th April 2009, 09:24
  5. (Another) segmentation fault
    By Lebowski in forum Qt Programming
    Replies: 27
    Last Post: 6th April 2006, 06:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.