Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Is this a bug in Qt



  • //  Qt will crash after playing for about 2 minutes
    mAlarmPlayer->setMedia(QUrl(QLatin1String("qrc:/sound/alarm.wav")));
    mAlarmPlayer->play();
    

    微信截图_20200616172606.png

    1592299623(1).jpg

    //  no problem
    mAlarmPlayer->setMedia(**QUrl::fromLocalFile(QLatin1String("./sound/alarm.wav"))**);
    mAlarmPlayer->play();
    
    //  no problem
    mAlarmPlayer->setMedia(QUrl(QLatin1String("qrc:/sound/alarm.mp3")));
    mAlarmPlayer->play();

  • Qt Champions 2019

    @simon_01 said in Is this a bug in Qt:

    Qt will crash after playing for about 2 minutes

    Do you have stack trace after crash?
    Why do you have these ** in the URL?



  • What is the file size of alarm.wav?And your exe?
    If the file is too big, it cannot be compiled to the exe.
    Or use QFile to check if the "qrc:/sound/alarm.wav" file exists / have the correct size.



  • @Bonnie alarm.wav(47.7KB is this too big?) and exe(8.22MB)



  • Hi, if you rename "qrc:/sound/alarm.mp3" to "qrc:/sound/alarm.wav" does it still crash? (because now alarm.wav is smaller in size)



  • @jsulm
    I have dump file, I don't have permission to upload files, The following is the result of analyzing with '!analyze -v' in windbg

    
    Microsoft (R) Windows Debugger Version 10.0.18362.1 AMD64
    Copyright (c) Microsoft Corporation. All rights reserved.
    
    
    Loading Dump File [C:\Users\Bluetel\Desktop\crash_20200616154812.dmp]
    User Mini Dump File: Only registers, stack and portions of memory are available
    
    Symbol search path is: srv*
    Executable search path is: 
    Windows 7 Version 7601 (Service Pack 1) MP (4 procs) Free x64
    Product: WinNt, suite: SingleUserTS
    Machine Name:
    Debug session time: Tue Jun 16 15:48:12.000 2020 (UTC + 8:00)
    System Uptime: not available
    Process Uptime: 0 days 0:07:27.000
    ................................................................
    ................................................................
    ..........................................................
    This dump file has an exception of interest stored in it.
    The stored exception information can be accessed via .ecxr.
    (1620.1e90): Access violation - code c0000005 (first/second chance not available)
    For analysis of this file, run !analyze -v
    *** WARNING: Unable to verify timestamp for ntdll.dll
    *** WARNING: Unable to verify timestamp for KERNELBASE.dll
    ntdll+0x6a55a:
    00000000`7756a55a c3              ret
    0:000> !analyze -v
    *******************************************************************************
    *                                                                             *
    *                        Exception Analysis                                   *
    *                                                                             *
    *******************************************************************************
    
    *************************************************************************
    ***                                                                   ***
    ***                                                                   ***
    ***    Either you specified an unqualified symbol, or your debugger   ***
    ***    doesn't have full symbol information.  Unqualified symbol      ***
    ***    resolution is turned off by default. Please either specify a   ***
    ***    fully qualified symbol module!symbolname, or enable resolution ***
    ***    of unqualified symbols by typing ".symopt- 100". Note that     ***
    ***    enabling unqualified symbol resolution with network symbol     ***
    ***    server shares in the symbol path may cause the debugger to     ***
    ***    appear to hang for long periods of time when an incorrect      ***
    ***    symbol name is typed or the network symbol server is down.     ***
    ***                                                                   ***
    ***    For some commands to work properly, your symbol path           ***
    ***    must point to .pdb files that have full type information.      ***
    ***                                                                   ***
    ***    Certain .pdb files (such as the public OS symbols) do not      ***
    ***    contain the required information.  Contact the group that      ***
    ***    provided you with these symbols if you need this command to    ***
    ***    work.                                                          ***
    ***                                                                   ***
    ***    Type referenced: $ntdllsym!_CONTEXT                            ***
    ***                                                                   ***
    *************************************************************************
    *** WARNING: Unable to verify timestamp for dsengine.dll
    ***** OS symbols are WRONG. Please fix symbols to do analysis.
    
    Unable to load image C:\Windows\System32\ole32.dll, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for ole32.dll
    Unable to load image C:\Windows\System32\kernel32.dll, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for kernel32.dll
    
    KEY_VALUES_STRING: 1
    
    
    PROCESSES_ANALYSIS: 1
    
    SERVICE_ANALYSIS: 1
    
    STACKHASH_ANALYSIS: 1
    
    TIMELINE_ANALYSIS: 1
    
    
    DUMP_CLASS: 2
    
    DUMP_QUALIFIER: 400
    
    CONTEXT:  (.ecxr)
    rax=00000000078b68f0 rbx=000000000776aa90 rcx=00000000078b68f0
    rdx=00000000059e2310 rsi=000000000776aa90 rdi=00000000078b68f0
    rip=0000000000000000 rsp=00000000002da208 rbp=000007feea3c0034
     r8=0000000000000000  r9=00000000059e2310 r10=0000000000524e00
    r11=0000000000000202 r12=0000000000532b00 r13=000000000776aa90
    r14=00000000002dec48 r15=0000000000522000
    iopl=0         nv up ei pl nz na po nc
    cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010206
    00000000`00000000 ??              ???
    Resetting default scope
    
    FAULTING_IP: 
    +0
    00000000`00000000 ??              ???
    
    EXCEPTION_RECORD:  (.exr -1)
    ExceptionAddress: 0000000000000000
       ExceptionCode: c0000005 (Access violation)
      ExceptionFlags: 00000000
    NumberParameters: 2
       Parameter[0]: 0000000000000008
       Parameter[1]: 0000000000000000
    Attempt to execute non-executable address 0000000000000000
    
    BUGCHECK_STR:  5D3FA9BD
    
    PROCESS_NAME:  ntdll.wrong.symbols.dll
    
    WRONG_SYMBOLS_TIMESTAMP: 5d3fa9bd
    
    WRONG_SYMBOLS_SIZE: 19f000
    
    FAULTING_MODULE: 0000000077500000 ntdll
    
    DEBUG_FLR_IMAGE_TIMESTAMP:  5d3fa9bd
    
    ADDITIONAL_DEBUG_TEXT:  
    You can run '.symfix; .reload' to try to fix the symbol path and load symbols. ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]
    
    ANALYSIS_SESSION_HOST:  DESKTOP-DDVB2AH
    
    ANALYSIS_SESSION_TIME:  06-17-2020 09:45:32.0090
    
    ANALYSIS_VERSION: 10.0.18362.1 amd64fre
    
    STACK_TEXT:  
    00000000`00000000 00000000`00000000 WRONG_SYMBOLS!WRONG_SYMBOLS+0x0
    
    
    THREAD_SHA1_HASH_MOD_FUNC:  2a06fe893fc51638e55bcc8ee02bcdf6f10cbc26
    
    THREAD_SHA1_HASH_MOD_FUNC_OFFSET:  214d5e958d92c59434e5414a89d1e95c2f82d12a
    
    THREAD_SHA1_HASH_MOD:  79d1e41e8e0e291e73ec18352c568efa4ef4b5ab
    
    SYMBOL_STACK_INDEX:  0
    
    FOLLOWUP_NAME:  MachineOwner
    
    STACK_COMMAND:  ** Pseudo Context ** ManagedPseudo ** Value: 1a3b292bd00 ** ; kb
    
    EXCEPTION_CODE: (NTSTATUS) 0x5d3fa9bd - <Unable to get error code text>
    
    EXCEPTION_CODE_STR:  5D3FA9BD
    
    EXCEPTION_STR:  WRONG_SYMBOLS
    
    IMAGE_NAME:  ntdll.wrong.symbols.dll
    
    MODULE_NAME: ntdll_wrong_symbols
    
    SYMBOL_NAME:  ntdll_wrong_symbols!5D3FA9BD19F000
    
    BUCKET_ID:  WRONG_SYMBOLS_X64_TIMESTAMP_190730-022149
    
    DEFAULT_BUCKET_ID:  WRONG_SYMBOLS_X64_TIMESTAMP_190730-022149
    
    PRIMARY_PROBLEM_CLASS:  WRONG_SYMBOLS
    
    FAILURE_EXCEPTION_CODE:  5D3FA9BD
    
    FAILURE_IMAGE_NAME:  ntdll.wrong.symbols.dll
    
    BUCKET_ID_IMAGE_STR:  ntdll.wrong.symbols.dll
    
    FAILURE_MODULE_NAME:  ntdll_wrong_symbols
    
    BUCKET_ID_MODULE_STR:  ntdll_wrong_symbols
    
    FAILURE_FUNCTION_NAME:  5D3FA9BD19F000
    
    BUCKET_ID_FUNCTION_STR:  5D3FA9BD19F000
    
    BUCKET_ID_OFFSET:  0
    
    BUCKET_ID_MODTIMEDATESTAMP:  0
    
    BUCKET_ID_MODCHECKSUM:  0
    
    BUCKET_ID_MODVER_STR:  0.0.0.0
    
    BUCKET_ID_PREFIX_STR:  WRONG_SYMBOLS_X64_TIMESTAMP_190730-022149
    
    FAILURE_PROBLEM_CLASS:  WRONG_SYMBOLS
    
    FAILURE_SYMBOL_NAME:  ntdll.wrong.symbols.dll!5D3FA9BD19F000
    
    FAILURE_BUCKET_ID:  WRONG_SYMBOLS_X64_TIMESTAMP_190730-022149_5D3FA9BD_ntdll.wrong.symbols.dll!5D3FA9BD19F000
    
    TARGET_TIME:  2020-06-16T07:48:12.000Z
    
    OSBUILD:  7601
    
    OSSERVICEPACK:  24511
    
    SERVICEPACK_NUMBER: 0
    
    OS_REVISION: 0
    
    SUITE_MASK:  256
    
    PRODUCT_TYPE:  1
    
    OSPLATFORM_TYPE:  x64
    
    OSNAME:  Windows 7
    
    OSEDITION:  Windows 7 WinNt (Service Pack 1) SingleUserTS
    
    OS_LOCALE:  
    
    USER_LCID:  0
    
    OSBUILD_TIMESTAMP:  2019-07-30 10:22:54
    
    ANALYSIS_SESSION_ELAPSED_TIME:  61c3
    
    ANALYSIS_SOURCE:  UM
    
    FAILURE_ID_HASH_STRING:  um:wrong_symbols_x64_timestamp_190730-022149_5d3fa9bd_ntdll.wrong.symbols.dll!5d3fa9bd19f000
    
    FAILURE_ID_HASH:  {75c2ac9f-8b96-6fba-8f0b-c9b14db11d9f}
    
    Followup:     MachineOwner
    ---------
    
    

    I have removed the **, which was generated using bold when editing.



  • @hskoglund
    Runs normally under Qt5.4 version, now upgraded to Qt5.12, there is a crash

    If it is converted to MP3 format is no problem



  • Hi, if you do mAlarmPlayer->setMedia(...) and mAlarmPlayer->play() not from inside dsengine.dll but instead from RChatDispatchSys.exe, does it still crash?



  • @hskoglund

    I don't quite understand your idea, dsengine.dll is a Qt plugin



  • @simon_01 47KB should be fine.
    I've tried to play a qrc wav file using QMediaPlayer with Qt5.12.7 MSVC2017 32bit and there's no crash.

    1. Did you try some different wav files?
    2. Did you try to play it with QSoundEffect?
    3. Since the crash is after 2 minutes, how can you sure it is caused by the media player?

  • Moderators

    @simon_01 since it works with mp3(?) and only wav does not work, have you tried updating your codecs ?

    Qt does not ship its own codecs but uses the installed ones (IIRC)



  • Sorry about my previous question (I hadn't got my morning coffee) Anyway, what I meant (and to add to @Bonnie's questions):

    If you first do:
    mAlarmPlayer->setMedia(QUrl(QLatin1String("qrc:/sound/alarm.mp3")));
    mAlarmPlayer->play();
    (which doesn't crash) and then immediately after do (in the same program):

    mAlarmPlayer->setMedia(QUrl(QLatin1String("qrc:/sound/alarm.wav")));
    mAlarmPlayer->play();
    does it still crash?



  • @Bonnie
    1.yes, i did

    2.I replaced QMediaPlayer with QSound and it works fine

    3.I tested it many times, and it was determined that it was caused by QMediaPlayer



  • @J-Hilk
    QSound works fine


Log in to reply