Re: __main_argc_argv` called before runtime initialization

2024-04-15 Thread 'Sam Clegg' via emscripten-discuss
On Mon, Apr 15, 2024 at 8:32 PM キャロウ マーク  wrote:

>
>
> > On Apr 16, 2024, at 5:15, 'Sam Clegg' via emscripten-discuss <
> emscripten-discuss@googlegroups.com> wrote:
> >
> > When you have the debugger attached and you hit that error/assertion,
> what does the stack trace look like?
> >
>
> The debugger does not show a stack trace.
>
>
Can you click on the little red arrow next to the "Aborted" message in the
console?  It should show the stack trace.

If not, can you set a break point in the `abort` function in the JavaScript
file?  That should certainly give you a backtrace when you hit it.


-- 
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/4C7952F6-F8CF-4335-BDA5-2E740E925D8A%40callow.im
> .
>
> Regards
>
> -Mark
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/4C7952F6-F8CF-4335-BDA5-2E740E925D8A%40callow.im
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-rfi_z989PKZCbZjdizVFXTmFBNjpqtmZKJf2hdzhV9Q%40mail.gmail.com.


Re: __main_argc_argv` called before runtime initialization

2024-04-15 Thread 'Sam Clegg' via emscripten-discuss
When you have the debugger attached and you hit that error/assertion, what
does the stack trace look like?

On Mon, Apr 15, 2024 at 1:00 PM Alon Zakai  wrote:

> That is very strange. Based on those link flags, you did not modify how
> the application starts up, so I have no idea how it could break like that.
> If it only happens in the Firefox debugger then perhaps it is a Firefox
> debugger bug somehow? That seems unlikely too. But maybe try debuggers in
> other browsers and other versions of Firefox (in particular I would try
> Firefox Nightly).
>
> On Sun, Apr 14, 2024 at 11:06 PM キャロウ マーク  wrote:
>
>> When I try to load the .html  for  my compiled app under the debugger in
>> Firefox I get a runtime exception:
>>
>> native function `__main_argc_argv` called before runtime
>> initialization
>>
>> If I run without the debugger, the app runs.
>>
>> I am using Emscripten’s default generated .html. Here are my Emscripten
>> link options:
>>
>> --source-map-base ./
>> --exclude-file
>> '${PROJECT_SOURCE_DIR}/tests/testimages/cubemap*'
>> -s ALLOW_MEMORY_GROWTH=1
>> -s DISABLE_EXCEPTION_CATCHING=0
>> -s USE_SDL=2
>> -s USE_WEBGL2=1
>>
>> plus a few —preload-file options for some image files.
>>
>> Any idea why this is happening and how to fix it?
>>
>> Regards
>>
>> -Mark
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to emscripten-discuss+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/A5D9183C-ABB3-4D89-81DC-3DB38CFD6600%40callow.im
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpThe1LhSJ%3DmiVjnyBc%3DHCYF7P7V-yKac1kYZ47arrztzA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28xV%3DQQGmK00w6mS4sVzynjwJG0mvCOTEU3f_SWh-wm6A%40mail.gmail.com.


Re: __main_argc_argv` called before runtime initialization

2024-04-15 Thread Alon Zakai
That is very strange. Based on those link flags, you did not modify how the
application starts up, so I have no idea how it could break like that. If
it only happens in the Firefox debugger then perhaps it is a Firefox
debugger bug somehow? That seems unlikely too. But maybe try debuggers in
other browsers and other versions of Firefox (in particular I would try
Firefox Nightly).

On Sun, Apr 14, 2024 at 11:06 PM キャロウ マーク  wrote:

> When I try to load the .html  for  my compiled app under the debugger in
> Firefox I get a runtime exception:
>
> native function `__main_argc_argv` called before runtime initialization
>
> If I run without the debugger, the app runs.
>
> I am using Emscripten’s default generated .html. Here are my Emscripten
> link options:
>
> --source-map-base ./
> --exclude-file
> '${PROJECT_SOURCE_DIR}/tests/testimages/cubemap*'
> -s ALLOW_MEMORY_GROWTH=1
> -s DISABLE_EXCEPTION_CATCHING=0
> -s USE_SDL=2
> -s USE_WEBGL2=1
>
> plus a few —preload-file options for some image files.
>
> Any idea why this is happening and how to fix it?
>
> Regards
>
> -Mark
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/A5D9183C-ABB3-4D89-81DC-3DB38CFD6600%40callow.im
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpThe1LhSJ%3DmiVjnyBc%3DHCYF7P7V-yKac1kYZ47arrztzA%40mail.gmail.com.


__main_argc_argv` called before runtime initialization

2024-04-15 Thread キャロウ マーク
When I try to load the .html  for  my compiled app under the debugger in 
Firefox I get a runtime exception:

native function `__main_argc_argv` called before runtime initialization

If I run without the debugger, the app runs.

I am using Emscripten’s default generated .html. Here are my Emscripten link 
options:

--source-map-base ./
--exclude-file '${PROJECT_SOURCE_DIR}/tests/testimages/cubemap*'
-s ALLOW_MEMORY_GROWTH=1
-s DISABLE_EXCEPTION_CATCHING=0
-s USE_SDL=2
-s USE_WEBGL2=1

plus a few —preload-file options for some image files.

Any idea why this is happening and how to fix it?

Regards

-Mark

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/A5D9183C-ABB3-4D89-81DC-3DB38CFD6600%40callow.im.


signature.asc
Description: Message signed with OpenPGP