Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue regarding CreateProcess #282

Open
vulcan-dev opened this issue Jul 4, 2024 · 6 comments
Open

Issue regarding CreateProcess #282

vulcan-dev opened this issue Jul 4, 2024 · 6 comments
Labels
Bug A report of unintended or broken behavior. Debugger Pertains to the debugger.

Comments

@vulcan-dev
Copy link

vulcan-dev commented Jul 4, 2024

I'm trying to debug a process which is launched via CreateProcessW, but it doesn't seem like it's supported.

Edit: So it turns out it is supported, but it just doesn't work very well. I can get around this issue by placing a breakpoint on one of these two lines:

    VirtualFreeEx(pi.hProcess, thread, 0, MEM_RELEASE);
    ResumeThread(pi.hThread);

I can then continue and it will be fine. If I place a breakpoint on anything above or below these and continue, I will get the error below

[Window Title]
Fatal Exception

[Content]
A fatal exception (code 0xc0000005) occurred. The process is terminating.

Press Ctrl+C to copy this text to clipboard, then create a new issue at
https://github.com/EpicGames/raddebugger/issues

Call stack:

  1. [0x7ff7d7349e4c] df_display_string_from_entity +44, df_core.c line 1432
  2. [0x7ff7d734f15b] df_entity_fuzzy_item_array_from_entity_array_needle +267, df_core.c line 1374
  3. [0x7ff7d72e455d] df_view_ui_Scheduler +717, df_views.c line 5481
  4. [0x7ff7d73a9bcd] df_window_update_and_render +174077, df_gfx.c line 7282
  5. [0x7ff7d743398a] update_and_render +4698, raddbg.c line 335
  6. [0x7ff7d73bd9b8] entry_point +6888, raddbg_main.c line 393
  7. [0x7ff7d73d3027] main_thread_base_entry_point +887, base_entry_point.c line 84
  8. [0x7ff7d7435df8] wWinMain +360, os_core_win32.c line 1855
  9. [0x7ff7d7436fea] __scrt_common_main_seh +262, exe_common.inl line 288
  10. [0x7ffc44bc257d] KERNEL32
  11. [0x7ffc4690aa48] ntdll

Version: 0.9.11 [aed9a28]

[Close]

@ryanfleury
Copy link
Collaborator

This is supported and tested normally, so there is something else going on. I can't seem to deduce what that is from the call stack. Are you able to send the EXE/PDB, or if not, send a minimal reproduction example, so that I can try to reproduce locally? I cannot reproduce this with any of my tests.

@vulcan-dev
Copy link
Author

vulcan-dev commented Jul 4, 2024

This is supported and tested normally, so there is something else going on. I can't seem to deduce what that is from the call stack. Are you able to send the EXE/PDB, or if not, send a minimal reproduction example, so that I can try to reproduce locally? I cannot reproduce this with any of my tests.

Apologies, I have updated my initial message with more information. The issue might be the thread I am creating, not CreateProcess itself

@ryanfleury
Copy link
Collaborator

Can you unpack that? What is unique about the thread you are creating? The Scheduler UI is crashing, and it should work regardless of which processes/threads are created.

@vulcan-dev
Copy link
Author

Can you unpack that? What is unique about the thread you are creating? The Scheduler UI is crashing, and it should work regardless of which processes/threads are created.

Nothing really, the code for it is here:
https://github.com/TDMP-Team/TDMP-Refactor/blob/6123fd4c9f0db487545824483e705311c5ebc9a8/projects/launcher/src/main.cc#L146

But it simply launches a process, allocates memory, loads a dll, and then waits for the process to terminate

@ryanfleury
Copy link
Collaborator

ryanfleury commented Jul 4, 2024

Ah okay, interesting, I think this might have to do with the CreateRemoteThread. I don't know why that'd cause an issue but it is not a case that I've explicitly tested. I'll test with that as soon as I get a chance.

@ryanfleury ryanfleury added the Bug A report of unintended or broken behavior. label Jul 4, 2024
@vulcan-dev
Copy link
Author

Ah okay, interesting, I think this might have to do with the CreateRemoteThread. I don't know why that'd cause an issue but it is not a case that I've explicitly tested. I'll test with that as soon as I get a chance.

Thank you, I really do appreciate it. I can then use this instead of Visual Studio for this project :)

vulcan-dev added a commit to TDMP-Team/TDMP-Refactor that referenced this issue Jul 23, 2024
@ryanfleury ryanfleury added the Debugger Pertains to the debugger. label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A report of unintended or broken behavior. Debugger Pertains to the debugger.
Projects
None yet
Development

No branches or pull requests

2 participants